Skip to content

Instantly share code, notes, and snippets.

View rud's full-sized avatar

Laust Rud Jacobsen rud

View GitHub Profile
### Keybase proof
I hereby claim:
* I am rud on github.
* I am rud (https://keybase.io/rud) on keybase.
* I have a public key whose fingerprint is 2949 8980 F3BE 3D8F FC0B E75D 3E50 71F8 6896 12B4
To claim this, I am signing this object:
#!/bin/sh -x
# Exit if any error is encountered:
set -o errexit
# git name-rev is fail
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull --rebase origin master
git checkout ${CURRENT}
git rebase master
#!/bin/sh
NEW_BASE=${1?"Usage: $0 <treeish>"}
git branch --force reviewed $NEW_BASE || exit 1
echo Marked as reviewed: `git rev-parse --short reviewed`
@rud
rud / findrvm.sh
Created November 13, 2009 08:23 — forked from careo/findrvm.sh
# NOTE: to use, you'll also need to place something like this in your precmd function:
# findrvm $PWD
# recursively search parent directories to see if there's a .rvm file
findrvm () {
if [[ -f "$1/.rvm" ]]; then
current_rvm=`basename $GEM_HOME`
dot_rvm=`cat $1/.rvm`
if [[ dot_rvm != current_rvm ]]; then #cat $1/.rvm
rvm `cat $1/.rvm`
@rud
rud / watchr-runner.rb
Created February 8, 2010 14:17
watchr for rspec
if __FILE__ == $0
puts "Run with: watchr #{__FILE__}. \n\nRequired gems: watchr rev"
exit 1
end
# --------------------------------------------------
# Convenience Methods
# --------------------------------------------------
def run(cmd)
puts(cmd)
@rud
rud / seed-fu-writer-sample.rb
Created February 8, 2010 14:41
seed-fu SeedOnce writer example
require 'seed-fu/writer'
def write_seed_file output_file
writer = SeedFu::Writer::SeedOnce.new(
:seed_file => output_file,
:seed_model => User,
:seed_by => [:email],
:quiet => true
)
User.find_each do |user|
@rud
rud / immediate_feedback_formatter_growl.rb
Created February 26, 2010 08:26
ImmediateFeedbackFormatterGrowl
require 'spec/runner/formatter/base_text_formatter'
# Code is based on standard SpecdocFormatter, but will print full error details as soon as they are found.
# Successful or pending examples are written only as a dot in the output. Header is only printed if errors occur.
#
# To use it, add the following to your spec/spec.opts:
# --require
# spec/support/rspec_immediate_feedback_formatter_growl.rb
# --format
# Spec::Runner::Formatter::ImmediateFeedbackFormatterGrowl

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

# rubygems DNS is temporarily down, put this into your /etc/hosts to install gems,
# but don't forget to remove the entries once their DNS is back up again
72.4.120.124 rubygems.org
207.171.181.231 production.s3.rubygems.org
216.137.45.24 production.cf.rubygems.org