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 | |
# http://www.spiegel.de/wissenschaft/mensch/raetsel-der-woche-wie-viele-schliessfaecher-stehen-offen-a-1041982.html | |
require 'tco' | |
NUMBER_OF_DOORS = ARGV[0].to_i || 10 | |
INITAL_STATE = false # false is closed, true is opened | |
DOORS = (1..NUMBER_OF_DOORS).map { false } |
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 | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'celluloid' | |
require 'chromatic' | |
$stdout.sync = true | |
Celluloid.logger = nil |
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 | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'celluloid/io' | |
require 'chromatic' | |
require 'objspace' | |
class Client | |
include Celluloid::IO |
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
Read in 10404 method IDs. | |
<root>: 10404 | |
: 1 | |
android: 605 | |
accounts: 3 | |
app: 58 | |
content: 104 | |
pm: 8 | |
res: 15 | |
database: 26 |
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
for code in $(seq -w 0 255); do for attr in 0 1 4 5 7; do printf "%s-%03s %bTest%b\n" "${attr}" "${code}" "\e[${attr};38;05;${code}m" "\e[m"; done; done | column -c $((COLUMNS*2)) |