Skip to content

Instantly share code, notes, and snippets.

View iancanderson's full-sized avatar
😄
things!

Ian C. Anderson iancanderson

😄
things!
View GitHub Profile
@repeatingbeats
repeatingbeats / nodeunit_example.js
Created January 27, 2011 20:07
Example structure for nodeunit tests with nested groups and setUp/tearDown functions
/**
* Example structure for nodeunit tests with nested groups and setup/teardown
* functions. Run | nodeunit nodeunit_example.js | to see a printout of
* function names in the order that they are called. There aren't any actual
* tests here.
*/
process.env.NODE_ENV = 'test';
var testCase = require('nodeunit').testCase;
@felixhummel
felixhummel / rake.sh
Created March 29, 2011 12:08 — forked from turadg/rake.sh
# bash completion for rake
#
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw
#
# For details and discussion
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/
#
# INSTALL
#
@fidothe
fidothe / gist:894327
Created March 30, 2011 12:49
If you want to use gem pristine with RVM gemsets after ditching MacPorts for Homebrew to recompile native gems:
# If you want to use gem pristine with RVM gemsets after ditching MacPorts for Homebrew
# in order to recompile native gems you need to exclude things in the global gemset
# probably rake, bundler, maybe rdoc
gem list --no-versions | grep -v bundler | grep -v rake | xargs -n1 gem pristine
@jhsu
jhsu / instructions.markdown
Created March 15, 2012 20:45
mac os x ctags

ctags tips

Install ctags

brew install ctags-exuberant

Index tags

While in the root of the project

git-hub

This script opens a url to the github commit page

Install

add to a folder in $PATH (ie, /usr/local/bin, or if you have ~/bin part of your path). If the current branch is tracking a remote branch that is on github:

git hub # outputs the url to the most recent commit and opens it in default browser (if the commit has been pushed)

git hub -2 # opens the url to the 2nd most recent commit

/usr/local/bin/ctags --exclude=.git --exclude=log -R * ~/.rvm/gems/`rvm current`/*
@wheresalice
wheresalice / dotcloud_build.yml
Created April 4, 2011 14:34
Tech demo of Faye/NodeJS/Jade pubsub
www:
requirements:
- faye
- jade
@bricker
bricker / 2012073001_rails_dbsync.mdown
Created July 30, 2012 22:08
Rails: Synchronizing your development database with your production database using Rake tasks

Rails: Synchronizing your development database with your production database using Rake tasks

July 30, 2012

If you run an active website with lots of new content every day, it's often helpful to keep your local database up-to-date with your production database, so when you're working on the application locally you're working with fresh content.

Here are a couple rake tasks that you can copy-and-paste into your local Rails application which will make this syncing process a one-step process.

@BaseCase
BaseCase / gist:2139106
Created March 20, 2012 18:17
A sample Cakefile
{exec} = require 'child_process'
task 'test', 'Runs all Jasmine specs in spec/ folder', ->
test()
task 'compile', 'Compiles coffee in src/ to js in bin/', ->
compile()
task 'stitch', 'Stitches all app .js files', ->
@bfleischer
bfleischer / build.sh
Created July 22, 2011 20:14
Workaround for NTFS-3G and Lion's CoreFoundation bug
#!/bin/sh -x
# These variables are always passed to build.sh
DIST_DIR="$1"
TMP_DIR="$2"
ROOT_DIR="$3"
PROJNAME="fuse_wait"
DESTDIR="usr/local/bin"