Skip to content

Instantly share code, notes, and snippets.

$vm = CameronSpaces::VM.new("../../hydra-vm.git").load
$vm.users["lian"]["macbook"].connect
$vm.spaces["hydra"].attach_session $vm.users["lian"]["macbook"]
$vm.spaces["hydra"].add_object WorkspaceObject::CoreVideo.new "video_test"
$vm.spaces["hydra"]["video_test"].load_movie "testmovie.mp4", :autostart => true
250.times do
sleep 0.2
== Development Approaches
Asshole Driven development (ADD) - Any team where the biggest jerk makes all the big decisions is asshole driven development. All wisdom, logic or process goes out the window when Mr. Asshole is in the room, doing whatever idiotic, selfish thing he thinks is best. There may rules and processes, but Mr. A breaks them and people follow anyway.
Cognitive Dissonance development (CDD) - In any organization where there are two or more divergent beliefs on how software should be made. The tension between those beliefs, as it's fought out in various meetings and individual decisions by players on both sides, defines the project more than any individual belief itself.
Cover Your Ass Engineering (CYAE) - The driving force behind most individual efforts is to make sure than when the shit hits the fan, they are not to blame.
Development By Denial (DBD) - Everybody pretends there is a method for what's being done, and that things are going ok, when in reality, things are a mess and th
http://vimeo.com/3324904 =>
http://www.vimeo.com/moogaloop/load/clip:3324904 =>
<request_signature>2bc05a3a2f36cd94be799f52c5f09e3a</request_signature>
<request_signature_expires>1239724800</request_signature_expires>
=> flashvideo link: http://www.vimeo.com/moogaloop/play/clip:3324904/2bc05a3a2f36cd94be799f52c5f09e3a/1239724800/?q=sd
// $ curl http://localhost:8090/hello/world
{
"hello" : "world!",
"log" : "BackgroundColor changed, wohooo!"
}
//== API Syntax Choices
#!/bin/env ruby
# http://sohowww.nascom.nasa.gov/data/realtime/mpeg/
SOHO_URL = "http://sohowww.nascom.nasa.gov/data/LATEST/%s"
MPLAYER_CMD = 'mplayer -ao null -really-quiet -geometry %ix%i+%i+%i %s -loop %i -speed %s &'
SOHO_ETI = {
'ETI_171' => { filename: 'current_eit_171small.mpg' },
#'ETI_195' => { filename: 'current_eit_195small.mpg' },
'ETI_284' => { filename: 'current_eit_284small.mpg' },
'ETI_304' => { filename: 'current_eit_304small.mpg' },
require 'socket'
# ..old method found in my teeworlds-svn dir
def query_teeworlds_server(ip="localhost",port="8303")
s = UDPSocket.new; s.bind("0.0.0.0", 8304)
s.send("\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgief", 0, ip, port); sleep 0.2
response = s.recvfrom_nonblock(1024); s.close
ar = response[0][20..-1].split "\000"
player = ar[7..-1]
players = {}
# SEE: https://github.com/lian/ffi-flite
require 'ffi'
module FFI::Flite
extend FFI::Library
ffi_lib_flags(:lazy, :global)
ffi_lib [ 'smixer-sbase', '/usr/lib/alsa-lib/smixer/smixer-sbase.so'], [ 'flite' ]
attach_function :init, :flite_init, [], :int
require 'ffi-tk'
require 'bacon'
Tk.init
b = lambda {
describe 'Tk.root.tk_inactive' do
it 'resets' do
inactive = Tk.root.tk_inactive
inactive.should > 0
# stripped cvHaarDetectObjects version of ffi-opencv
# % pacman -S opencv (tested/updated for 2.3.1)
# % ruby ffi-facedetect.rb some.png
require 'ffi'
module OpenCv
extend FFI::Library
ffi_lib 'opencv_objdetect'
# lookup coords by name or mac address via google.. (evented)
require 'cgi'
require 'json'
require 'eventmachine'
module Goog
module Location
class Name < EM::Connection
Head = <<-TEXT