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
| /*! | |
| * jQuery param sort - v0.1 - 8/20/2010 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2010 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ | |
| // Return a sorted params string, suitable for use as a key or fragment. |
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
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 6) then: | |
| // ie === 0 | |
| // If you're in IE (>=6) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
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
| /*! | |
| * isSemVer - v0.1 - 9/05/2010 | |
| * http://benalman.com/ | |
| * http://semver.org/ | |
| * | |
| * Copyright (c) 2010 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ |
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
| /*! | |
| * postMessage detector - v0.1pre - 9/15/2010 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2010 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| */ | |
| // If `window.postMessage.complex` is true, postMessage can pass complex non-string |
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
| // From http://a5.twimg.com/a/1284588078/javascripts/phoenix.bundle.js | |
| (function (B) { | |
| var A = (function () { | |
| var E = { | |
| select: "input", | |
| change: "input", | |
| submit: "form", | |
| reset: "form", | |
| error: "img", |
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
| // See my blog post: | |
| // http://benalman.com/news/2010/09/partial-application-in-javascript/ | |
| // In the following code sample, invoking the curried function will always | |
| // return a function until all arguments are satisfied, at which point the | |
| // original function is invoked, returning its result. This means that all | |
| // function arguments are required, which also allows the function to be | |
| // called either like foo( 1, 2, 3 ) or foo( 1 )( 2 )( 3 ). This also means | |
| // that if any argument is omitted, the original function is never invoked. |
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
| #!/bin/bash | |
| # Firefox Multifix | |
| # | |
| # Run this bash script from within the folder that contains your Firefox apps, | |
| # and every Firefox app in the current folder will be modified to automatically | |
| # launch using a version-named profile. For example, "Firefox 2.0.app" will use | |
| # the "Firefox 2.0" profile, etc. | |
| # | |
| # Usage: |
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
| { name = 'source.css.embedded.html.syntaxhighlighter'; | |
| begin = '(?:^\s+)?(<)((?i:pre))\b(?=[^>]*class=([''"])[^>]*?\bbrush\s*:\s*css\b[^>]*?\3)(?![^>]*/>)'; | |
| end = '(?<=</(pre|PRE))(>)(?:\s*\n)?'; | |
| beginCaptures = { | |
| 1 = { name = 'punctuation.definition.tag.html'; }; | |
| 2 = { name = 'entity.name.tag.style.html'; }; | |
| }; | |
| endCaptures = { 2 = { name = 'punctuation.definition.tag.html'; }; }; | |
| patterns = ( | |
| { include = '#tag-stuff'; }, |
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
| <?php | |
| // Use in the "Post-Receive URLs" section of your GitHub repo. | |
| if ( $_POST['payload'] ) { | |
| shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
| } | |
| ?>hi |
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
| #!/bin/bash | |
| sudo find '/Applications/Google Chrome.app' \ | |
| \( -name inspector.css -or -name devTools.css \) \ | |
| -exec sh -c 'cat >> $1 <<WAT | |
| /* Added on `date` */ | |
| #drawer .monospace, | |
| #drawer .source-code { | |
| font-size: 18px !important; |