Skip to content

Instantly share code, notes, and snippets.

View ShaggyDude's full-sized avatar
🤖
UX, UI

scott romack ShaggyDude

🤖
UX, UI
View GitHub Profile
@vidaaudrey
vidaaudrey / ie67891011-css-hacks.txt
Created June 19, 2016 20:52 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
@pedrogpimenta
pedrogpimenta / convert sass to scss
Created April 11, 2014 16:51
Convert SASS to SCSS and delete .sass files (applies to all files in current folder)
sass-convert -R ./ -F sass -T scss && rm *.sass
@PhazeonPhoenix
PhazeonPhoenix / gist:2008475
Created March 9, 2012 20:21
RegEx: US & Canadian Zip Code
# http://regexlib.com/REDetails.aspx?regexp_id=122
# This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.
^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
@tmpvar
tmpvar / node-jsdom-pure.js
Created December 5, 2010 20:24
basic example for getting node + jsdom + pure.js going
tmpmac:javascript tmpvar$ node node-jsdom-pure.js
<div id="template">
<div class="hello">
<span class="who">Hello Wrrrld</span>
</div>
</div>