For best results, use hub and git bash completion (included with git under contrib/completion).
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
| // This might be useful for certain size-limited JS competitions, or not. #js | |
| function super_shrinkify( str ){ | |
| if ( str.length % 2 ) { | |
| str += ' '; | |
| } | |
| var prefix = '"', | |
| suffix = '".replace(/./g,function(a){a=a.charCodeAt();return String.fromCharCode(a>>7,a%128)})', | |
| str_bytes = unescape( encodeURIComponent( str ) ).length, |
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 | |
| SERVER=https://api.no.de | |
| SCRIPT="$0" | |
| if [ ${SCRIPT:0:1} == "/" ]; then | |
| SCRIPT="$(basename -- "$SCRIPT")" | |
| fi | |
| main () { | |
| cmd=${1-help} |
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
| // new node.js tls api | |
| var tls = require('tls'); | |
| var fs = require('fs'); | |
| var options = { | |
| key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
| cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
| }; | |
| var server = tls.createServer(options, function (s) { |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC 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
| # These are my notes from the PragProg book on CoffeeScript of things that either | |
| # aren't in the main CS language reference or I didn't pick them up there. I wrote | |
| # them down before I forgot, and put it here for others but mainly as a reference for | |
| # myself. | |
| # assign arguments in constructor to properties of the same name: | |
| class Thingie | |
| constructor: (@name, @url) -> | |
| # is the same as: |
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
| module.exports = (function(){ | |
| const MS = | |
| { seconds: 1000 | |
| , minutes: 60 * 1000 | |
| , hours: 60 * 60 * 1000 | |
| , days: 24 * 60 * 60 * 1000 | |
| , weeks: 7 * 24 * 60 * 60 * 1000 | |
| , months: 30 * 7 * 24 * 60 * 60 * 1000 | |
| , years: 365 * 24 * 60 * 60 * 1000 } |
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 mapParallel(array, callback) { | |
| return array.reduce(function(acc_p, element, index, array) { | |
| return Q.when(callback(element, index, array), function(res) { | |
| return Q.when(acc_p, function(acc) { | |
| return acc.concat([res]); | |
| }); | |
| }); | |
| }, []); | |
| } |
OlderNewer