Skip to content

Instantly share code, notes, and snippets.

View besquared's full-sized avatar

Josh Ferguson besquared

View GitHub Profile
grammar Where
rule expression
'(' space expression space ')' / conjoined
end
rule conjoined
primary space conjunction space expression / primary
end
rule conjunction
class MyClass {
obj *parent;
MyClass(obj &parent) {
this->parent = parent;
}
~MyClass() {
delete parent;
}
require 'rubygems'
require 'socket'
require 'thread'
require 'uuidtools'
class Peer
attr_accessor :host, :port
def initialize(host, port)
@host = host
- [F] aws-s3 = 0.5.1
- [F] xml-simple
- [I] builder
- [F] mime-types
- [F] xml-simple = 1.0.11
- [F] choice = 0.1.2
- [F] cssmin = 1.0.0
- [F] daemons = 1.0.10
- [F] Linguistics = 1.0.5
- [F] mechanize = 0.7.6
function loadImage(type:String, name:String, src:String) {
var loader = new Loader();
function onLoadComplete(event:Event):void {
var thumbnail:Sprite = new Sprite();
thumbnail.addChild(loader);
//thumbnail.width = 100;
//thumbnail.height = 100;
thumbnail.x = 150;
thumbnail.y = 150;
require 'thread'
queue = Queue.new
consumer = Thread.new do
value = queue.pop
end
consumer.join
require 'benchmark'
size = 1048576
data = []
genders = ['male', 'female']
size.times do
data << [genders[rand * 2]]
end
0, (*, *, *), (*, *, *), -1, 9.0
5, (*, P1, *), (*, P1, *), 0, 7.5
10, (S1, *, s), (*, *, s), 0, 9.0
1, (S1, *, s), (S1, *, *), 0, 9.0
7, (S1, P1, s), (*, P1, s), 5, 6.0
2, (S1, P1, s), (S1, P1, s), 1, 6.0
8, (S1, P2, s), (*, P2, *), 0, 12.0
3, (S1, P2, s), (S1, P2, s), 1, 12.0
4, (S2, P1, f), (S2, *, *), 0, 9.0
9, (S2, P1, f), (*, *, f), 0, 9.0
JFerguson:website joshferguson$ rake gems --trace
(in /Users/joshferguson/Rupture/website)
** Invoke gems (first_time)
** Invoke gems:base (first_time)
** Execute gems:base
** Invoke environment (first_time)
** Execute environment
rake aborted!
can't activate highline (= 1.4.0, runtime), already activated highline-1.5.0
/Library/Ruby/Site/1.8/rubygems.rb:149:in `activate'
# find(
# :select => 'DISTINCT identity_providers.*',
# :joins => [:datasources],
# :conditions => 'datasources.pull'
# )
SELECT DISTINCT identity_providers.*
FROM identity_providers
INNER JOIN datasources
ON identity_providers.id = datasources.identity_provider_id