http://awilliams.github.io/RTanque/
RTanque depends on Gosu, which depends on SDL, which depends on... :(
#!/usr/bin/env bash | |
function filter_directories () { | |
grep -ve '^\(.\|./IgnoreA\|./IgnoreB\)$' | |
} | |
failed="" | |
for directory in $(find . -maxdepth 1 -type d | filter_directories | sort); do | |
pushd $directory &> /dev/null |
http://awilliams.github.io/RTanque/
RTanque depends on Gosu, which depends on SDL, which depends on... :(
play :E | |
sleep 0.5 | |
play :E | |
sleep 0.5 | |
play :G | |
sleep 1 | |
play :E | |
sleep 0.5 | |
play :E |
# mkdir kata-name; cd kata-name | |
# git init . | |
# curl -sL https://gist.github.com/alvarobp/be0adbec727dca097f84/raw -o trainer.sh | |
# git add trainer.sh | |
# echo 'trainer.sh' > .gitignore | |
# git add .gitignore | |
# git commit -m'Kata with trainer.sh' | |
# sh trainer.sh | |
PERIOD=${PERIOD:-120} |
Disclaimer: The following examples try to give an overview of the process followed in different scenarios. Some commands were actually written from memory. Some tools might exist simplifying all this. Furthermore, I'm no expert so if anyone ever reads this and knows any improvement, please let me know.
Given that the Guest User can access the Pairing Station directly, either because the station is publicly available or because NAT port forwarding can be used, there's only one thing we need to do, give ssh access to the Guest User by adding his ssh public key to our Local User (pair
) .ssh/authorized_keys
file.
The local user would open up a tmux session with
tmux new-session -s pairing
case node[:languages][:ruby][:host_cpu] | |
when "x86_64" | |
when "i686" | |
end |
def show_callbacks(klass) | |
ActiveRecord::Callbacks::CALLBACKS.each do |type| | |
puts "#{type}" | |
klass.send("#{type}_callback_chain").each {|c| puts " #{c.method}"} | |
puts | |
end | |
end |
if Rails.env.test? | |
class TCPSocket | |
alias_method :old_initialize, :initialize | |
def initialize(*args) | |
if !['localhost', '127.0.0.1', 'www.example.com'].include?(args.first) | |
# Uncomment and comment the raise line to log all the violations | |
# logger = Logger.new(File.join(Rails.root, 'log', 'open_sockets.log')) | |
# logger.info "#{Time.now}: #{args.inspect}" | |
raise "#{Time.now}: #{args.inspect}" | |
end |
class ActiveRecord::Base | |
def force_update_attribute(attribute, value) | |
self.connection.update_sql("UPDATE #{self.class.name.tableize} SET #{attribute.to_s} = #{self.connection.quote(value)} WHERE id = #{self.connection.quote(id)}") | |
self.reload | |
end | |
end |
#!/usr/bin/env ruby | |
if ARGV.size == 0 | |
puts "Usage: findlogs <directory>" | |
exit | |
end | |
require 'find' | |
class Numeric |