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
#!/bin/sh | |
files=$(git diff --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
pass=true | |
echo "\nValidating JavaScript:\n" |
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 ObjectID = require('mongodb').ObjectID; | |
var configHelper = /* redacted */; | |
var config = require('config'); | |
var mongodb = require('mongodb'); | |
var MongoClient = mongodb.MongoClient; | |
var lib = /* redacted */; | |
// Map of database connection keyed by collection's tenantId | |
var databaseConnectionMap = {}; |
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
/Library/Ruby/Gems/2.0.0/gems ᐅ ll | |
total 0 | |
drwxr-xr-x 10 bryantchou1 wheel 340B Jan 19 14:53 builder-3.2.2 | |
drwxr-xr-x 11 root wheel 374B Jan 19 16:25 chef-12.0.3 | |
drwxr-xr-x 8 bryantchou1 wheel 272B Jan 19 14:49 chef-zero-3.2.1 | |
drwxr-xr-x 7 bryantchou1 wheel 238B Jan 19 14:49 coderay-1.1.0 | |
drwxr-xr-x 19 bryantchou1 wheel 646B Jan 19 14:49 diff-lcs-1.2.5 | |
drwxr-xr-x 14 bryantchou1 wheel 476B Jan 19 14:49 erubis-2.7.0 | |
drwxr-xr-x 15 bryantchou1 wheel 510B Jan 19 14:53 excon-0.43.0 | |
drwxr-xr-x 12 bryantchou1 wheel 408B Jan 19 14:49 ffi-1.9.6 |
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
location / { | |
set $backend "<ELB_A_RECORD?"; | |
proxy_pass http://$backend$uri; | |
... | |
} |
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 self = <My Model>; | |
var stripeOpts = { | |
description: self.getStripeDescription(subject), | |
email: self.email, | |
metadata: self.generateStripeMetadata(subject), | |
// acct_ ... | |
stripe_account: subject.managedAccountId | |
}; |
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 cluster = require('cluster'); | |
var os = require('os'); | |
var http = require('http'); | |
var workers = []; | |
var startCount = 0; | |
var TIMEOUT = 10000; // Wait 10 seconds for workers to disconnect | |
var RESTART = 86400000; // 24 hours | |
var intervalId; |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
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
" .vimrc | |
" http://github.com/niw/profiles | |
"{{{ Initialize | |
if !exists('s:loaded_vimrc') | |
" Don't reset twice on reloading, 'compatible' has many side effects. | |
set nocompatible | |
endif |
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 DATABASE = {}; | |
/** | |
* Start awk-sdk mock | |
*/ | |
exports.getItem = function(params, cb) { | |
if (params.AttributesToGet) { | |
var ret = { | |
Item: {} | |
}; |
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
#!/bin/sh | |
dest="$HOME/git-commit-snapshots/" | |
mkdir -p $dest | |
path=$dest/`date +%s`.jpg | |
imagesnap -w 1 -q $path & |
OlderNewer