Skip to content

Instantly share code, notes, and snippets.

@johnmdonahue
johnmdonahue / lint-fail1.js
Created March 8, 2012 02:01
Attempts to add args to spawned jshint process
module.exports = function (files) {
var args = files && files.length > 0 ? files : ["."],
spawn = require('child_process').spawn,
cmd = spawn("jshint", args.concat(["--config .jshintrc", "--show-non-errors"]));
function write(data) {
process.stdout.write(new Buffer(data).toString("utf-8"));
}
cmd.stdout.on('data', write);
@johnmdonahue
johnmdonahue / Jakefile.js
Created March 7, 2012 22:49
EpicEditor Jakefile - Not a working/complete version.
// This is a broken Jakefile to build epiceditor
var fs = require('fs')
, path = require('path')
, spawn = require('child_process').spawn
, exec = require('child_process').exec
, epicAscii = '' +
' \n' +
' ______ _ ______ ___ __ \n' +
' / ____/___ (_)____/ ____/___/ (_) /_____ _____ \n' +
@johnmdonahue
johnmdonahue / gist:1962921
Created March 3, 2012 00:35
Ubuntu MySQL install
sudo apt-get install mysql-server-5.1
@johnmdonahue
johnmdonahue / gist:1928225
Created February 28, 2012 00:52
Quick Redis Install
$ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
$ tar xzf redis-2.4.8.tar.gz
$ cd redis-2.4.8
$ make
# Start the server
$ src/redis-server
@johnmdonahue
johnmdonahue / gist:1904781
Created February 25, 2012 00:10
Quick Rbenv, Ruby and Rails setup
$ cd
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
# Add the following to your .bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Install ruby-build
$ mkdir -p ~/.rbenv/plugins
$ cd ~/.rbenv/plugins
@johnmdonahue
johnmdonahue / gist:1855410
Created February 17, 2012 20:58
PS1 git_branch w/o git_completion
function git_branch_name {
val=`git branch 2>/dev/null | grep '^*' | colrm 1 2`
echo "$val"
}
function parse_git_branch {
val=`git_branch_name | sed 's_\(.*\)_(\1)_'`
echo "$val"
}
@johnmdonahue
johnmdonahue / gist:1842698
Created February 16, 2012 06:38
Redis Git Install Mac
git clone git://github.com/antirez/redis.git && cd redis
git checkout v2.0.4-stable
sudo make install
@johnmdonahue
johnmdonahue / gist:1842561
Created February 16, 2012 06:08
Quick Node Install from GitHub
$ sudo apt-get update
$ sudo apt-get install git-core curl build-essential openssl libssl-dev
# node
$ git clone git://github.com/joyent/node.git && cd node
$ git checkout v0.6.17
$ ./configure
$ make
$ sudo make install
# [email protected] OK:
jmd@mba ~/projects/test $ npm install [email protected]
npm http GET https://registry.npmjs.org/vows/0.6.0
npm http 304 https://registry.npmjs.org/vows/0.6.0
npm http GET https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/eyes
npm WARN [email protected] dependencies field should be hash of <name>:<version-range> pairs
[email protected] ./node_modules/vows
└── [email protected]
@johnmdonahue
johnmdonahue / gist:1641998
Created January 19, 2012 19:31
Flatiron Create Issue
~/code/test/ $ which flatiron
/usr/local/bin/flatiron
~/code/test/ $ flatiron create testApp
help: flatiron
help:
help: create - Creates an empty template for a flatiron application
help:
help: