Skip to content

Instantly share code, notes, and snippets.

View zeke's full-sized avatar
🍊
Busy! @-message me directly if I'm slow to respond.

Zeke Sikelianos zeke

🍊
Busy! @-message me directly if I'm slow to respond.
View GitHub Profile

Copyright (c) 2014 Jonathan Clem

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@zeke
zeke / jshintrc.js
Created June 23, 2014 22:33
My ~/.jshintrc (save it without the js extension)
{
// Settings
"passfail" : true, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : true,
"rhino" : false,
@zeke
zeke / postgres
Created July 2, 2014 20:24 — forked from will/postgres
git clone https://github.com/postgres/postgres.git && cd postgres
./configure --prefix=/tmp/postgres --with-openssl --with-ossp-uuid --with-libs=/usr/local/opt/readline/lib/ --with-includes=/usr/local/opt/readline/include/
# skip the readline parts if you dont have readline installed but it makes `psql` better
make -sj8
make install
/tmp/postgres/bin/initdb /tmp/postgres/data
@zeke
zeke / app.json-prior-art.md
Created July 24, 2014 16:17
Research into existing manifest formats

Prior Art

Fig

Fast, isolated development environments using Docker.

Fig allows you to define your app's environment with Docker so it can be reproduced anywhere. A set of services is defined using fig.yml

@zeke
zeke / index.js
Created September 1, 2014 04:19
requirebin sketch
var fs = require("brfs");
var shuffle = require("array-shuffle")
var wordListPath = require("word-list");
var words = fs.readFileSync(wordListPath, "utf8").split("\n");
var n = shuffle(words.filter(function(word) { return !!word.match(/^n/i) }))
var p = shuffle(words.filter(function(word) { return !!word.match(/^p/i) }))
var m = shuffle(words.filter(function(word) { return !!word.match(/^m/i) }))
for (var i=0; i<10; i++) {
@zeke
zeke / index.js
Created September 1, 2014 22:24
requirebin sketch
var shuffle = require("array-shuffle")
var words = require("an-array-of-english-words")
var n = shuffle(words.filter(function(word) { return !!word.match(/^n/i) }))
var p = shuffle(words.filter(function(word) { return !!word.match(/^p/i) }))
var m = shuffle(words.filter(function(word) { return !!word.match(/^m/i) }))
for (var i=0; i<10; i++) {
console.log([n[i], p[i], m[i]].join(" "))
}
# The -n flag tells curl to look for your github credentials in ~/.netrc
curl -n https://api.github.com/repos/zeke
# Install a crazy JSON-parsing CLI
# Docs at http://trentm.com/json
npm i -g json
# Extract repo names from JSON responses
curl -n https://api.github.com/orgs/npm/repos | json -a name
@zeke
zeke / index.js
Last active August 29, 2015 14:09
requirebin sketch
var parse = require("ua-parser-js")
console.log(parse(navigator.userAgent).os)
document.write(JSON.stringify(parse(navigator.userAgent).os, null, 2))
npm () {
if [ "$1" = "publish" ]; then
dependency-check . && $(which npm) "$@"
else
$(which npm) "$@"
fi
}
redis-url* tests » npm t
> redis-url@0.3.1 test /Users/z/forks/redis-url
> tape test
TAP version 13
# redis-url
ok 1 foo should equal bar
ok 2 should be equal
handles [ { _connecting: false,