Skip to content

Instantly share code, notes, and snippets.

View netsi1964's full-sized avatar

Sten Hougaard netsi1964

View GitHub Profile
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
var callByName = (function(global) {
return function(name, args, thisArg) {
return global[name].call(thisArg, args);
}
})(this);
@netsi1964
netsi1964 / elementBoxesToSVG.js
Last active August 29, 2015 14:06
Convert element bounding boxes into SVG rectangles
var svg = "";
var miX = 10000,
miY = 10000,
maX = -1,
maY = -1,
fillColor = "rgba(100,100,100,.14)",
strokeColor = "rgba(250,250,100,.8)",
strokeWidth = "4px",
lineStokeColor = "rgba(100,100,100,.8)",
lineStrokeWidth = "1px",
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@netsi1964
netsi1964 / geoinformation.md
Created October 16, 2013 07:36
Find geoinformation using freegeoip.net

Find geoinformation using freegeoip.net

	$.getJSON('http://freegeoip.net/json/',function(data){
		console.dir(data);
	})

Example output

	{
	"ip":"212.242.207.8",
// Created by STRd6
// MIT License
// jquery.paste_image_reader.js
(function($) {
var defaults;
$.event.fix = (function(originalFix) {
return function(event) {
event = originalFix.apply(this, arguments);
if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) {
event.clipboardData = event.originalEvent.clipboardData;
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@qmmr
qmmr / script.js
Created September 20, 2012 19:23
Avoid `console` errors in browsers that lack a console.
// Avoid `console` errors in browsers that lack a console.
if (!(window.console && console.log)) {
(function() {
var noop = function() {};
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
var length = methods.length;
var console = window.console = {};
while (length--) {
console[methods[length]] = noop;
}
@netsi1964
netsi1964 / DynamicwebCMSsqlScripts.sql
Last active March 14, 2016 13:23
Dynamicweb CMS sql scripts
-- Dynamicweb CMS sql scripts
-- By Sten Hougaard, netsi1964@gmail.com
FOR XML AUTO
-- Opdateret
---------------------------------------------------------e------------------------------
-- Accessuser/page
---------------------------------------------------------------------------------------
-- Find pages modified by non-admins on given areaid
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'