Skip to content

Instantly share code, notes, and snippets.

View jasdev's full-sized avatar

Jasdev Singh jasdev

View GitHub Profile
cdls() {
if [ -z "$1" ]; then
cd && ls
else
cd "$*" && ls
fi
}
alias cd=cdls
@jasdev
jasdev / sample.json
Created January 20, 2013 02:04
Sample Snapgraph /getuser out
{
_id: "octopi",
score: "3749",
children: [
{
name: "justdavesingh",
score: "5"
},
{
name: "vivekb",
@jasdev
jasdev / sample.json
Created January 20, 2013 02:07
Sample Snapgraph /leaderboard output
[
{
_id: "yodawg",
score: "72948"
},
{
_id: "vivekb",
score: "10557"
},
{
@jasdev
jasdev / rtb.txt
Created April 16, 2013 01:38
lolyes
d8888b. .d88b. .d88b. d888888b d888888b db db d88888b d8888b. .d88b. db db
88 `8D .8P Y8. .8P Y8. `~~88~~' `~~88~~' 88 88 88' 88 `8D .8P Y8. `8b d8'
88oobY' 88 88 88 88 88 88 88ooo88 88ooooo 88oooY' 88 88 `8bd8'
88`8b 88 88 88 88 88 88 88~~~88 88~~~~~ 88~~~b. 88 88 .dPYb.
88 `88. `8b d8' `8b d8' 88 88 88 88 88. 88 8D `8b d8' .8P Y8.
88 YD `Y88P' `Y88P' YP YP YP YP Y88888P Y8888P' `Y88P' YP YP
@jasdev
jasdev / rtb.html
Created April 16, 2013 01:39
For future trolling
<html>
<title>rtb</title>
<head>
<meta http-equiv="refresh" content="5; url=http://twitter.com/r00tth3b0x">
</head>
<body bgcolor="black">
<pre><center><font color="white">
d8888b. .d88b. .d88b. d888888b d888888b db db d88888b d8888b. .d88b. db db
88 `8D .8P Y8. .8P Y8. `~~88~~' `~~88~~' 88 88 88' 88 `8D .8P Y8. `8b d8'
@jasdev
jasdev / gist:7504303
Created November 16, 2013 19:33
On valuations
“You could take all the gold that’s ever been mined, and it would fill a cube 67 feet in each direction. For what it’s worth at current gold prices, you could buy — not some — all of the farmland in the United States. Plus, you could buy 10 Exxon Mobils (XOM), plus have $1 trillion of walking-around money. Or you could have a big cube of metal. Which would you take? Which is going to produce more value?” - Warren Buffett
@jasdev
jasdev / .bash_profile
Created December 9, 2013 18:56
.bash_profile
export PATH
cdls() {
if [ -z "$1" ]; then
cd && ls -G
else
cd "$*" && ls -G
fi
}
alias cd=cdls
alias pearp='/Applications/MAMP/bin/php/php5.4.4/bin/pear'
@jasdev
jasdev / color.py
Created December 22, 2013 04:10
quick python to generate the optimum set of RBG values for a set of size COUNT. This uses the technique outlined in this post http://gamedev.stackexchange.com/questions/46463/is-there-an-optimum-set-of-colors-for-10-players
colors = []
for i in range(0, COUNT):
colors.append(colorsys.hsv_to_rgb(fmod(i * 0.618033988749895, 1.0), 0.5, 1.0))
@jasdev
jasdev / gallery.js
Last active August 29, 2015 14:03
Fetch top 5 Gallery Items from Imgur
@jasdev
jasdev / clonerev.sh
Last active August 29, 2015 14:13
Clone repo at specific commit
clonerev() {
git clone $1
cd 'sed ${1}##/*/ s/.git//'
git reset --hard $2
}
# Usage: clonerev [url] [commit hash]