Skip to content

Instantly share code, notes, and snippets.

View rud's full-sized avatar

Laust Rud Jacobsen rud

View GitHub Profile
@rud
rud / z_airbrake.rb
Created April 18, 2018 07:18 — forked from 2called-chaos/z_airbrake.rb
Airbrake 6.3 config
Airbrake.configure do |config|
# project specific
config.project_key = ''
# use git SHA & current commit as app version
config.app_version = "Ruby: #{RUBY_VERSION} » Rails: #{Rails::VERSION::STRING} » " << `cd #{Rails.root} && git log -1 --pretty="%h - %B" HEAD`
# can always be 1
config.project_id = 1
@rud
rud / vol
Created November 12, 2012 10:41 — forked from bjensen/vol
open the newest file of a directory in $EDITOR
# --------------------------------------------------------
# vol as a shell script
# --------------------------------------------------------
# You would put this code in a directory that's in your
# path, like ~/bin (PATH=~/bin:$PATH in your .bashrc to
# add a directory like that to your path.)
# The invokation syntax is the same as that of the
# function.
# --------------------------------------------------------
# Example usage:
@rud
rud / vol
Created November 12, 2012 10:41 — forked from bjensen/vol
open the newest file of a directory in vim
# --------------------------------------------------------
# vol as a shell script
# --------------------------------------------------------
# You would put this code in a directory that's in your
# path, like ~/bin (PATH=~/bin:$PATH in your .bashrc to
# add a directory like that to your path.)
# The invokation syntax is the same as that of the
# function.
# --------------------------------------------------------
# Example usage:
# 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

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.

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.

@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`
#!/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 -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