I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
source :rubygems | |
gem 'sinatra' | |
gem 'json' | |
gem 'omniauth' | |
gem 'omniauth-oauth2' | |
gem 'omniauth-github' | |
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__) | |
gem 'thin' |
# 1. grab http://sveinbjorn.org/platypus | |
# 2. brew install s3cmd | |
# 3. setup your ~/.s3cfg | |
# 4. drop this shell script in a file and then run platypus | |
UUID=`uuidgen` | |
FILENAME="$UUID.png" | |
/usr/local/bin/s3cmd put "$1" s3://klowd/$FILENAME | |
REMOTE="http://s3.amazonaws.com/klowd/$FILENAME" | |
echo $REMOTE | pbcopy |
# normal Gem dependancy declarations | |
# ... | |
group :test, :cucumber do | |
gem 'pdf-reader' | |
end |
=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 ruby | |
require 'em-proxy' | |
Proxy.start(:host => "0.0.0.0", :port => 9201, :debug => false) do |conn| | |
conn.server :srv, :host => "127.0.0.1", :port => 9200 | |
conn.on_data do |data| | |
puts data | |
data |
$.holdReady(true); | |
var imgNum = 0; | |
$('img.loadImg').load(function(){ | |
if($(this).height()>1){ | |
imgNum+=1; | |
if(imgNum==6){ | |
$.holdReady(false); | |
} | |
} | |
}); |
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
describe 'Modal' do | |
should 'display login errors' do | |
visit root_path | |
click_link 'My HomeMarks' | |
within '#login_area' do | |
fill_in 'email', with: 'will@not.work' | |
fill_in 'password', with: 'test' |
# CLOSURES IN RUBY Paul Cantrell http://innig.net | |
# Email: username "cantrell", domain name "pobox.com" | |
# I recommend executing this file, then reading it alongside its output. | |
# | |
# Alteratively, you can give yourself a sort of Ruby test by deleting all the comments, | |
# then trying to guess the output of the code! | |
# A closure is a block of code which meets three criteria: | |
# |
ừ̴̵̶̷̸̡̢̧̨̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣ͘͜͟͢͝͞͠͡ |