Skip to content

Instantly share code, notes, and snippets.

// app/assets/stylesheets/active_admin.css.scss.erb
// Don't forget to add the .erb extension (active_admin:install doesn't)
// Active Admin CSS Styles
@import "active_admin/mixins";
@import "active_admin/base";
// To customize the Active Admin interfaces, add your
// styles here:
GIT
remote: git://github.com/TwP/turn.git
revision: 7a698227ed21427b6bd2be961870303c9d675183
specs:
turn (0.8.2.1)
ansi (>= 1.2.2)
GIT
remote: git://github.com/binarylogic/authlogic.git
revision: 0297e1c005c626c1e37bcc1de5f347476c838ed0
# Restart unicorn through RVM to allow for ruby interpreter version upgrades
rvm_shell = '/home/deploy/.rvm/bin/rvm-shell'
unicorn_args = Unicorn::HttpServer::START_CTX[:argv].join(' ')
shell_args = [ '-c', "cd /u/apps/innerfence/current && exec bundle exec unicorn #{unicorn_args}" ]
Unicorn::HttpServer::START_CTX[0] = rvm_shell
Unicorn::HttpServer::START_CTX[:argv] = shell_args
# Scrub the environment
before_exec do |server|
ENV.delete_if { |k| k.starts_with? 'BUNDLE' }
@rdj
rdj / deploy.rb
Created September 13, 2011 01:01
check bundler version when deploying to make sure you're not deploying with old cap recipes
# You could hard-code this, but we keep the current bundler version
# everybody is supposed to use in a default.gems file. So you can
#
# rvm gemset empty
# rvm gemset import
# bundle install --local
#
# And you're in a known good state.
expected_bunder_version = File.read( File.join( File.dirname( __FILE__ ), '..', 'default.gems' ) ).match( 'bundler -v(\S+)' )[1]
if Bundler::VERSION != expected_bunder_version
[alias]
st = status -s
log1 = log --format=oneline
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
d = diff --color-words
sh = show --color-words
up = "!rdj_git_up() { if [[ -z `git status --porcelain` ]]; then local back=$(git name-rev --name-only HEAD); echo ======== fetch origin ========; git fetch origin && git remote prune origin && for r in devel master; do echo ======== fast-forward $r ========; git checkout $r && git merge --ff-only origin/$r; done && now=$(git name-rev --name-only HEAD); [[ $now != $back ]] && echo ======== checkout $back ======== && git checkout $back; else echo Repo is not clean; fi }; rdj_git_up"
@rdj
rdj / .bashrc
Created October 15, 2011 20:05
function xo {
rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
TERMCAP= open -a `xcode-select -print-path`/Applications/Xcode.app *.xcodeproj
}
@rdj
rdj / update-ip
Created October 24, 2011 22:47
Dynamic DNS with Zerigo and a cron job
#!/bin/bash
# Run `crontab -e` and add this line:
# */1 * * * * /Users/youraccount/bin/update-ip
# Enable API access under Zerigo's DNS / Preferences / API Access and Dynamic Updates
# Then get your API key from that same page after you save the form.
ZERIGO_HOSTNAME=host.example.com
ZERIGO_USERNAME=email%40gmail.com
$ brew edit pianobar
diff --git a/Library/Formula/pianobar.rb b/Library/Formula/pianobar.rb
index cae4571..e32a4e5 100644
--- a/Library/Formula/pianobar.rb
+++ b/Library/Formula/pianobar.rb
@@ -6,7 +6,7 @@ class Pianobar < Formula
homepage 'https://github.com/PromyLOPh/pianobar/'
md5 ''
- head 'https://github.com/PromyLOPh/pianobar.git'
@rdj
rdj / .bashrc
Created November 20, 2011 19:32
# grep recursive, skipping source control
function g {
find . -name .svn -prune -and -false -o -name .git -prune -and -false -o -type f -and -print0 | xargs -0 egrep --color=auto "$@"
}
startup_message off
defscrollback 3000
bind s # remove the flow control garbage
msgwait 1
escape ^Jj
term screen-256color
bindkey -d -k kb stuff "\010"