Skip to content

Instantly share code, notes, and snippets.

View schneems's full-sized avatar

Richard Schneeman schneems

View GitHub Profile

Thanks for being a part of CodeTriage we've got some news to share!

DocsDoctor.org

We're excited to announce the launch of DocsDoctor.org, it's like CodeTriage for docs! Select a project and you'll get documented methods right in your inbox. If you're really adventurous, find gaps by receiving undocumented methods. Get easy commits and make open source a better place by writing docs.

Be a better programmer: Sign up for DocsDoctor today!

Ruby Hero 2015 Voting

Thread.new do
begin
while true
sleep
end
ensure
puts "it's a TRAP"
end
end
Process.kill("TERM", Process.pid)
This file has been truncated, but you can view the full file.
$ bundle exec foreman start
12:46:28 web.1 | started with pid 5807
12:46:28 web.1 | [5807] Puma starting in cluster mode...
12:46:28 web.1 | [5807] * Version 2.11.1 (ruby 2.2.2-p95), codename: Intrepid Squirrel
12:46:28 web.1 | [5807] * Min threads: 8, max threads: 32
12:46:28 web.1 | [5807] * Environment: development
12:46:28 web.1 | [5807] * Process workers: 4
12:46:28 web.1 | [5807] * Preloading application
12:46:28 web.1 | [5807] * Listening on tcp://0.0.0.0:9292
12:46:28 web.1 | [5807] ! WARNING: Detected 1 Thread(s) started in app boot:
scp -p -i <amazon private key file> <file to transfer> root@<ec2-....compute-1.amazonaws.com>:<destination file in amazon server>
scp -p -i <amazon private key file> <file to transfer> root@<ec2-....compute-1.amazonaws.com>:<destination file in amazon server>
@schneems
schneems / gist:e09c95da37a8c50047a8
Created May 12, 2015 18:23
Find 50 most popular Gems that have mime-types as a dependency
require 'net/http'
require 'json'
def rubygems_get(gem_name: "", endpoint: "")
path = File.join("/api/v1/gems/", gem_name, endpoint).chomp("/") + ".json"
JSON.parse(Net::HTTP.get("rubygems.org", path))
end
results = rubygems_get(gem_name: "mime-types", endpoint: "reverse_dependencies")
@schneems
schneems / gist:952186
Created May 2, 2011 19:22
Places to check out while teaching in austin
Places to check out while you're in Austin: http://gowalla.com/in/austin
Up North - (Near Executrain)
- Alamo Drafthouse (movies + food + drinks) [http://www.originalalamo.com/]
- NXNW brewery (beer + food)
- Bombay Bistro (indian food)
- Texmex
- Iron Cactus
- Chuys
- Torchys Tacos
@schneems
schneems / drinking_parks_in_austin
Created May 10, 2011 04:16
Parks in Austin Where Drinking is Legal
# Parks in Austin Where Drinking is Legal
Source:
http://www.ci.austin.tx.us/parks/picnic.htm#northeast
Deep Eddy
401 Deep Eddy Avenue
Emma Long Metropolitan Park
1600 City Park Road
@schneems
schneems / gist:1182175
Created August 30, 2011 21:51
akephalos and capybara 1.0.0 errors
1) Capybara::Session with akephalos driver it should behave like session#reset_session! resets current host
Failure/Error: @session.current_host.should be_nil
expected: nil
got: "http://capybara-testapp.heroku.com"
Shared Example Group: "session" called from ./spec/integration/capybara/session_spec.rb:22
# /Users/me/.rvm/gems/ree-1.8.7-2011.03@proj/gems/rspec-expectations-2.6.0/lib/rspec/expectations/fail_with.rb:29:in `fail_with'
# /Users/me/.rvm/gems/ree-1.8.7-2011.03@proj/gems/rspec-expectations-2.6.0/lib/rspec/expectations/handler.rb:21:in `handle_matcher'
# /Users/me/.rvm/gems/ree-1.8.7-2011.03@proj/gems/rspec-expectations-2.6.0/lib/rspec/expectations/extensions/kernel.rb:27:in `should'
# /Users/me/.rvm/gems/ree-1.8.7-2011.03@proj/gems/capybara-1.0.1/lib/capybara/spec/session.rb:64
# /Users/me/.rvm/gems/ree-1.8.7-2011.03@proj/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:48:in `instance_eval'
module Foo
def self.Bar
puts "woot"
end
Bar = self.Bar
end
Foo::Bar # => "woot"