Skip to content

Instantly share code, notes, and snippets.

View nglx's full-sized avatar
✌️
no mud no lotus

marcin naglik nglx

✌️
no mud no lotus
View GitHub Profile
@nglx
nglx / rubycheck_1.rb
Last active August 29, 2015 14:11 — forked from anonymous/rubycheck_1
foo = :bar if false
foo.nil? # => raises an error because...?
@nglx
nglx / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env ruby
require 'benchmark'
REGEXPS = [
/^no such file to load -- (.+)$/i,
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
/^Missing API definition file in (.+)$/i,
/^cannot load such file -- (.+)$/i,
]
@nglx
nglx / gist:3787676
Created September 26, 2012 12:15 — forked from bjallen/gist:3723463
city impact on results
# see what the confidence code means here:
# http://www.mapquestapi.com/geocoding/geocodequality.html
Web::Address.from_params({ :street => "Canal Road", :city => "Orleans", :state => "MA", :country => "US" })
[{"country_name"=>"United States",
"city"=>"Orleans",
"@name"=>"location",
"latitude"=>41.796795,
"country"=>"US",