Skip to content

Instantly share code, notes, and snippets.

Nikhil S nsonnad

  • Taipei / NYC
Block or report user

Report or block nsonnad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nsonnad / .block
Last active Jan 6, 2017 — forked from mbostock/.block
Ordinal line chart
View .block
license: gpl-3.0
vol () {
osascript -e "set volume output volume $*";
View myEnum.hs
eftInt :: Int -> Int -> [Int]
eftInt x y
| x <= y = x : eftInt (succ x) y
| otherwise = []
nsonnad /
Created Nov 11, 2015
How to setup subsonic on ubuntu with a DAC

What I had to do to get Subsonic working on Ubuntu with a USB DAC:

  1. Download subsonic .deb package and install with sudo dpkg -i subsonic-x-x.deb, as per instructions.

  2. Set up users w/ jukebox mode

  3. For some reason the jukebox doesn't work with openjdk java, but this post

nsonnad / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var d3 = require('d3');
var years = [

Please publicly post the following Gist, and name it

Keybase proof

I hereby claim:

  • I am nsonnad on github.
  • I am nkl ( on keybase.
  • I have a public key whose fingerprint is 8880 A84C 6659 C228 C9FB 8A10 CA4B 5B56 8F14 3821
View evenOdd.js
var fs = require('fs');
var stream = require('stream');
var byLine = new stream.Transform({objectMode: true});
var inputFile = fs.createReadStream('uspop.csv',{'encoding': 'utf8'});
var even = fs.createWriteStream('evenYears.csv');
var odd = fs.createWriteStream('oddYears.csv');
function evenOddYears (line) {
// check if year is even or odd
# Check the status of the Quartz dishwasher. This will install
# jsontool ( if you don't have it already.
if ! which $json >/dev/null; then
npm install -g json
STATUS=$(curl -s
nsonnad /
Created Nov 28, 2013
shell: print specific rows of file from terminal
sed -n 16224,16482p filename > newfile
nsonnad /
Created Nov 22, 2013
Iterate over specific range of rows with python csv.reader()
import csv
import itertools
f = csv.reader(open('file.csv'))
for row in itertools.islice(f, 0, 50):
print row
You can’t perform that action at this time.