I hereby claim:
- I am jackwillis on github.
- I am jackie (https://keybase.io/jackie) on keybase.
- I have a public key whose fingerprint is 21BA 259F D30B 002B BABD 1195 57A5 8973 A025 781C
To claim this, I am signing this object:
require 'concurrent' | |
TASKS = Concurrent::Map.new | |
class Task | |
def initialize(ref, dep_refs = [], &action) | |
@ref = ref | |
@dep_refs = dep_refs | |
@promise = Concurrent::Promise.new(&action) | |
end |
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Time-based Redirect</title> | |
<script> | |
var pageTimes = [ | |
{ begin: "7:30 AM", end: "8:00 AM", href: "http://dfgsdfs" }, | |
{ begin: "8:00 AM", end: "12:00 PM", href: "http://tdddfgdfgdfgs" }, |
# Better Kernel::system in Ruby | |
def sys(cmd) | |
*resp, status = `#{cmd}; echo -n "\n$?"`.lines | |
[resp.join.chomp, status.to_i] | |
end | |
sys("echo foo") #=> ["foo\n", 0] | |
sys("echo -n foo") #=> ["foo", 0] | |
sys("false") #=> ["", 1] |
class Hash | |
# http://stackoverflow.com/a/14881438/3551701 | |
def product | |
product = values[0].product(*values[1..-1]) | |
product.map {|p| Hash[keys.zip(p)] } | |
end | |
end | |
class Proc |
#!/bin/sh | |
play -r 32k -t raw -e s -b 16 -c 1 -V1 - |