Skip to content

Instantly share code, notes, and snippets.


Jeff Dickey jdxcode

View GitHub Profile
View downloading node tarball
set -euxo pipefail
# Downloads a node tarball from and extracts just
# the binary into the current directory. Chiefly we use this to get a node
# binary for uploading to manifold.
if [[ $# -ne 4 ]]; then
echo "USAGE: $0 <node_version> <os> <arch> <filename>"
exit 1
View gist:7f56bbecebba7e4841d36e8387ec612c
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SelectAll <M-A>
$Undo <M-Z>
jdxcode / request.js
Last active Aug 29, 2015
simple node json http request function with promises and no dependencies
View request.js
'use strict';
let http = require('http');
let https = require('https');
let parseUrl = require('url').parse;
function concat (stream, callback) {
var strings = [];
stream.on('data', function (data) {
17twenty /
Created Sep 27, 2013
A Simple Git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

if ! $(psql template1 -c 'SHOW SERVER_ENCODING' | grep -q UTF8); then
psql postgres -c "update pg_database set datallowconn = TRUE where datname = 'template0';"
psql template0 -c "update pg_database set datistemplate = FALSE where datname = 'template1';"
psql template0 -c "drop database template1;"
psql template0 -c "create database template1 with template = template0 encoding = 'UTF8';"
psql template0 -c "update pg_database set datistemplate = TRUE where datname = 'template1';"
psql template1 -c "update pg_database set datallowconn = FALSE where datname = 'template0';"
jdxcode / dickeyxxx.zsh-theme
Created Dec 12, 2012
dickeyxxx zsh theme
View dickeyxxx.zsh-theme
# Example:
# dickeyxxx@dickey-mbp ~/proj/tapjoykc 1.9.3-p194 (routes ✔)
# ✗✗✗
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
geemus /
Created Oct 12, 2011
heroku style guide

TODO empty arrays and/or nil values (see apps:info)

General Guidelines

  • Use full sentences, including punctuation.
  • Labels should be provided where needed in the form of 'Labels labels:'.
  • Commands should have one newline between the header and body and another after the body.
  • Alpha-sort arrays before display and display labeled data in alpha-sorted key order.