View gist:3567606e462dba5b319d
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 TO THE CHOPPER nextPiece | |
HERE IS MY INVITATION currentPiece | |
GET UP forwardAmount | |
ENOUGH TALK | |
GET TO THE CHOPPER maxSize | |
HERE IS MY INVITATION track.size | |
GET DOWN 1 | |
ENOUGH TALK |
View spyOn.js
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
/** | |
* Spy on an object in a way that IE8 likes it | |
* | |
* If trying to use sinon.spy(document, 'createElement') or such in IE8, | |
* it will not work correctly. This function wraps the call in a way | |
* that it's supported in IE. | |
* | |
* May have possible side-effects to more specialized asserts,, but | |
* at least calledWith, return values, etc. * work correctly. | |
* |
View gist:243557
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
var fun = String(fnc); | |
//Capture function args and body into capture groups | |
var argsBody = fun.match( | |
/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/ | |
); | |
//Get argument names | |
var argNames = argsBody[1].split(/\s*,\s*/g); |
View gist:269257
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
var docu = document.body.getElementsByTagName('iframe')[4].contentDocument; | |
x = docu.evaluate('/html/body/div/div[2]/div/div[2]/div/div[3]/div/div/div/div[2]/div/div/div/div/div[2]/div/div[2]/div/div/div/div/div[3]/div/div/div/div/div/div/div/div[2]/b', docu, null, XPathResult.ANY_TYPE, null); | |
var el = x.iterateNext(); | |
el.innerHTML = 'blah blah blah'; |
View gist:288916
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^.*$ index.php [NC,L] |
View gist:307721
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
Name : php Relocations: (not relocatable) | |
Version : 5.2.9 Vendor: (none) | |
Release : 1 Build Date: Mon 02 Mar 2009 01:18:43 PM EET | |
Install Date: Wed 21 Oct 2009 10:29:14 AM EEST Build Host: phpbuild | |
Group : Development/Languages Source RPM: php-5.2.9-1.src.rpm | |
Size : 3122367 License: PHP | |
Signature : (none) | |
URL : http://www.php.net/ | |
Summary : The PHP HTML-embedded scripting language | |
Description : |
View .zshrc
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
###################################################################### | |
# jdong's zshrc file v0.2.1 , based on: | |
# mako's zshrc file, v0.1 | |
# | |
# | |
###################################################################### | |
# next lets set some enviromental/shell pref stuff up | |
# setopt NOHUP | |
#setopt NOTIFY |
View gist:829408
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
public function x() { | |
$self = $this; | |
$closure = function() use ($self) { | |
//You can call public members of $self here but not protected/private | |
} | |
} |
View gist:950825
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
var myWidget = function() { | |
//create widget and all stuff here | |
//return an object with methods, which then muck with the widget & co. created inside the closure here | |
return { | |
doStuff: function() ... | |
}; | |
}; |
View gist:964400
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
$('#emailAlert').change(function() { | |
$(this.form.emailAddress)[ | |
this.checked ? 'show' : 'hide' | |
](); | |
}); |
OlderNewer