Skip to content

Instantly share code, notes, and snippets.

View st23am's full-sized avatar

James Smith st23am

  • Adobe / Frame.io
  • Cincinnati
  • X @st23am
View GitHub Profile
@st23am
st23am / 0-readme.md
Created September 11, 2012 00:34 — forked from burke/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p194 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@st23am
st23am / gist:2937073
Created June 15, 2012 15:35
Git branch parsing
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
@st23am
st23am / Turtle Commands
Created May 2, 2012 16:09
Turtle Commands
def I[ forward 30
pen
turn 180
forward 15
pen
turn 90
forward 30
turn 90
forward 15
turn 180
@st23am
st23am / cukeit
Created April 18, 2012 20:52
Cukeit
alias cukeit='rm -f tmp/capybara/* && cucumber -p wip'
alias pukeit='rm -f tmp/capybara/* && cucumber -p wip && open tmp/capybara/*'
@st23am
st23am / urinal_etiquette.rb
Created February 21, 2012 23:18
Test Problem
# Post your solution here
@st23am
st23am / multiple_static_dirs.coffee
Created January 24, 2012 23:40
Serve multiple directions of static assets in node.js with express
express = require('express')
app = module.exports = express.createServer()
app.configure('development', ->
app.use(express.static("./public"))
app.use('/test', express.static("./test/public"))
#serve up specs.js when were in development for jasmine dom tests in the browser
app.get(hem.options.specsPath, hem.specsPackage().createServer())
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
)
@st23am
st23am / gist:1262850
Created October 4, 2011 21:23
Toggle highlight search
" Toggle search results with spacebar
map <Space> :set hlsearch!<cr>
@st23am
st23am / .vimrc
Created July 27, 2011 03:54
Vimrc after lion
call pathogen#runtime_append_all_bundles()
set nocompatible
set hidden
set tabstop=4
set softtabstop=4
set expandtab
set cursorline
let mapleader = ","
@st23am
st23am / fix Bundle Exec pain
Created June 20, 2011 15:13
No longer have to be/bundle exec
### In Terminal cd into project dir ####
bundle install --binstubs # Creates a bin folder with all your project binaries
### .rvmrc ###
export PATH=./bin:${PATH//:\.\/bin:}
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '