This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comment by David Mark: | |
"We should get this out into the open. There seems to be a commonly held belief that jQuery users are ignorant, and, more often than not, designers. Where did this come from, and is it true?" | |
Hi there... and yes *most* jQuery users are designers with no need to learn programming (let alone cross-browser scripting). That's fine for them as they only need to make mock-ups, not production Websites. | |
"Roots" | |
Hi there, again. :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$querystring = 'first=jeff&last=way'; | |
$final = array(); | |
foreach( explode('&', $querystring) as $p ) { | |
list($key, $value) = explode('=', $p); | |
$final[$key] = $value; | |
} | |
// Test it | |
echo "<pre>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get files here: https://github.com/LeaVerou/HTML5-Progress-polyfill | |
// Also get custom build of Modernizr - with Modernizr.load, and the Community Progress add-on | |
Modernizr.load({ | |
test: Modernizr.progressbar, | |
nope: [ | |
'js/progressPoly.js', | |
'css/progressPoly.css' | |
] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
full_width = 80 | |
columns = 12 | |
gutter = 1 | |
.container | |
width unit(full_width, '%') | |
margin auto | |
overflow hidden | |
div[class^="grid_"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Autosave from Chrome Notes: | |
Watch: http://addyosmani.com/blog/autosave-changes-chrome-dev-tools/ | |
Installation Instructions: https://github.com/NV/chrome-devtools-autosave | |
Afraid of Node? Here's a one-click install: https://sites.google.com/site/nodejsmacosx/ | |
To monitor changes, you have to run `node chrome-devtools-autosave-server/index.js` in the Terminal. This is hard to remember, | |
so create an alias. Run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function meThinks(assertion) { | |
return { | |
shouldEqual: function(bool) { | |
if ( assertion !== bool ) { | |
throw new Error('FAIL'); | |
} | |
} | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to ~/.bash_profile | |
function chrome() { | |
open $@ --args --allow-file-access-from-files | |
} | |
# Usage - chrome index.html | |
# now you don't have to worry about those pesky local XHR issues in Chrome. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('http://173.255.193.46/api/edge/popular:themeforest.json?callback=?', function(files) { | |
var imgs; | |
files = files.popular; | |
console.log(files); // see what's available to play with | |
imgs = $.map(files.items_last_week, function(file, i) { | |
return '<a href="' + file.url + '"><img src=' + file.thumbnail + '></a>'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
css="`cat style.css`" && curl -sSd css="$css" http://prefixr.com/api/index.php > style.css |