Public Gists by samg

Gravatar
Sun Nov 15 22:15:03 -0800 2009
1
2
3
function! BDD(args)
 if bufname("%") =~ "test.rb"
   call RunTest(a:args)
Gravatar
Thu Oct 29 12:22:16 -0700 2009
1
2
3
# put this in your .bashrc or .profile
function parse_git_dirty {
  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
Gravatar
Sun Oct 11 10:34:02 -0700 2009
1
2
3
// ==UserScript==
// @name login
// @namespace http://fluidapp.com
Gravatar
Fri Oct 09 17:38:39 -0700 2009
1
2
3
#!/usr/bin/env ruby
#
# Git pre-commit hook:
Gravatar
Thu Aug 27 10:37:50 -0700 2009
1
2
3
" Execute open rspec buffer
" Thanks to Ian Smith-Heisters
function! RunSpec(args)
Gravatar
Wed Jul 01 11:02:37 -0700 2009
1
2
# Use local mail server
config.action_mailer.delivery_method = :sendmail
Gravatar
Mon Jun 22 09:47:26 -0700 2009
1
2
3
  # Check for maintenance file and redirect all requests
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
Gravatar
Tue Jun 16 21:49:04 -0700 2009
1
2
3
// Search hint
$($('#q')[0]).addClass('search-hint');
$($('#q')[0]).val('Search');
Gravatar
Tue Jun 16 21:47:27 -0700 2009
1
2
3
$().ready(function(){
  // Instant Search
  $('#q').keyup(function(){
Gravatar
Wed May 27 14:26:30 -0700 2009
1
udo apt-get install screen vim git-core mysql-server libmysqlclient15-dev build-essential libssl-dev libreadline5-dev zlib1g-dev ruby-full rubygems libtiff4 ghostscript liblcms1 libexif12 libxml2 zlib1g bzip2 imagemagick libmagick9-dev postfix apache2 libapache2-mod-passenger sqlite3 libsqlite3-dev
Gravatar
Mon May 25 18:53:55 -0700 2009
1
2
3
/*
 * Scale all textareas dynamically on the page
 * Requires JQuery
Gravatar
Wed May 06 13:44:23 -0700 2009
1
2
3
* keep people working on internal projects, assign and schedule the work
  * dont look desperate, dont have immediate availability
  * can tell a client you can 'shuffle internal projects' to accomodate them
Gravatar
Tue Apr 28 12:13:56 -0700 2009
1
2
3
# == a smarter way to pluralize
#
# Accepts an integer as an optional argument
Gravatar
Thu Apr 23 14:22:21 -0700 2009
1
2
3
require 'open3'
 
describe 'my_script' do
Gravatar
Tue Apr 21 12:53:58 -0700 2009
1
2
3
/*
 * Scale all textareas dynamically on the page
 * Requires Prototype