Skip to content

Instantly share code, notes, and snippets.

View bkeepers's full-sized avatar

Brandon Keepers bkeepers

View GitHub Profile
PLUGINS = {
'rspec' => 'git://github.com/dchelimsky/rspec.git',
'rspec-rails' => 'git://github.com/dchelimsky/rspec-rails.git',
'rspec-on-rails-matchers' => 'git://github.com/brandon/rspec-on-rails-matchers.git',
'awesomeness' => 'git://github.com/collectiveidea/awesomeness.git',
'awesome-backup' => 'git://github.com/collectiveidea/awesome-backup.git',
'exception_notification' => 'git://github.com/collectiveidea/exception_notification.git',
'action_mailer_optional_tls' => 'git://github.com/collectiveidea/action_mailer_optional_tls.git',
'cucumber' => 'git://github.com/aslakhellesoy/cucumber.git',
'webrat' => 'git://github.com/brynary/webrat.git',
set :scm, :git
set :branch, 'master'
set :git_enable_submodules, true
set :ssh_options, {:forward_agent => true}
desc "mod_rails restart"
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
@bkeepers
bkeepers / .git-completion.sh
Created May 27, 2009 13:35
Bash completion for Git
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
@bkeepers
bkeepers / .profile
Created May 27, 2009 13:43
Bash completion for Rake
complete -C ~/.rake_completion -o default rake
@bkeepers
bkeepers / gist:126457
Created June 9, 2009 12:36
Installing Git and gitjour
# Mac
1. Install MacPorts
2. $ port install git-core
3. $ gem install gitjour
# Windows:
1. Install git: http://code.google.com/p/msysgit/
2. $ gem sources --add http://gems.github.com
@bkeepers
bkeepers / application.html.erb
Created June 9, 2009 19:11
Initial layout and stylesheets for Idea Foundry example app
<!DOCTYPE html>
<html lang="en">
<head>
<title>eHarbor</title>
<%= stylesheet_link_tag 'boilerplate', 'main' %>
</head>
<body>
<div id="main">
<header>
<h1>
@bkeepers
bkeepers / .autotest
Created June 13, 2009 13:42
.autotest
require 'redgreen/autotest'
require 'autotest/growl'
require 'autotest/fsevent'
Autotest.add_hook :initialize do |autotest|
%w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
false
end
@bkeepers
bkeepers / gist:132611
Created June 19, 2009 13:24 — forked from defunkt/gist:132456
open new shells in the most recently visited directory
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
#
# Put this in your .bashrc or whatever.
pathed_cd () {
if [ "$1" == "" ]; then
cd
else
@bkeepers
bkeepers / .profile
Created June 19, 2009 13:41
Split bash profile into multiple files
# My ~/.profile file was getting too messy and unmaintainable, so I
# split everything out into separate files and sourced them
for file in ~/.profile.d/*
do
source $file
done
@bkeepers
bkeepers / snippet.rb
Created July 3, 2009 13:46
Command to keep cloned TextMate bundles up to date
#!/usr/bin/env ruby
home = File.expand_path('~')
Dir["#{home}/Library/Application Support/TextMate{,/Pristine Copy}/Bundles/*/.git"].each do |bundle|
dir = bundle.gsub(/\.git/, '')
puts "Updating #{File.basename(dir)}"
Dir.chdir(dir) { `git pull` }
end