Skip to content

Instantly share code, notes, and snippets.

View icco's full-sized avatar
🏠
Working from home

Nat Welch icco

🏠
Working from home
View GitHub Profile
total_ms = 0
hours, minutes, seconds = '2:04:37'.split(':').map {|i| i.to_i }
seconds = seconds + (minutes * 60) + (hours * 3600)
total_ms = seconds * 1000
@icco
icco / env.rb
Last active August 29, 2015 13:58
{"GO_PIPELINE_COUNTER"=>"16", "HOSTNAME"=>"ct-10-0-201-1", "GEM_HOME"=>"/tmp/.bundle/ruby/2.1.0", "TERM"=>"linux", "SHELL"=>"/bin/bash", "RUBY_HEAP_FREE_MIN"=>"4096", "HISTSIZE"=>"1000", "PIPELINE_COUNTER"=>"16", "SNAP_PIPELINE_COUNTER"=>"16", "QTDIR"=>"/usr/lib64/qt-3.3", "QTINC"=>"/usr/lib64/qt-3.3/include", "LC_ALL"=>"en_US.UTF-8", "RUBY_FREE_MIN"=>"500000", "USER"=>"go", "LD_LIBRARY_PATH"=>"/opt/rh/qt48/root/usr/lib64", "SNAP_STAGE_NAME"=>"Test", "PATH"=>"/tmp/.bundle/ruby/2.1.0/bin:/opt/local/ruby/2.1.1/bin:/opt/local/ruby/1.9.3-p484/bin:/usr/lib/jvm/java-1.7.0/bin:/var/go/py-virtualenv/bin:/opt/local/python/2.7.5/bin:/opt/local/nodejs/0.10.20/bin:/opt/local/awscli/bin:/opt/rh/qt48/root/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", "MAIL"=>"/var/spool/mail/go", "RUBY_HEAP_MIN_SLOTS"=>"80000", "_"=>"/opt/local/ruby/2.1.1/bin/ruby", "PWD"=>"/var/go/repo", "SNAP_BRANCH"=>"master", "LANG"=>"en_US.UTF-8", "SNAP_COMMIT"=>"efc98d78039e2a233a9557acc28c586eccc542e4", "HISTCONTROL"=>"ignor
@icco
icco / designdoc.md
Last active August 29, 2015 14:03
Design Doc Template

Title

Objective

In a few sentences, describe the key system objectives.

--- -
+++ /root/movies.txt
@@ -1,580 +1,305 @@
(500) Days of Summer (2009)
-10 Things I Hate About You (1999)
-16 Blocks (2006)
2001 - A Space Odyssey (1968)
25th Hour (2002)
28 Days Later... (2002)
28 Weeks Later (2007)
(1..100).each do |i|
out = ""
out += "Crackle" if i%3 == 0
out += "Pop" if i%5 == 0
out = i.to_s if out.empty?
print "#{out}\n"
end
@icco
icco / README.md
Last active August 29, 2015 14:12
Ring

Ring

...

uri = URI.parse(url)
p uri
open(uri) do |data|
p data.meta
file.write data.read
end
We couldn’t find that file to show.
@icco
icco / keybase.md
Created May 5, 2015 22:28
keybase.md

Keybase proof

I hereby claim:

  • I am icco on github.
  • I am icco (https://keybase.io/icco) on keybase.
  • I have a public key whose fingerprint is 27E1 EC35 A2C3 8223 7909 4DB5 A931 B605 C4EE F77F

To claim this, I am signing this object: