This file contains 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
abactinally | |
abrogative | |
absinthol | |
acclimation | |
accumulate | |
acenaphthene | |
achroous | |
acknowledge | |
acriflavine | |
acromegaly |
This file contains 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
loop do | |
pid = fork do | |
puts 'foo' | |
exit 99 | |
end | |
#ret_pid = waitpid(pid) # Tried this, but it blocks | |
ret_pid = wait2(pid, Process::WNOHANG) # Tried this, but it never gets a value | |
if ret_pid | |
puts 'got a returned pid' |
This file contains 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 'tk' | |
class GameWindow < Gosu::Window | |
def initialize | |
super 640, 480 | |
self.caption = "Gosu Tutorial Game" | |
@frog = Gosu::Image.new("./frog_cling_1.png") | |
@x = 0 |
This file contains 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 wait_for_ajax | |
max_ajax_wait = 60 | |
time_limit, interval = (Time.now + max_ajax_wait), 0.5 | |
loop do | |
break if page.evaluate_script("(typeof(jQuery) !== 'undefined' && jQuery.active === 0)") | |
sleep interval | |
fail "Wait for AJAX timed out after waiting for #{max_ajax_wait} seconds" if Time.now > time_limit | |
end | |
end |
This file contains 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 'artoo' | |
connection :sphero, :adaptor => :sphero, :port => '/dev/tty.Sphero-YBB-AMP-SPP' | |
device :sphero, :driver => :sphero | |
connection :keyboard, adaptor: :keyboard | |
device :keyboard, driver: :keyboard, connection: :keyboard | |
def keypress(sender, key) | |
case key |
This file contains 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 'artoo' | |
#connection :loop | |
#device :passthru | |
connection :sphero, :adaptor => :sphero, :port => '/dev/tty.Sphero-YBB-AMP-SPP' | |
device :sphero, :driver => :sphero | |
api :host => '127.0.0.1', :port => '4321' |
This file contains 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 'sinatra' | |
enable :sessions | |
$foo = ['foo', 'bar'] | |
$foo.each do |vi| | |
get '/' + vi do | |
erb :hello | |
end |
This file contains 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
root@beaglebone:~/code/cylon# node main.js | |
I, [2014-10-10T07:01:35.775Z] INFO -- : Initializing connections. | |
I, [2014-10-10T07:01:35.798Z] INFO -- : Initializing connection 'joystick'. | |
D, [2014-10-10T07:01:35.805Z] DEBUG -- : Loading adaptor 'joystick'. | |
Error: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory | |
at Module.load (module.js:356:32) | |
at Function.Module._load (module.js:312:12) | |
at Module.require (module.js:364:17) | |
at require (module.js:380:17) |
This file contains 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 "peach" | |
mutex = Mutex.new | |
t=(1..500000).map{ rand}; | |
a=0; | |
t2=t.pmap(4) do |z| | |
mutex.lock | |
a+=1; | |
mutex.unlock |
This file contains 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 | |
cd ~/code/eiacuc | |
tmux has-session -t eiacuc | |
if [ $? != 0 ] | |
then | |
tmux new -s eiacuc -n vim -d | |
tmux send-keys -t eiacuc 'vim' C-m | |
tmux split-window -v -p 20 -t eiacuc | |
tmux send-keys -t eiacuc:0.1 'cd ~/code/eiacuc' C-m | |
tmux new-window -n server -t eiacuc |
NewerOlder