This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[aanand ~/src/boomtrapezoid (master)]$ git bisect start | |
[aanand ~/src/boomtrapezoid (master)]$ git bisect bad | |
[aanand ~/src/boomtrapezoid (master)]$ git bisect good 4bcda121df9c5d657032e6d1be9ac7c7b0f05935 | |
Bisecting: 2 revisions left to test after this | |
[51673093722233086a5765fab0b00008a9eda2de] Refactored gun related code into Gun.scala as Tank.scala was getting pretty crowded. | |
[aanand ~/src/boomtrapezoid (bisect)]$ rake run | |
(in /Users/aanand/src/boomtrapezoid) | |
fsc -deprecation -classpath lib/scala-library.jar:lib/slick.jar:lib/phys2d.jar:lib/lwjgl.jar:lib/sbinary.jar:lib/jogg.jar:lib/vorbisspi.jar:lib/jorbis.jar:lib/tritonus_share.jar:lib/natives-linux.jar:lib/natives-mac.jar:lib/natives-win32.jar src/**.scala -d classes | |
java -classpath classes:lib/scala-library.jar:lib/slick.jar:lib/phys2d.jar:lib/lwjgl.jar:lib/sbinary.jar:lib/jogg.jar:lib/vorbisspi.jar:lib/jorbis.jar:lib/tritonus_share.jar:lib/natives-linux.jar:lib/natives-mac.jar:lib/natives-win32.jar -Djava.library.path=lib/natives-mac Main | |
Mon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://nullroute.eu.org/mirrors/analogliterals/analogliterals.xhtml | |
module AnalogLiterals | |
class A < Struct.new(:dashes, :tildes, :pluses, :els) | |
def -@; A.new(dashes+1, tildes, pluses, els); end | |
def ~@; A.new(dashes, tildes+1, pluses, els); end | |
def +@; A.new(dashes, tildes, pluses+1, els); end | |
def -x; A.new(dashes+x.dashes+1, tildes+x.tildes, pluses+x.pluses, els+x.els); end | |
def +x; A.new(dashes+x.dashes, tildes+x.tildes, pluses+x.pluses+1, els+x.els); end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby | |
sudo ln -s /usr/bin/ri1.8 /usr/bin/ri | |
sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc | |
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hook for storing the dimensions of uploaded images. | |
# | |
# Use like this: | |
# | |
# class MyModel | |
# has_attached_file :image, :styles => { :thumb => '72x72#' } | |
# | |
# stores_dimensions :image | |
# end | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def multipart_request url, env | |
m = Merb::Test::MultipartRequestHelper::Post.new(env.delete(:params)) | |
body, head = m.to_multipart | |
mp_env = { | |
:method => 'POST', | |
'CONTENT_TYPE' => head, | |
'CONTENT_LENGTH' => body.length, | |
:input => body | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm using DataMapper 0.9.10 and data_objects 0.9.11. | |
When I have two chained one-to-many associations, e.g. Author -> Post -> Comment, | |
trying to fetch associated Comments on a Post which has *itself* been fetched | |
from an Author results in some strange SQL being generated and some incorrect behaviour. | |
Here, I create a single Author, two Posts attached to that Author, and one | |
Comment associated with each Post, with a :name of "foo", to give us something to | |
search on. Then I try to retrieve the Comment for the Post with id=2. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
BRANCH=$(git branch | grep '*' | awk '{ print $2; }') | |
git fetch | |
for branch in $(ls .git/refs/heads) | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET 200 OK: http://staging.rubygems.org/specs.4.8.gz | |
GET 200 OK: http://staging.rubygems.org/quick/Marshal.4.8/gemcutter-0.1.4.gemspec.rz | |
Downloading gem gemcutter-0.1.4.gem | |
GET 302 Moved Temporarily: http://staging.rubygems.org/gems/gemcutter-0.1.4.gem | |
GET 200 OK: http://s3.amazonaws.com/gemcutter_staging/gems/gemcutter-0.1.4.gem | |
Downloaded gemcutter-0.1.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://gemcutter.org' | |
gem "rails", "~> 2.3.5", :require => nil | |
gem 'mysql' | |
gem 'haml' | |
gem 'rdiscount' | |
gem 'authlogic' | |
gem 'will_paginate' | |
gem 'friendly_id' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooController < ApplicationController | |
end |
OlderNewer