Skip to content

Instantly share code, notes, and snippets.

View johnreilly's full-sized avatar

John Reilly johnreilly

View GitHub Profile
# Say we're both working on the same project, and I've just created
# a new branch for my cool new feature and pushed it up to my
# github-hosted repo on a branch called "feature".
# Inside your local copy of the repo:
# create a new remote called "johnreilly" for the repo located at github
git remote add johnreilly git://github.com/johnreilly/project.git
# create and checkout a new tracking branch based on mine
Feature: Manage people
In order to keep track of the people involved with the station
A station manager
Should be able to manage several people
Scenario: Register new people
Given I am on the new person page
When I fill in "First Name" with "John"
And I fill in "Last Name" with "Reilly"
And I press "Create"
[2008-11-27: REVISION 1496]
[CHANGED] Makefile bundle: The “Make” bundle's run command is now far more general: No longer scope targeted to makefiles, so it can be invoked from any context. The key equivalent is moved to ⌘B. Set make flags with the environment variable TM_MAKE_FLAGS. Set the target with TM_MAKE_TARGET. If TM_MAKE_TARGET is unset, the default target is made. (Alex Ross)
[NEW] The "$DIALOG" command now allows showing tooltips, filter-as-you-type popup menus, and more. Documentation will follow shortly.
[NEW] Applescript, C/C++, Groovy, IO, Java, Perl, Python, Ruby, Scheme, and ShellScript: New “Run” commands (⌘R) using Executor (lib). This amongst others allow the program to read from stdin and TextMate will show an input requester plus the program (document) does not need to be saved on disk to be runnable (Luke Daley and Alex Ross).
[CHANGED] The bundle item disambiguation menu now require the command key to be used with the number shortcuts assigned to the 10 first items.
Subqueries are handled differently in sqlite3 and mysql?
Rails generates the same SQL, databases return different results.
Using sqlite3:
----------------
>> Person.count
SQL (0.2ms) SELECT count(*) AS count_all FROM "people"
=> 2
51ea2a120343f32750f4a4ca98ef91b14ac38af6f82f40fd16b9c997d4a4239d87051237f770ef5327f0f89b15193fdabf2f6d6a229d56a220d9617653344700b4b548764a53ca25da75fcad62bfebea3dd0d99a8e7cbce3d256db02b002685cd99713b96861f784b06a1243590dc944eda1cbb869f2393511a4f6387381903b
### Get rid of unneeded files
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f|
run("rmdir #{f}")
end
["./README", "./doc/README_FOR_APP", "./public/index.html", "./public/favicon.ico", "./public/images/rails.png", "./public/robots.txt"].each do |f|
run("rm #{f}")
end
### Don't ignore empty directories
Multiple definition of element '[REDACTED]' causes the content model
to become ambiguous. A content model must be formed such that during
validation of an element information item sequence, the particle
contained directly, indirectly or implicitly therein with which to
attempt to validate each item in the sequence in turn can be uniquely
determined without examining the content or attributes of that item,
and without any information about the items in the remainder of the
sequence.
#City#
Saint Paul
#Country#
USA
#Currently#
Cloudy
#CurrentIconUrl#
Broken:
----------------------------------
def self.url(key, secret, email, name, uid, additional_fields={})
consumer = OAuth::Consumer.new(key, secret)
uri = URI.parse("https://#{DOMAIN}/fastpass")
...
end
Generates this url:
https://getsatisfaction.com/fastpass?email=jr%2Btrmstest%40trms.com&name=trmstest&oauth_consumer_key=rakdrg10995k&oauth_nonce=vbS27Iv3jhThzbgyCahirBi1cuyjeeqcDKSYn2YY&oauth_signature=doYBa7WzSPnwzeWmAqiH%2Frr3e3M%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1249576107&oauth_version=1.0&phone=866-866-4118&real_name=trmstest&uid=85295e67
class User < ActiveRecord::Base
# Columns:
# id, integer
# my_id, string
# etc...
has_one :contact, :primary_key => "my_id", :foreign_key => "my_id"
end
class Contact < ActiveRecord::Base