Skip to content

Instantly share code, notes, and snippets.

View maruno's full-sized avatar

Maruno Ulfdrengr maruno

View GitHub Profile
@maruno
maruno / 0_reuse_code.js
Last active August 29, 2015 14:19
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
@maruno
maruno / string_ext.rb
Last active December 15, 2015 12:39 — forked from jcberthon/string_ext.rb
Ruby String to_boolean monkey patch with Dutch i18n
class String
def to_boolean
return true if self == true || self =~ (/(true|t|yes|y|1|ja)$/i)
return false if self == false || self.nil? || self.empty? || self =~ (/(false|f|no|n|0|nee)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end