Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View karan's full-sized avatar
🌦️
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 (https://keybase.io/karan) on keybase.
  • I have a public key ASCMBB4lwAqG_lQjoClPxzqK2YqD6U2d1_4TvcYlgadPewo

To claim this, I am signing this object:

public class CoinDenomination {
PENNY(1), NICKLE(5), DIME(10), QUARTER(25);
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);
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.2.min.js"></script>
</head>
<body>
<a class="btn btn-primary" id="agree_to_tos">Accept Terms of Service</a>
</body>
</html>
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();
}
}
package main
const (
BigHugeLabsApiKey = "3f1b2e0a6b4f83952ad128a9f5262ee4"
WordnikApiKey = "d0c4d5535e0070ddec00b0d55bf04b5f5f25566a40c2a0552"
)
Verifying that +goel is my openname (Bitcoin username). https://onename.com/goel
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
# max_clients = worker_processes * worker_connections / 4
worker_connections 1024;
}
# 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
karan / provision_ec2.sh
Last active August 29, 2015 14:12
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 https://deb.nodesource.com/setup | sudo bash -