Skip to content
View cluster.js
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;
View wf-stripe-connect.js
var self = <My Model>;
var stripeOpts = {
description: self.getStripeDescription(subject),
email: self.email,
metadata: self.generateStripeMetadata(subject),
// acct_ ...
stripe_account: subject.managedAccountId
};
View nginx.elb.conf
location / {
set $backend "<ELB_A_RECORD?";
proxy_pass http://$backend$uri;
...
}
View gist:0ad030880fdf7bbda284
/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
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
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
#!/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
##
## 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
# 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
<key>HardResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1024</integer>
</dict>
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1024</integer>
</dict>
Something went wrong with that request. Please try again.