Skip to content

Instantly share code, notes, and snippets.

View rud's full-sized avatar

Laust Rud Jacobsen rud

View GitHub Profile
#!/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 -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 merge ${CURRENT}
git push origin master
git checkout ${CURRENT}
#!/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
@rud
rud / chop.sh
Created May 19, 2010 12:43
chop - remove the current branch in git, switch to master
#!/bin/sh -x
set -o errexit
CURRENT_BRANCH=$(git branch | grep '\*')
git checkout ${1:-"master"} || exit 1
git branch -d ${CURRENT_BRANCH:2}

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.