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
abstract AVector(Array<Float>) { | |
public var x(get, never):Float; | |
public var y(get, never):Float; | |
public var z(get, never):Float; | |
public var length(get, never):Float; | |
public var lengthSq(get, never):Float; | |
public inline function new(x:Float, y:Float, z:Float=0.) this = [x, y, z]; | |
@:op(A+B) public static inline function add(a : AVector, b : AVector) : AVector { | |
return new AVector(a.x+b.x,a.y+b.y,a.z+b.z); |
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
var Emitter = require('emitter'); | |
var slice = [].slice; | |
module.exports = QueueEmitter; | |
function QueueEmitter(){ | |
if( !(this instanceof QueueEmitter) ){ | |
return new QueueEmitter(); | |
} | |
this.queued = {}; |
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 day_at_ted(local_datetime, local_offset) | |
pac_time = local_datetime - offset.hours - 8.hours | |
return pac_time.date | |
end | |
def search | |
search_since = day_at_ted(local_datetime, local_offset) + " 08:00:00" | |
search_before = day_at_ted(local_datetime, local_offset) + 1.day + " 07:59:00" | |
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
// Get the selected date and apply the current local time | |
var currentTime : Date = day.date; | |
var now : Date = new Date(); | |
currentTime.setHours( now.hours, now.minutes , now.seconds ); | |
var yesterday : Date = new Date( currentTime.time ); | |
yesterday.date -= 1; | |
query += " published_after:\"" + df.format( DateUtil.toPST( yesterday ) ) + " 16:00\""; |
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 "vendor/dm-core" | |
require "dm-is-tree" | |
require "dm-timestamps" | |
class Node | |
include DataMapper::Resource | |
has n, :medias, :through => :node_medias | |
property :id, Serial |
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
/Users/slaskis/.gem/ruby/1.8/gems/dm-core-0.9.10/lib/dm-core/associations/relationship_chain.rb:49:in `initialize': undefined method `name' for nil:NilClass (NoMethodError) | |
from /Users/slaskis/.gem/ruby/1.8/gems/dm-core-0.9.10/lib/dm-core/associations/one_to_many.rb:56:in `new' | |
from /Users/slaskis/.gem/ruby/1.8/gems/dm-core-0.9.10/lib/dm-core/associations/one_to_many.rb:56:in `setup' | |
from /Users/slaskis/.gem/ruby/1.8/gems/dm-core-0.9.10/lib/dm-core/associations.rb:122:in `has' | |
from ./models.rb:10 | |
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' | |
from pulplabs.rb:6 | |
from /Users/slaskis/.gem/ruby/1.8/gems/sinatra-0.9.0.4/lib/sinatra/base.rb:644:in `configure' | |
from /Users/slaskis/.gem/ruby/1.8/gems/sinatra-0.9.0.4/lib/sinatra/base.rb:831:in `configure' |
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
var flashvars = { | |
}; | |
var params = { | |
menu: "false", | |
allowFullScreen:"true" | |
}; | |
var attributes = { | |
id: "pulplabs", | |
name: "pulplabs" |
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
#!/usr/bin/env ruby -w | |
#=> aaron@rubyamf.org | |
require 'rubygems' | |
require 'fileutils' | |
require 'optparse' | |
default_browser = 'firefox' | |
OPTIONS = {} | |
OPTIONS[:default_plugin] = 'flash' | |
OPTIONS[:default_user] = `whoami`.chop! |
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
# 1 "vm/threads.c" | |
# 1 "<built-in>" | |
# 1 "<command line>" | |
# 1 "vm/threads.c" | |
# 17 "vm/threads.c" | |
# 1 "vm/vm.h" 1 | |
# 19 "vm/vm.h" | |
# 1 "/usr/include/setjmp.h" 1 3 4 | |
# 26 "/usr/include/setjmp.h" 3 4 | |
# 1 "/usr/include/machine/setjmp.h" 1 3 4 |
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
class Regex { | |
var exp : EReg; | |
var str : String; | |
public function new( r : EReg ) { | |
exp = r; | |
} | |
public function match( s : String ) { |
OlderNewer