Skip to content

Instantly share code, notes, and snippets.

View jakehow's full-sized avatar

Jake Howerton jakehow

View GitHub Profile
>> cx.class
=> Mysql
>> my.class
=> Mysql
>> my.query(sql)
=> #<Mysql::Result:0x2adfbf80ea48>
>> cx.query(sql)
Mysql::Error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
from (irb):41:in `query'
from (irb):41
+------------------------------------------------------+
| date | total_boxes | available_boxes |
+------------------------------------------------------+
| 2008-11-01 | 392 | 0 |
| 2008-10-01 | 392 | 0 |
| 2008-09-01 | 392 | 0 |
| 2008-08-01 | 392 | 0 |
| 2008-07-01 | 392 | 0 |
| 2008-06-01 | 392 | 0 |
| 2008-05-01 | 384 | 4 |
class Array
def flatten
each_with_index do |object, index|
if object.kind_of?(Array)
delete_at(index)
insert(index, *object.flatten)
end
end
end
end
Story: Creating an account
As an anonymous user
I want to be able to create an account
So that I can be one of the cool kids
Scenario: Anonymous user can not start creating an account
Given an anonymous user
When she goes to /users/new
Then she should be redirected to 'http://www.example.com/session/new'
#!/bin/bash
# Inspired by http://blog.fiveruns.com/2008/9/24/rails-automation-at-slicehost
apt-get update
apt-get upgrade -y
apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev
apt-get -y install mysql-server libmysqlclient15-dev mysql-client
apt-get -y install ruby ruby1.8-dev irb ri rdoc libopenssl-ruby1.8
RUBYGEMS="rubygems-1.3.0"
require 'rubygems'
require 'atom'
require 'gcalendar'
require 'net/https'
require 'uri'
LAST_CHECKED = Time.now - 36000
HIGHRISE_URL = 'x.highrisehq.com' #set this to your url
class Meeting
module Watir
class Safari
def url
scripter.url
end
end
class AppleScripter
def url
@document.URL.get
desc "Discover previous revision"
task :set_previous_revision do
previous_revision = ""
run "tail -2 #{deploy_to}/revisions.log" do |ch, stream, out|
previous_revision = out.split[3]
end
set :previous_revision, previous_revision
end
desc "Send release notes for latest revision via Basecamp"