As configured in my dotfiles, here and here.
$ tmux -> start new
$ tmux new -s myname -> start new w/session name
$ tmux a # (or at, or attach) -> attach
$ tmux a -t myname -> attach to named
| require "open-uri" | |
| require "net/http" | |
| Error = Class.new(StandardError) | |
| DOWNLOAD_ERRORS = [ | |
| SocketError, | |
| OpenURI::HTTPError, | |
| RuntimeError, | |
| URI::InvalidURIError, |
| PASSWORD_VALIDATOR = /( # Start of group | |
| (?: # Start of nonmatching group, 4 possible solutions | |
| (?=.*[a-z]) # Must contain one lowercase character | |
| (?=.*[A-Z]) # Must contain one uppercase character | |
| (?=.*\W) # Must contain one non-word character or symbol | |
| | # or... | |
| (?=.*\d) # Must contain one digit from 0-9 | |
| (?=.*[A-Z]) # Must contain one uppercase character | |
| (?=.*\W) # Must contain one non-word character or symbol | |
| | # or... |
| # Goal: Allow addition of instances to a collection in a factory-built object | |
| # when those instances require references to the parent. | |
| # Typically occurs in Rails when one model has_many instances of another | |
| # See more at: | |
| # http://stackoverflow.com/questions/2937326/populating-an-association-with-children-in-factory-girl | |
| # Usage | |
| # Foo has_many :bar | |
| # |
| # A proc is just a block of code that can be called later: | |
| say_hello = -> { 2 + 2 } | |
| say_hello.call # => 4 | |
| # Procs can take parameters: | |
| double = ->(x) { x * 2 } |
| group :test, :development do | |
| gem 'minitest-rails', | |
| :git => "[email protected]/rawongithub/minitest-rails.git", | |
| :branch => "gemspec" | |
| end | |
| group :test do | |
| gem 'minitest-rails-shoulda', | |
| :git => "[email protected]/rawongithub/minitest-rails-shoulda.git" | |
| gem 'capybara_minitest_spec' | |
| end |
| #!/usr/bin/env ruby | |
| require 'test/unit' | |
| class TestSums < Test::Unit::TestCase | |
| def setup | |
| @a = [2, 5, 18, 27] | |
| @sum = 0 | |
| end |
| git log -1 | grep "commit .*" | ruby -e "print ARGF.read.split(' ')[1]" | pbcopy |