Skip to content

Instantly share code, notes, and snippets.

@clayallsopp
clayallsopp / dtrace_rubymotion_repl
Created May 9, 2012 21:30 — forked from fpotter/dtrace_rubymotion_repl
DTrace script to observe UNIX socket traffic to/from a RubyMotion app
#!/usr/bin/env dtrace -s
/*
* DTrace script to observe UNIX socket reads/writes for RubyMotion apps running
* in the iOS Simulator.
*
* Usage: sudo dtrace_rubymotion_repl <pid of running RubyMotion iOS app>
*
*/
syscall::sendto:entry
@clayallsopp
clayallsopp / bw.rb
Created August 6, 2012 21:43 — forked from sbauch/bw.rb
having trouble with bubblewrap
People.get_people do |data|
@data = data
end
def self.get_people(&block)
BW::HTTP...do |response|
@people = BW::JSON...
block.call(@people)
end
@clayallsopp
clayallsopp / bw.rb
Created August 6, 2012 21:43 — forked from sbauch/bw.rb
having trouble with bubblewrap
People.get_people do |data|
@data = data
end
def self.get_people(&block)
BW::HTTP...do |response|
@people = BW::JSON...
block.call(@people)
end
@clayallsopp
clayallsopp / bw.rb
Created August 6, 2012 22:19 — forked from sbauch/bw.rb
having trouble with bubblewrap
#directory_controller.rb
class DirectoryController < UIViewController
def viewDidLoad
super
self.title = "Directory"
@table = UITableView.alloc.initWithFrame(self.view.bounds)
self.view.addSubview @table
@table.dataSource = self
@table.delegate = self
var
a = 0,
b = 1,
t;
while (n > 0)
{
t = a;
a = b;
b += t;
n = n - 1;