View gist:0ad030880fdf7bbda284
1 2 3 4 5 6 7 8 9 10
/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
View gist:e04fe20bf6623cc04361
1 2 3 4 5 6 7 8 9 10
Building native extensions. This could take a while...
ERROR: Error installing knife-ec2:
ERROR: Failed to build gem native extension.
 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150119-12518-1qmgu0.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
checking for iconv... yes
************************************************************************
View mongo-dynamo.js
1 2 3 4 5 6 7 8 9
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 = {};
View pre-commit
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
 
files=$(git diff --name-only --diff-filter=ACM | grep ".js$")
if [ "$files" = "" ]; then
exit 0
fi
 
pass=true
 
echo "\nValidating JavaScript:\n"
View nginx.conf
1 2 3 4 5 6 7 8 9
##
## This nginx.conf servers as the main config file for webflow reverse proxy
##
## RCS:
## https://gist.github.com/sansmischevia/5617402
##
## Hardening tips:
## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
##
View Graphite on Amazon Linux
1 2 3 4 5 6 7 8 9 10
# AMI: ami-3275ee5b
# Login: ec2-user
 
# Apply updates
sudo yum update
# Enable Epel Repo
sudo vim /etc/yum.repos.d/epel.repo.
# Under the section marked [epel], change enabled=0 to enabled=1.
View org-mongodb-mongod-plist
1 2 3 4 5 6 7 8 9 10
<key>HardResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1024</integer>
</dict>
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1024</integer>
</dict>
View cluster.js
1 2 3 4 5 6 7 8 9 10
var cluster = require('cluster'),
os = require('os'),
http = require('http');
 
// List of 'active' workers:
var workers = [];
 
var start_count = 0;
 
// The amount of time we wait before killing a process during a reload:
View post-commit
1 2 3 4 5 6 7 8 9
#!/bin/sh
 
dest="$HOME/git-commit-snapshots/"
 
mkdir -p $dest
 
path=$dest/`date +%s`.jpg
 
imagesnap -w 1 -q $path &
View value.js
1 2 3 4 5 6 7 8 9 10
function Value(value) {
switch (typeof value) {
case "number": return {N: String(value)}
case "string": return {S: value}
}
 
if (value) switch (typeof value[0]) {
case "number": return {NS: value.map(String)}
case "string": return {SS: value}
}
Something went wrong with that request. Please try again.