Skip to content

Instantly share code, notes, and snippets.

View bhang's full-sized avatar
👁️
🔎 🐛 🐛

Shubhang Mani bhang

👁️
🔎 🐛 🐛
View GitHub Profile
@bhang
bhang / upgrade_foo.yml
Last active June 28, 2023 19:50
Example of ec2_elb usage re: Issue #3849 (ansible)
---
# Deploys a new version of foo
- name: Deploy new version of foo
hosts: tag_type_appserver:&tag_stage_prod
user: ubuntu
sudo: true
gather_facts: false
serial: 1
vars_prompt:
@bhang
bhang / install_graphite_statsd_ubuntu_precise.sh
Created May 15, 2012 17:41
Install Graphite and statsd on Ubuntu 12.04 LTS (Precise Pangolin)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git

Keybase proof

I hereby claim:

  • I am bhang on github.
  • I am bhangm (https://keybase.io/bhangm) on keybase.
  • I have a public key ASCrcRPncsaakaTEeVlzWz9euMYUU5afbPZY2lDQAqkm9Qo

To claim this, I am signing this object:

@bhang
bhang / graphite_gunicorn_nginx.conf
Created June 27, 2012 13:09
nginx Configuration for gunicorn + graphite
worker_processes 1;
user nobody nogroup;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
worker_connections 64;
}
@bhang
bhang / install-openresty.sh
Created May 9, 2016 14:20
Lua HMAC authentication
$ brew tap killercup/homebrew-openresty
$ brew install ngx_openresty
@bhang
bhang / supervisord_graphite_statsd.conf
Created June 27, 2012 13:45
Graphite + statsd supervisord configuration
[program:gunicorn-graphite]
command=/usr/local/bin/gunicorn_django -u www-data -g www-data -b 127.0.0.1:8080 --log-file=/opt/graphite/storage/log/webapp/gunicorn.log /opt/graphite/webapp/graphite/settings.py
process_name=%(program_name)s
autostart=true
autorestart=true
stopsignal=QUIT
user=www-data
[program:carbon-cache]
command=python /opt/graphite/bin/carbon-cache.py --debug start
@bhang
bhang / googleSpreadsheetToKinvey.js
Last active December 24, 2015 22:09 — forked from EchoAbstract/googleSpreadsheetToKinvey.js
Added the missing updateApp function
function updateApp(){
readRowsHelper();
};
function getKinveyParameters(){
return {
kinvey_app_id: " YOUR APP ID ",
kinvey_master_secret: " YOUR MASTER SECRET "
};
};

Debugging & Profiling Node.js

This is a maintained listing of all the different ways to debug and profile Node.js applications. If there is something missing or an improvement, post a comment! :)

Interactive Stack Traces with traceGL - Shareware

  1. Guide here
@bhang
bhang / setup.sh
Last active December 15, 2015 08:09 — forked from duggan/setup.sh
#!/bin/bash
set -o nounset
set -o errexit
set -o xtrace
# Install dependencies
apt-get update
apt-get install -y build-essential lua5.1 liblua5.1-0-dev python python-setuptools python-dev git-core openssl libssl-dev python-pip rsync gcc make git supervisor
pip install seesaw
@bhang
bhang / install.sh
Last active December 15, 2015 08:08 — forked from duggan/install.sh
#!/bin/bash
NICKNAME="bhangm"
# Setup Supervisor
echo "[program:warrior]
command=run-pipeline --concurrent 2 /home/ubuntu/yahoomessages-grab/pipeline.py $NICKNAME
numprocs=1" \
> /etc/supervisor/conf.d/warrior.conf