Skip to content

Instantly share code, notes, and snippets.

to stderr is human

Karan Goel karan

to stderr is human
View GitHub Profile

Keybase proof

I hereby claim:

  • I am karan on github.
  • I am karan ( on keybase.
  • I have a public key ASCMBB4lwAqG_lQjoClPxzqK2YqD6U2d1_4TvcYlgadPewo

To claim this, I am signing this object:

public class CoinDenomination {
private int value;
CoinDenomination(int v) {
value = v;
public class CoinDenomination {
private int value;
// So no one else can instantiate
private CoinDenomination(int v) {}
public static final CoinDenomination PENNY = new CoinDenomination(1);
public static final CoinDenomination NICKLE = new CoinDenomination(5);
public static final CoinDenomination DIME = new CoinDenomination(10);
View index.html
<script src=""></script>
<a class="btn btn-primary" id="agree_to_tos">Accept Terms of Service</a>
View tweetdeck_paste_image.js
document.getElementsByClassName('compose-text-container')[0].onpaste = function (event) {
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
// find pasted image among pasted items
var blob;
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf("image") === 0) {
blob = items[i].getAsFile();
View api_keys.go
package main
const (
BigHugeLabsApiKey = "3f1b2e0a6b4f83952ad128a9f5262ee4"
WordnikApiKey = "d0c4d5535e0070ddec00b0d55bf04b5f5f25566a40c2a0552"
View gist:6f52f2425abffa30323b
Verifying that +goel is my openname (Bitcoin username).
View nginx.conf
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/;
events {
# max_clients = worker_processes * worker_connections / 4
worker_connections 1024;
View gist:1f1fe59e4f047f8d888e
# rename origin remote
git remote rename origin github
# add the gitlab remote (for the love of everything that’s holy, use ssh)
git remote add bitbucket <remote link for bitbucket>
# push existing code to new remote
git push -u bitbucket —all
# let’s magic
karan /
Last active Aug 29, 2015
Script to provision an EC2 instance for any node application
# update linux
sudo apt-get update
# install gcc and git
sudo apt-get install gcc-c++ make
sudo apt-get install openssl-devel
sudo apt-get install git
# install node and npm
curl -sL | sudo bash -