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
| # I've always disliked the "./configure" incantation - it's right here! I | |
| # shouldn't need to tell the shell where to look for it. But of course, | |
| # putting '.' in your $PATH is terrible -- it's insecure and throws permission | |
| # errors if you try to 'execute' regular files. Bash 4's `shopt -s autocd` | |
| # solves half the problem; and the ability to override | |
| # command_not_found_handle() solves the other. | |
| # | |
| # This is an OS X-oriented script that attempts to do the most intelligent | |
| # thing possible when you enter the name of a file in your $PWD into the bash | |
| # prompt. It will: |
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
| /* jshint browser: true, devel: true */ | |
| /** | |
| * preg_replace (from PHP) in JavaScript! | |
| * | |
| * This is basically a pattern replace. You can use a regex pattern to search and | |
| * another for the replace. For more information see the PHP docs on the original | |
| * function (http://php.net/manual/en/function.preg-replace.php), and for more on | |
| * JavaScript flavour regex visit http://www.regular-expressions.info/javascript.html | |
| * |
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
| // easing functions http://goo.gl/5HLl8 | |
| Math.easeInOutQuad = function (t, b, c, d) { | |
| t /= d/2; | |
| if (t < 1) { | |
| return c/2*t*t + b | |
| } | |
| t--; | |
| return -c/2 * (t*(t-2) - 1) + b; | |
| }; |
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 spawn = require('child_process').spawn | |
| var instance = { | |
| ipAddress: "0.0.0.0" | |
| }; | |
| var awsPreSharedKeyPath = '~/.ssh/aws-preshared-key.pem'; // make sure key has permissions 600 with chmod | |
| var spawnArgs = [ '-tt', // force teletype since ssh uses a psuedo-terminal |
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 s = new Signal(), cb = function(a, b){ console.log('callback', arguments, this); }; | |
| s.add(cb); | |
| s.add(cb); | |
| s.dispatch('for', 'science', '!', 1); | |
| s.remove(cb); | |
| s.dispatch('for', 'science', '!', 2); | |
| s.remove(cb); | |
| s.dispatch('for', 'science', '!', 3); |
NewerOlder