- Volume is worse than weight
- Eat before you’re hungry
- Food (things you can consume quickly and on the bike)
- Water (more than 2 water bottles. A camelback in a framebag works well here)
- Shelter with rain fly
| require 'uri' | |
| base = 'http://google.com' | |
| foo = 'foo' | |
| bar = 'bar' | |
| puts URI::join(base, foo) | |
| puts URI::join(base, foo, bar) |
| class Thing implements IThing { | |
| constructor(private name: string) { } | |
| public doStuff(): string { | |
| return "hello"; | |
| } | |
| } | |
| interface IThing { | |
| doStuff(): string |
| quine.rb:1: syntax error, unexpected tINTEGER, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END | |
| quine.rb:1: syntax error, unexpected tI... | |
| ^ |
| [0, -30, 30, 0, -30, 30, 0, -30, 30, 0] | |
| [0, -30, 30, 0, -30, 30, 0, -30, 30, 0] | |
| [0, -30, 30, 0, -30, 30, 0, -30, 30, 0] | |
| user system total real | |
| eager_map 0.400000 0.010000 0.410000 ( 0.413597) | |
| lazy_map 1.640000 0.000000 1.640000 ( 1.642215) | |
| composed 0.610000 0.000000 0.610000 ( 0.610857) | |
| m_composed 0.140000 0.000000 0.140000 ( 0.136136) |
| function mapComp(array, fn) { | |
| var result = []; | |
| for(var i = 0; i < array.length; i++) { | |
| result.push(fn(i)); | |
| } | |
| return result; | |
| } |
| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |
| <html> | |
| <body> | |
| <div style="color:white"> | |
| <a>foo</a> | |
| </div> | |
| </body> | |
| </html> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #mongo 2.4 running with --auth | |
| require 'mongo' | |
| require 'json' | |
| client = Mongo::MongoClient.new('localhost', 27017) | |
| admin = { user: 'admin', pwd: 'password', roles: ['readWriteAnyDatabase', 'userAdminAnyDatabase', 'clusterAdmin'] } | |
| user = { user: 'app', pwd: 'password', roles: ['readWrite'] } |