I hereby claim:
- I am GordonDiggs on github.
- I am gordondiggs (https://keybase.io/gordondiggs) on keybase.
- I have a public key whose fingerprint is B74D FCAF 246D 7F1A DC77 A637 F420 7909 1510 0016
To claim this, I am signing this object:
[1] pry(main)> class Fixnum | |
[1] pry(main)* def !=(o) | |
[1] pry(main)* true | |
[1] pry(main)* end | |
[1] pry(main)* end | |
=> :!= |
I hereby claim:
To claim this, I am signing this object:
module Enumerable | |
def without(value) | |
reject { |i| i == value } | |
end | |
end | |
# irb(main):006:0> [1,2,3].without(2) | |
# => [1, 3] |
irb(main):001:0> defined? Object | |
=> "constant" | |
irb(main):002:0> defined? Foo | |
=> nil | |
irb(main):003:0> defined? bar | |
=> nil | |
irb(main):004:0> bar = "sup" | |
=> "sup" | |
irb(main):005:0> defined? bar | |
=> "local-variable" |
var clickFirst = function() { | |
var $link = $('.pretty-button.positive:not(.pressed):first'); | |
if($link.length > 0) { | |
console.log("clicking"); | |
$link.click(); | |
} else { | |
console.log("no more links"); | |
} | |
}; |
/* | |
From https://gist.github.com/GordonDiggs/9d9eb3007055fa04f0c4 | |
Add this to your caveatPatchor.js file | |
(located at ~Library/Application Support/Propane/unsupported/caveatPatchor.js) | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
require 'nokogiri' | |
require 'open-uri' | |
url = 'http://wfmu.org/currentliveshows_aggregator.php?ch=1,4,6,7,8&_=1422680555670' | |
body = open(url) | |
document = Nokogiri::HTML(body) | |
song = document.css('.bigline')[0].text.gsub(/[\n\r]/, ' ').strip | |
show = document.css('.smallline')[0].text.gsub(/[\n\r]/, ' ').strip |
require 'weather-api' | |
woeid = '12761740' | |
response = Weather.lookup(woeid, Weather::Units::FARENHEIT) | |
puts "#{response.condition.temp}\u00B0 #{response.condition.text}" |
require 'benchmark/ips' | |
def quux(hash_arg) | |
hash_arg = hash_arg.dup | |
10.times { |i| hash_arg.merge!({ "num_#{i}" => i }) } | |
end | |
def corge(hash_arg) | |
hash_arg = Hash[hash_arg] | |
10.times { |i| hash_arg.merge!({ "num_#{i}" => i }) } |