create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| /* Scanner that reads in a Portable Graymap (PGM) file. | |
| * | |
| * By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf) | |
| * Redistributable under the terms of the 3-clause BSD license | |
| * (see http://www.opensource.org/licenses/bsd-license.php for details) | |
| */ | |
| enum { PRE_START, PARSE_START, GOT_X, GOT_Y, GOT_MAX } parserstate | |
| = PRE_START; |
| /* Scanner that reads in a Portable Graymap (PGM) file. | |
| * | |
| * By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf) | |
| * Redistributable under the terms of the 3-clause BSD license | |
| * (see http://www.opensource.org/licenses/bsd-license.php for details) | |
| */ | |
| enum { PRE_START, PARSE_START, GOT_X, GOT_Y, GOT_MAX } parserstate | |
| = PRE_START; |
| function ClosurePattern() { | |
| this.someMethod = function someMethod() { | |
| console.log('foo'); | |
| } | |
| } | |
| var closurePattern = new ClosurePattern(); |
| def isBalanced (string): | |
| if isinstance(string, basestring) is False: | |
| return True | |
| STRUCTURE_OPN = 1 | |
| STRUCTURE_CLS = 2 | |
| structures = { | |
| '(': (')', STRUCTURE_OPN), | |
| ')': ('(', STRUCTURE_CLS), |
| /* See: | |
| http://bit.ly/WhXvb3 | |
| for the Traceur */ | |
| var foo = [9, 9, 9], | |
| bar = [2, 2, 2], | |
| baz = [1, 1, ...foo, 1, 1, ...bar, 1, 1]; | |
| console.log(baz); | |
| /* Output: 1,1,9,9,9,1,1,2,2,2,1,1 */ |
| Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH | |
| Create a config file in ~/.ssh/ | |
| vim config: | |
| # PERSONAL ACCOUNT Github | |
| Host github.com-COOL | |
| HostName github.com | |
| User git | |
| IdentityFile ~/.ssh/id_rsa_COOL |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| String.prototype.format = function (format_object) { | |
| // TODO: Find better way to do this. Works great for now. | |
| // I don't know how efficient this is, but it works. | |
| var string_current = this.valueOf(); | |
| var string_new = ''; | |
| var format_matches = string_current.match(/\%\([a-zA-Z0-9_]+\)/g); // Definitely has edge cases. | |
| var replace_object = {}; | |
| if (format_matches.length > 0) { |
| function binarySearch (key, array) { | |
| var low = 0; | |
| var high = (array.length - 1); | |
| while (low <= high) { | |
| var mid = floor(((low + high) / 2)); | |
| var val = array[mid]; | |
| if (val < key) { | |
| low = (mid + 1); |
| function integer_to_binary ( integer ) { | |
| if ( ( toString.call( integer ) !== '[object Number]' ) || ( integer < 0 ) ) { | |
| return null; | |
| } else if ( integer === 0 ) { | |
| return '0'; | |
| } else { | |
| var stack = []; | |
| // var STACK_CAPACITY = 8; |