Skip to content

Instantly share code, notes, and snippets.

View qrush's full-sized avatar
🕸️
Making internets

Nick Quaranto qrush

🕸️
Making internets
View GitHub Profile
irb(main):002:0> class Foo; class_attribute :bar; end
=> [:bar]
irb(main):006:0> Foo.bar = "LOL"
=> "LOL"
irb(main):007:0> Foo.bar
=> "LOL"
irb(main):008:0> Foo.new.bar
=> "LOL"
@qrush
qrush / 2015.txt
Last active August 29, 2015 13:57
RubyGems.org Feb Push Stats
irb(main):004:0> pp Version.where("created_at > ? and created_at < ?", DateTime.parse("01 Feb 2015"), DateTime.parse("01 Mar 2015")).count
11374
=> 11374
406.2142857142857 avg for feb 2015
irb(main):005:0> pp Version.where("created_at > ? and created_at < ?", DateTime.parse("01 Mar 2015"), DateTime.parse("01 Apr 2015")).count
12522
=> 12522
@qrush
qrush / mr_freeze.rb
Last active December 30, 2015 15:49
REVENGE IS A DISH BEST SERVED COLD
class String
def ❄︎
freeze
end
end
puts "foo".❄︎.frozen?
# => true
Where did you visit?
Newport
Which of these places?
Newport, RI, USA: [41.4901024, -71.3128285]
Newport, UK: [51.584151, -2.997664]
Newport, OR, USA: [44.6367836, -124.0534505]
Newport, KY, USA: [39.091449, -84.4957757]
Newport, VT 05855, USA: [44.9364356, -72.2051022]
Newport, TN 37821, USA: [35.9670412, -83.1876578]

Friday, 9/20

9:00 am Registration & Snacks

10:00 am Why Developers Quit: Building Teams & Careers Jeff Casimir

10:45 am

@qrush
qrush / gist:6632713
Last active December 23, 2015 11:59 — forked from aquaranto/gist:6500188
Blue Shirts
======
Men's
-----
3 - S --- 4
38(50) - M --- 46
33(50) - L --- 47
17(25) - XL --- 24
9 - XXL --- 11
[master][~/dev/DevCenter.me] brew upgrade node
==> Upgrading 1 outdated package, with result:
node 0.10.15
==> Upgrading node
==> Downloading http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
######################################################################## 100.0%
==> Patching
patching file tools/gyp/pylib/gyp/xcode_emulation.py
==> ./configure --prefix=/usr/local/Cellar/node/0.10.15
==> make install
Error message
NoMethodError: undefined method `name' for nil:NilClass
…fc9660c3fa574b06f376c9a518b29/app/models//applications/rubygems/production/releases/15b6dd6d5fffc9660c3fa574b06f376c9a518b29/app/models/dependency.rbdependency.rb: 58:in `name'
…fc9660c3fa574b06f376c9a518b29/app/models/dependency.rb: 63:in `payload'
…fc9660c3fa574b06f376c9a518b29/app/models/dependency.rb: 69:in `as_json'
/usr/lib/ruby/1.9.1/set.rb: 221:in `block in each'
/usr/lib/ruby/1.9.1/set.rb: 221:in `each_key'
gemcutter_development=# \d versions
Table "public.versions"
Column | Type | Modifiers
-------------------+-----------------------------+-------------------------------------------------------
id | integer | not null default nextval('versions_id_seq'::regclass)
authors | text |
description | text |
number | character varying(255) |
rubygem_id | integer |
built_at | timestamp without time zone | not null
[/tmp] ls -lah timecop-0.6.1/lib/timecop
total 48
drwxr-xr-x 6 qrush wheel 204B Apr 22 15:05 .
drwxr-xr-x 4 qrush wheel 136B Apr 22 15:05 ..
-rw-r--r-- 1 qrush wheel 1.9K Apr 22 15:05 time_extensions.rb
-rw----r-- 1 qrush wheel 4.4K Apr 22 15:05 time_stack_item.rb
-rw----r-- 1 qrush wheel 5.0K Apr 22 15:05 timecop.rb
-rw-r--r-- 1 qrush wheel 38B Apr 22 15:05 version.rb