mkdir proj
cd proj
git init
git config user.name 'username'
=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') |
#!/usr/bin/env PeanutButterJellyTime | |
# ----------------------------------------------------------------------------- | |
# keyword => C equiv (description) | |
# ----------------------------------------------------------------------------- | |
# peanut => ++*ptr (increase value of cell) | |
# PEANUT => ++ptr (move to next cell) | |
# butter => --*ptr (decrease value of cell) | |
# BUTTER => --ptr (move to previous cell) | |
# jelly => putchar(*ptr) (print character value of cell) | |
# JELLY => *ptr=getchar() (store numeric value of char input in cell) |
.DS_Store | |
tmp/ |
# Poor Man's Fiber (API compatible Thread based Fiber implementation for Ruby 1.8) | |
# (c) 2008 Aman Gupta (tmm1) | |
unless defined? Fiber | |
require 'thread' | |
class FiberError < StandardError; end | |
class Fiber | |
def initialize |
def future # :block: | |
thread = Thread.new do | |
Thread.current.abort_on_exception = false | |
yield | |
end | |
lambda { thread.value } | |
end | |
def compose(proc) # :block: |
#### | |
# It must output this: | |
# | |
# hello one two | |
# world one two | |
# | |
class Filter | |
def initialize name | |
@name = name | |
end |