Skip to content

Instantly share code, notes, and snippets.

@ganglio
ganglio / clippath.svg
Created June 26, 2012 16:07 — forked from sawyerh/clippath.svg
SVG Clippath
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ganglio
ganglio / gist:3129282
Created July 17, 2012 13:05 — forked from icodeforlove/gist:868532
querySelectorAll for anything less than IE8
// IE7 support for querySelectorAll in 274 bytes. Supports multiple / grouped selectors and the attribute selector with a "for" attribute. http://www.codecouch.com/
(function(d,s){d=document,s=d.createStyleSheet();d.querySelectorAll=function(r,c,i,j,a){a=d.all,c=[],r=r.replace(/\[for\b/gi,'[htmlFor').split(',');for(i=r.length;i--;){s.addRule(r[i],'k:v');for(j=a.length;j--;)a[j].currentStyle.k&&c.push(a[j]);s.removeRule(0)}return c}})()
@ganglio
ganglio / noise.svg
Created July 30, 2012 18:47 — forked from LeaVerou/dabblet.css
SVG: fractalNoise (Warning: Might be slow!)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ganglio
ganglio / gist:3635646
Created September 5, 2012 12:02 — forked from grammaticof/gist:3635239
JS - Mobile redirect
function mobile_redirect() {
var path = window.location.pathname;
if (path != null) {
window.location = 'http://host' + path
} else {
window.location = 'http://host/'
}
}
function setCookie(c_name, value, expiredays) {
var exdate = new Date();
@ganglio
ganglio / gist:6436012
Created September 4, 2013 11:58 — forked from burin/gist:3840737
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<!-- provide the splash screens for iPhone 5 and previous -->
<link href="assets/splashs/splash_1096.png" rel="apple-touch-startup-image" media="(device-height: 568px)">
<link href="assets/splashs/splash_iphone_2x.png" rel="apple-touch-startup-image" sizes="640x960" media="(device-height: 480px)">