Skip to content

Instantly share code, notes, and snippets.

View meh's full-sized avatar

meh. meh

View GitHub Profile
@meh
meh / dexter.ex
Created August 21, 2014 01:03 — forked from mattdeboard/dexter.ex
defmodule Dexter do
use Application
@port 7400
def start(_, port \\ @port) do
import Supervisor.Spec, warn: false
children = [
worker(Reagent, [Dexter.Server, [port: port]], [])
describe "Timeouts" do
timeout 0.1
async "hurr" do
run_async { :ok }
end
async "blah", 4 do
run_async { :ok }
end
@meh
meh / rake.rb
Created January 6, 2012 15:34
opal builder
desc 'Build dependencies matching /^opal-/ into .'
task :dependencies do
Opal::DependencyBuilder.new(out: '.').build
end
desc 'Build specified dependencies into .'
task :dependencies do
Opal::DependencyBuilder.new(dependencies: %w[call-me opal-spec], out: '.').build
end
@meh
meh / prototypes.rb
Created October 4, 2011 19:17
Adding methods to prototype
# even better, imho
class << `Document`
# this goes in the prototype, so it ends up being on `document` too
def root
`return self.documentElement`
end
end
class << `document`