Skip to content

Instantly share code, notes, and snippets.

Gordon Diggs gdiggs

Block or report user

Report or block gdiggs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9003f2ff09e8571d193e
~/git_repos/forewarn (master) 🐖 rake test TESTOPTS="--seed=23939"
Run options: --seed=23939
# Running:
...............
Finished in 0.005228s, 2869.3674 runs/s, 4782.2790 assertions/s.
View gifs.rb
require 'typhoeus'
class Array; def in_groups(num_groups)
return [] if num_groups == 0
slice_size = (self.size/Float(num_groups)).ceil
self.each_slice(slice_size).to_a
end; end
gifs = []
threads = []
View gist:11197688
~/git_repos/rayons (upgrade) 🐖 bundle exec mutant -r ./config/environment Item
Mutant configuration:
Matcher: #<Mutant::Matcher::Scope cache=#<Mutant::Cache> scope=Item(id: integer, title: text, artist: text, year: integer, label: text, format: text, condition: text, price_paid: text, created_at: datetime, updated_at: datetime, color: text, deleted: boolean, discogs_url: text)>
Strategy: #<Mutant::Strategy::Null>
Expect Coverage: 100.000000%
Cannot find definition of: Item._create_callbacks in /usr/local/var/rbenv/versions/rbx-2.2.6/gems/gems/activesupport-4.1.0/lib/active_support/core_ext/class/attribute.rb:86
Cannot find definition of: Item._save_callbacks in /usr/local/var/rbenv/versions/rbx-2.2.6/gems/gems/activesupport-4.1.0/lib/active_support/core_ext/class/attribute.rb:86
Cannot find definition of: Item._update_callbacks in /usr/local/var/rbenv/versions/rbx-2.2.6/gems/gems/activesupport-4.1.0/lib/active_support/core_ext/class/attribute.rb:86
Cannot find definition of: Item._validate_ca
View gist:9bc2b97954a9983d536a
$('svg').each(function(i, e) {
var currentClass = e.getAttribute('class');
e.setAttribute('class', currentClass + ' newClass');
});
View gist:91e4e8db411bd5ed550d
[12] development(main)> class A
[12] development(main)* def !@
[12] development(main)* 'sup'
[12] development(main)* end
[12] development(main)* end
=> :!
[13] development(main)> !A.new
=> "sup"
View gist:17b7f858629916931769
[1] pry(main)> class Fixnum
[1] pry(main)* def +(o)
[1] pry(main)* o
[1] pry(main)* end
[1] pry(main)* end
=> :+
[1] pry(main)> 2 + 5
=> 5
View gist:7953509c52524a466fe4
[1] pry(main)> class Fixnum
[1] pry(main)* def !=(o)
[1] pry(main)* true
[1] pry(main)* end
[1] pry(main)* end
=> :!=
View keybase.md

Keybase proof

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:

View meat_sauce.md
  • 1.5 pounds Ground Beef (I Used Ground Round)
  • 1 Tablespoons Olive Oil
  • 1 whole Large Yellow Onion, Diced
  • 1 whole Green Bell Pepper, Seeded And Diced
  • 3 cloves Garlic, Minced
  • 1/3 cup Wine (or Low Sodium Beef Broth If You Prefer)
  • 2 lbs tomatoes, peeled & crushed
  • 1.5 oz tomato paste
  • 1/2 teaspoon Ground Oregano
  • 1/2 teaspoon Ground Thyme
View gist:686a17614737c9ebb9cb
module Enumerable
def without(value)
reject { |i| i == value }
end
end
# irb(main):006:0> [1,2,3].without(2)
# => [1, 3]
You can’t perform that action at this time.