I hereby claim:
- I am nornagon on github.
- I am nornagon (https://keybase.io/nornagon) on keybase.
- I have a public key whose fingerprint is 50BB 3434 E762 B0A9 F932 D08E 802A 9C12 D805 6B7C
To claim this, I am signing this object:
| disintegrate = (fn) -> | |
| tests = [] | |
| ret_fn = (args...) -> | |
| args_saved = JSON.stringify(args) | |
| res = fn.apply(this, args) | |
| res_saved = JSON.stringify(res) | |
| tests.push {args:args_saved,res:res_saved} | |
| return res | |
| ret_fn.tests = tests | |
| ret_fn |
| {Collection} = masala = require './masala' | |
| live = require './sugar' | |
| data = new Collection [live { | |
| name: 'list of things' | |
| data: new Collection [live({val:3}),live({val:4})] | |
| }] | |
| http = require 'http' | |
| render = require './render' |
| component = (c) -> | |
| c::_added = (gobj) -> | |
| throw 'added twice' if @me? | |
| @me = gobj | |
| @world = @me.world | |
| @init? @_args... | |
| new_c = (args...) -> | |
| r = new c | |
| r._args = args | |
| r |
| # Needs jq. brew install jq. | |
| random_word_def() { | |
| local random_word wordnik_for_word show_definition | |
| random_word() { | |
| perl -e 'rand($.) < 1 && ($line = $_) while <>; print $line' < /usr/share/dict/words | |
| } | |
| wordnik_for_word() { | |
| curl -s http://api.wordnik.com/v4/word.json/"$1"/definitions'?api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5' | |
| } |
| tag = (name, text, attrs) -> | |
| parts = (name ? 'div').split /(?=[.#])/ | |
| tagName = "div" | |
| classes = [] | |
| id = undefined | |
| for p in parts when p.length | |
| switch p[0] | |
| when '#' then id = p.substr 1 if p.length > 1 | |
| when '.' then classes.push p.substr 1 if p.length > 1 | |
| else tagName = p |
I hereby claim:
To claim this, I am signing this object:
| str = "Zalgo, he comes! He rises from the deep, he consumes us" | |
| str.split(//).map { |char| | |
| char.ord.to_s(2).split(//).map { |bit| | |
| if rand < 0.01 then ["0","1"][(rand*2).floor] else bit end | |
| }.join.to_i(2).chr | |
| }.join | |
| # => "Zalgo, he comes! He rises bRom the deep, `e conwumes us" |
| object Serialization { | |
| object UnitSerialization { | |
| val unitForSymbol = Map( | |
| "millisecond" -> Milliseconds, | |
| "celsius" -> Celsius, | |
| "kelvin" -> Kelvin, | |
| "meter" -> Meters, | |
| "nanometer" -> Nanometers, | |
| "second" -> Seconds, | |
| "minute" -> Minutes, |
| # Cribbed from http://commons.wikimedia.org/wiki/User:Geek3/hydrogen | |
| function LegendreP(l, m, x) | |
| m = abs(m) | |
| a = 1 | |
| if m > 0 | |
| fac = 1 | |
| c = (1 + x) * (1 - x) | |
| for i = 1:m | |
| a *= c * fac / (fac + 1) |
| {"71,23":"thinsolid","72,23":"thinsolid","73,23":"thinsolid","71,24":"shuttle","72,24":"shuttle","73,24":"thinsolid","71,25":"nothing","72,25":"shuttle","73,25":"thinsolid","74,25":"positive","75,25":"negative","76,25":"thinsolid","81,25":"thinsolid","82,25":"negative","83,25":"positive","72,26":"shuttle","73,26":"thinsolid","74,26":"thinsolid","75,26":"nothing","76,26":"nothing","77,26":"nothing","78,26":"nothing","79,26":"shuttle","80,26":"nothing","81,26":"nothing","82,26":"nothing","83,26":"thinsolid","70,27":"thinsolid","71,27":"shuttle","72,27":"shuttle","73,27":"thinsolid","70,28":"thinsolid","71,28":"nothing","72,28":"shuttle","73,28":"thinsolid","70,29":"thinsolid","72,29":"shuttle","73,29":"thinsolid","70,30":"thinsolid","71,30":"negative","72,30":"thinshuttle","73,30":"thinsolid","71,31":"positive","72,31":"shuttle","73,31":"thinsolid","72,32":"nothing","33,22":"thinsolid","45,24":"thinsolid","53,22":"thinsolid","33,26":"thinsolid","37,26":"thinsolid","37,22":"thinsolid","37,18":"thinsolid","33,18" |