This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
</head> | |
<body> | |
<script id="whatever">document.write('<!'+'--')</script> | |
<img src="filth.jpg" /> | |
<!----> | |
<script> | |
// filth.jpg will start loading now for users without js. |
This file contains hidden or 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 gs='git status' | |
alias gai='git add --interactive' | |
alias gsvn='git svn' | |
alias gsup='gsvn fetch && gsvn rebase' | |
alias gsp='gsup && gsvn dcommit' | |
alias gf='git fetch' | |
alias gr='git rebase' | |
alias gp='gup && git push' | |
alias gff='git flow feature' | |
alias gfr='git flow release' |
This file contains hidden or 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(document){ | |
var script = 'script', | |
twitterWidgets = document.createElement(script), | |
lastScript = document.getElementsByTagName(script)[0]; | |
twitterWidgets.async = twitterWidgets.src = 'http://platform.twitter.com/widgets.js'; | |
lastScript.parentNode.insertBefore(twitterWidgets, lastScript); | |
})(document); | |
// compressed 177 bytes |
This file contains hidden or 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
.whatever { | |
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset; | |
-moz-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset; | |
-o-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset; | |
box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset; | |
} |
This file contains hidden or 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
var something = 'blah', | |
whatever = 'spaces, to make the var names line up'; | |
if (something) { | |
console.log("tabbed, to indicate it's a child of a code block"); | |
} | |
// But I tend to use 4 spaces when coding in python, as that's what the python | |
// expert I work with does. |
This file contains hidden or 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
<!--[if IE 8]><meta http-equiv="X-UA-Compatible" content="IE=7"/><![endif]--> | |
<!--[if gt IE 8]><meta http-equiv="X-UA-Compatible" content="IE=edge"/><![endif]--> | |
I've been experimenting with this in a couple of projects. | |
For animations, IE8 compat mode is noticeably quicker/smoother than | |
IE8 strict. Since I still give 'full' support to IE7 (barring the | |
odd text-shadow etc which IE8 doesn't support anyway) I use the tags | |
above to push IE8 into compat mode for smoother animations, but allow | |
the much faster IE9 to try its standardsy best. |
This file contains hidden or 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
/** | |
* @private | |
* @function | |
* @description Get a supported css property name for a css property | |
* Will search common vendor prefixes for supported value. | |
* | |
* @param {string} propertyName Name without any prefix | |
* | |
* @return {string} Supported property name. | |
* This will be an empty string for unsupported properties. |
This file contains hidden or 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 asyncQueue(/* function, function, ... */) { | |
var slice = Array.prototype.slice, | |
funcs = slice.call(arguments, 0), | |
baseArgs = [function() { | |
next(arguments); | |
}], | |
next = function(args) { | |
var nextFunc = funcs.shift(); | |
nextFunc && nextFunc.apply( | |
this, baseArgs.concat( slice.call(args, 0) ) |
This file contains hidden or 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 asyncQueue(/* function, function, ... */) { | |
var slice = Array.prototype.slice, | |
funcs = slice.call(arguments, 0), | |
baseArgs = [function() { | |
next(arguments); | |
}], | |
next = function(args) { | |
var nextFunc = funcs.shift(); | |
nextFunc && nextFunc.apply( | |
this, baseArgs.concat( slice.call(args, 0) ) |
This file contains hidden or 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 asyncQueue(/* function, function, ... */) { | |
var funcs = Array.prototype.slice.call(arguments, 0), | |
baseArgs = [function() { | |
next(arguments); | |
}], | |
next = function(args) { | |
var nextFunc = funcs.shift(); | |
nextFunc && nextFunc.apply( this, baseArgs.concat(args) ); | |
}; | |
next(); |