Skip to content

Instantly share code, notes, and snippets.

@ayee
ayee / Sample Redshift code
Created March 17, 2015 17:43
Sample redshift code to load from JSON file using jsonpaths
### begin Redshift code ###
// get rid of the old stuff
drop table crashyplane;
// create a new table
create table crashyplane (
event varchar(255) not null,
"time" int,
distinct_id varchar(255) distkey sortkey not null,
@qzaidi
qzaidi / cluster
Created March 22, 2014 18:09
script wrapper for running node daemons
#!/usr/bin/env node
//# vi: ft=javascript
"use strict";
var util = require('util');
var recluster = require('recluster');
var path = require('path');
var fs = require('fs');
var args = require('optimist').argv;
@JangoSteve
JangoSteve / controller.js
Created July 23, 2012 23:42
Example ExpressJS view with partials
app.get('/', function(req, res) {
// [clipped] set user
res.render('index', {user: user});
});
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a