Skip to content

Instantly share code, notes, and snippets.

View base10's full-sized avatar

Nathan L. Walls base10

View GitHub Profile
@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')
@ryanflorence
ryanflorence / post-receive.rb
Created July 16, 2010 20:03
Ruby Git post-receive hook to parse out the stdin and assign them to variables
#!/usr/bin/env ruby
# figure out which repository this is
# assumes it's a bare repository
repository = /([^\/]*?)\.git$/.match(`pwd`.chomp)[1]
# get the stdins from git
stdins = []; stdins << $_ while gets
stdins.each do |str|
@gruber
gruber / gist:647224
Created October 26, 2010 16:26 — forked from dpk/gist:646570
Slight tweaks to dpkendal's script. Gives the BBEdit document a name (rather than "untitled <integer>", and skips the \n to \r stuff, which I don't think is necessary in recent versions of BBEdit.
tell application "Safari"
set _source to do JavaScript "window.document.documentElement.outerHTML" in document 1
set _name to name of document 1
end tell
tell application "BBEdit"
make new text window with properties ¬
{contents:_source, source language:"HTML", name:"Generated source: " & _name}
select insertion point before character 1 of text window 1
@ryanb
ryanb / favorite_gems.md
Created March 4, 2011 17:31
A list of my favorite gems for various tasks.
@ryanb
ryanb / rails_3_1_rc4_changes.md
Created May 6, 2011 01:10
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 RC4

  • The new rake task assets:clean removes precompiled assets. [fxn]

  • Application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle. [fxn]

  • Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]

  • Template generation for jdbcpostgresql #jruby [Vishnu Atrai]

@jyurek
jyurek / .bashrc
Created May 19, 2011 19:17
A bash prompt with useful information, including popping up a growl notification when commands are done.
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo '✏ '
}
function parse_git_branch {
git branch --no-color 2> /dev/null | grep \* | awk '{print $2}'
}
function parse_hg_branch {
hg branch 2>/dev/null
@jasonrudolph
jasonrudolph / about.md
Last active May 14, 2024 16:36
Programming Achievements: How to Level Up as a Developer
@invalidusrname
invalidusrname / confreaks_curl.bash
Created September 7, 2011 02:21
Grab all available videos from confreaks
curl -s http://confreaks.com/events/rubyconf2012 | grep "/videos/" | cut -d '"' -f 2 | while read url; do curl -s "http://confreaks.com$url" | grep "large.mp4?" | grep -v "xtra" | cut -d '"' -f 2 >> /tmp/cf-vids.txt; done; cat /tmp/cf-vids.txt | uniq
@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@Zettt
Zettt / Add to Reading List.applescript
Created October 7, 2012 14:37
Add links from Mail to Safari Reading List
(*
Add to Reading List
Script for Apple Mail to find http and https links in emails and add them to Safari's Reading List automatically.
Best practice: setup with "any recipient contains '+reading'". Actions "mark as read", "execute AppleScript", "delete message", "stop evaluating rules"
Created by Andreas Zeitler on 2012-10-07
Mac OS X Screencasts. www.macosxscreencasts.com
*)