Skip to content

Instantly share code, notes, and snippets.

View jhenry's full-sized avatar

Justin Henry jhenry

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@netzpirat
netzpirat / 0_README.md
Created November 12, 2010 10:42
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@dpickett
dpickett / tmux_textaurant.sh
Created December 1, 2010 15:31
scripted way to start your work in a Rails project
export WORKING_DIR=~/work/textaurant
cd $WORKING_DIR; mvim; gitx
tmux start-server
tmux new-session -d -s Textaurant -n work
tmux new-window -tTextaurant:1 -n server
tmux new-window -tTextaurant:2 -n test
tmux send-keys -tTextaurant:0 'cd $WORKING_DIR' C-m
%w[address_1 city state zip_code].each do |attr|
validates_presence_of attr, unless: ->(org) { org.send(attr).nil? }
end
@duien
duien / gist:817421
Created February 8, 2011 22:33
Mongo Atlanta Notes

Tweet photo with #mongoatl to win!
Fur bus will shuttle back & forth to after-party, where there are 2 free drinks

Building an application with MongoDB

Will cover:

  • Data modeling, queries, geospacial, updates, map-reduce
  • Using location-based app as an example
@seancoyne
seancoyne / iChatGrowl.applescript
Created August 11, 2011 21:52
Applescript for iChat Growl (1.2.2) Notiifications
on notify_growl(theName, theTitle, theDescription, theImage)
tell application "GrowlHelperApp"
notify with name theName title theTitle description theDescription application name "iChat" image theImage
end tell
end notify_growl
using terms from application "iChat"
@lmarburger
lmarburger / config.ru
Created August 30, 2011 03:38
Hack Showoff to remotely drive presentation
require "showoff"
require 'pusher'
Pusher.app_id = 'insert Pusher app id here'
Pusher.key = 'insert Pusher key here'
Pusher.secret = 'insert Pusher secret here'
class PresentationController
def initialize(app)
@app = app
@semperos
semperos / rspec-sinatra-modular.rb
Created April 20, 2012 17:21
Sinatra RSpec modular app
# Spec File 1
def app
FooApp
end
describe FooApp do
# for some reason, `app` resolves to the definition BarApp given in Spec File 2 below,
# instead of the above definition
...
end
@jonleung
jonleung / .sh
Created July 8, 2012 19:35
Extract Wunderlist DB
cd ~/Library/Wunderlist; sqlite3 -csv -header wunderlist.db "select * from tasks left join lists on tasks.list_id=lists.id;" > wunderlist_export.csv
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

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.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.