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
require 'zorder' | |
class Ball | |
attr_accessor :x, :y, :velocity_x, :velocity_y | |
def initialize(window) | |
@x = rand(window.width) | |
@y = rand(window.height) | |
@velocity_x = 2.0 | |
@velocity_y = 2.0 |
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
1.9.3-p0 in portal/ | |
› ./bin/portal | |
Manages SSH portals as easy hosts | |
usage: portal command [command options] | |
Version: 0.0.1 | |
Commands: | |
add - Adds a portal to the list |
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
# For more information on Warden strategies, read this: https://github.com/hassox/warden/wiki/Strategies | |
class SuperCoolWardenStrategy | |
def valid? | |
# you have access to env and request | |
# return true/false if this is strategy should run or not | |
# if it returns false, it will move onto the next strategy in the list | |
# defaults to true if you don't write this method | |
end | |
def authenticate! |
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
DevNull:research cadwallion$ rails new blank_app -O -T > /dev/null | |
DevNull:research cadwallion$ cd blank_app/ | |
DevNull:blank_app cadwallion$ date && rails s | |
Fri Dec 2 09:02:48 CST 2011 | |
=> Booting WEBrick | |
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
[2011-12-02 09:02:49] INFO WEBrick 1.3.1 | |
[2011-12-02 09:02:49] INFO ruby 1.9.3 (2011-10-30) [x86_64-darwin11.1.0] |
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
require 'gosu' | |
require 'minitest/autorun' | |
class TestWindow < Gosu::Window | |
def initialize | |
super(640, 480, false) | |
end | |
def draw ; end | |
def update ; 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
require 'gosu' | |
require 'minitest/autorun' | |
class TestWindow < Gosu::Window | |
def initialize | |
super(640, 480, false) | |
end | |
def draw ; end | |
def update ; 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
1.9.3-p0@profile_service_application in profile-service/ on major_renovations | |
› gb | |
authorize_with_oauth_tokens | |
avatars | |
bnet_debug | |
config_cleanup | |
continuous_bnet_parsing | |
header_versioning | |
jasmine_conversion | |
* major_renovations |
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 File | |
def self.read_only?(file) | |
s = File.stat(file) | |
mode = sprintf("%o", s.mode) | |
if s.owned? | |
return true if mode[3].to_i == 4 | |
end | |
if s.grpowned? | |
return true if mode[4].to_i == 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
› which rvm | |
rvm () { | |
local result current_result | |
if [[ -n "${BASH_VERSION:-}" ]] | |
then | |
trap '__rvm_teardown_final' 0 1 2 3 15 | |
fi | |
next_token="$1" | |
[[ $# -eq 0 ]] || shift | |
__rvm_initialize |
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
require 'java' | |
require 'lwjgl.jar' | |
require 'slick.jar' | |
java_import org.newdawn.slick.Image | |
require 'pong/image_context' | |
require 'pong/collidable_attributes' | |
module Pong |