This file contains hidden or 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 Variant | |
attr_accessor :variant_tag | |
def self.variants(hsh) | |
hsh.map do |tag, args| | |
variant(tag, args) | |
end | |
end | |
def self.variant(tag, args) |
This file contains hidden or 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 | |
roll1 = 4.times.map { rand(1..6) }.sort | |
roll2 = 4.times.map { rand(1..6) }.sort | |
roll3 = 4.times.map { rand(1..6) }.sort | |
roll4 = 4.times.map { rand(1..6) }.sort | |
roll5 = 4.times.map { rand(1..6) }.sort | |
roll6 = 4.times.map { rand(1..6) }.sort | |
roll1.reduce(:+) if roll1.size > 0 |
This file contains hidden or 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
{ | |
META_KEY => @document.meta, | |
LINKS_KEY => @document.links, | |
LINKED_KEY => @document.linked, | |
}.select {|k, v| v.any?} |
This file contains hidden or 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
/** | |
* Non-ducky Circular Thing | |
*/ | |
/** | |
* Duck. | |
*/ | |
*, *:before, *:after { | |
-moz-box-sizing: border-box; |
This file contains hidden or 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
# In response to: | |
# http://mlomnicki.com/ruby/tricks-and-quirks/2011/02/10/ruby-tricks2.html | |
# Ruby 1.9.2 has some neat stuff that lets us make a readable | |
# alternative case statement that calls each method in turn. | |
# 1.9.2 features used: | |
# * hashes are ordered in 1.9.2 | |
# * cool JSON-style hash syntax | |
# * concise lambda syntax |
This file contains hidden or 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
{ | |
"name": "irc", | |
"active": true, | |
"events": [ | |
"issues", | |
"push", | |
"pull_request" | |
], | |
"config": { | |
"server": "irc.mozilla.org", |
This file contains hidden or 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
file=".tmp-`date +'%s'`.c" | |
test.c: run | |
a.out: | |
@tail -n +2 test.c | gcc -std=c99 -ggdb -I. -DDEBUG -xc - | |
run: a.out | |
@./a.out | |
@rm a.out |
This file contains hidden or 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
import testing // Could be made implicit when you pass --test to rock? | |
// The test is assumed to be in <name>.ooc | |
compile_stdout := "Spawning bunnies in snowflake/Makefile | |
[ OK ] | |
" | |
runtime_stdout := " | |
Done. |
This file contains hidden or 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
o/\oo/o/o/o/o/o/o/o/o/o/o/o/o/o/ | |
o/o/o/o/\o/\o\oo/o/o/o/o/o/o/o/o/ | |
o/o/o/o/o/o/o/o/o/\o\o/\o/\o\o/\oo/ | |
\o/o/o/\oo/o/o/o/o/o/o/o/o/o/o/o/ | |
o/o/\o/\o\oo/o/o/o/o/o/o/o/o/o/\o | |
\o/\o/\o\o/\oo/o/o/\o/o/o/o/o/o/o/o/ | |
o/o/o/o/o/o/o/o/\o/o/\o/o/o/o/o/o/ | |
o/o/\o/o/o/\oo/\oo/\oo/o/o/o/o/o/ | |
o/o/o/o/o/o/o/o/o/o/\o/\o\oo/o/o/ | |
o/o/o/o/o/o/o/\o\o/\o/\o\o/\oo/\o/o/ |
This file contains hidden or 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
|arg1| | |
|arg2| | |
|arg3| | |
(print (join "my god this is hideous..." arg1 arg2 arg3)) | |
. | |
. | |
. | |
|arg1| | |
|arg2| |
NewerOlder