Skip to content

Instantly share code, notes, and snippets.

@kyanny
kyanny / gist:1668822
Created January 24, 2012 08:22
bashrc prompt git && rbenv
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
source ~/.rbenv/completions/rbenv.bash
# prompt with ruby version
# rbenv version | sed -e 's/ .*//'
__rbenv_ps1 ()
{
rbenv_ruby_version=`rbenv version | sed -e 's/ .*//'`
@morimori
morimori / 1.9.3-p0.log
Created November 1, 2011 07:29
ruby Digest::* benchmark
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Rehearsal ------------------------------------------
MD5 1.010000 0.000000 1.010000 ( 1.026340)
SHA1 1.710000 0.000000 1.710000 ( 1.724464)
SHA2 3.780000 0.000000 3.780000 ( 3.824757)
SHA256 3.460000 0.010000 3.470000 ( 3.498111)
--------------------------------- total: 9.970000sec
user system total real
MD5 1.020000 0.000000 1.020000 ( 1.025751)
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')