Skip to content

Instantly share code, notes, and snippets.

kill -9 %1 # this kills the first suspended job
@gabebw
gabebw / ray-pong1.rb
Created July 17, 2011 16:33
First step: a black background
require 'rubygems'
require 'ray'
Ray.game 'Pong', :size => [800, 800] do
register { add_hook(:quit, method(:exit!)) }
scene :start do
# Exit when q is pressed
on :key_press, key(:q){ exit! }
@gabebw
gabebw / ray-pong_2.rb
Created July 17, 2011 17:01
We have 2 paddles!
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
def paddle(paddle_x_coord, paddle_y_coord)
arguments_array = [paddle_x_coord, paddle_y_coord, PADDLE_WIDTH, HEIGHT / 3]
@gabebw
gabebw / my-first-ray.rb
Created July 17, 2011 17:13
Ray Pong 3: We have a ball
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
BALL_RADIUS = 20
def paddle(paddle_x_coord, paddle_y_coord)
@gabebw
gabebw / my-first-ray.rb
Created July 17, 2011 17:22
Pong: now with (fake) scores
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
BALL_RADIUS = 20
SCORE_TEXT_X_OFFSET = 40
@gabebw
gabebw / my-first-ray.rb
Created July 17, 2011 17:41
All static elements in place
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
BALL_RADIUS = 20
SCORE_TEXT_X_OFFSET = 40
@gabebw
gabebw / my-first-ray.rb
Created July 17, 2011 18:09
We have moving paddles!
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
BALL_RADIUS = 20
SCORE_TEXT_X_OFFSET = 40
require 'rubygems'
require 'ray'
WIDTH = 800
HEIGHT = 800
PADDLE_X_OFFSET = 40
PADDLE_WIDTH = 40
BALL_RADIUS = 20
SCORE_TEXT_X_OFFSET = 40
@gabebw
gabebw / output.sh
Created August 2, 2011 22:51
failing travis ci scenario
Background: # features/kumade_executable.feature:7
Given a directory named "executable" # aruba-0.4.5/lib/aruba/cucumber.rb:11
And I cd to "executable" # aruba-0.4.5/lib/aruba/cucumber.rb:43
When I create a Heroku remote for "pretend-staging-app" named "pretend-staging" # features/step_definitions/git_steps.rb:1
And I create a Heroku remote for "app-two" named "staging" # features/step_definitions/git_steps.rb:1
Scenario: Pretend mode with a Heroku remote # features/kumade_executable.feature:13
When I run `kumade deploy pretend-staging -p` # aruba-0.4.5/lib/aruba/cucumber.rb:52
process still alive after 120 seconds (ChildProcess::TimeoutError)
features/kumade_executable.feature:14:in `When I run `kumade deploy preten
@gabebw
gabebw / output.txt
Created September 3, 2011 15:34
brew install io
==> Cloning https://github.com/stevedekorte/io.git
Updating /Users/gabe/Library/Caches/Homebrew/io--git
git remote set-url origin https://github.com/stevedekorte/io.git
git fetch origin
git reset --hard
HEAD is now at 3b3b9f6 Merge branch 'master' of github.com:stevedekorte/io
git checkout-index -a -f --prefix=/private/tmp/homebrew-io-HEAD-S3Fb/
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file addons/Image/CMakeLists.txt