Skip to content

Instantly share code, notes, and snippets.

Ryan Clark ryanclark2

Block or report user

Report or block ryanclark2

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 crap.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am ryanclark2 on github.
  • I am ryanclark (https://keybase.io/ryanclark) on keybase.
  • I have a public key ASDRBs8HHABlUhC8Pw6-KvidP9kipEV1i1GckG0PeEguUAo

To claim this, I am signing this object:

View genesis_public_key
04129796da8dc45296b09a5b56c9ed865c6ca8ce99ec438455ad7bb88d4909ace235dd9b906bfd877ba7c33ab0e2d8879cc6820c8f861ca7956a8e4ee851a0ab8d
View Pivotal KeyBindings
CloseAllEditors:
meta alt w
CloseAllEditorsButActive:
shift meta w
EditorMatchBrace:
ctrl meta alt open_bracket
ctrl meta alt close_bracket
@ryanclark2
ryanclark2 / Deferred_garbage_collection.rb
Created Dec 17, 2015
Deferred Garbage Collection for Specs
View Deferred_garbage_collection.rb
class DeferredGarbageCollection
NEW_GC_THRESHOLD = (ENV["DEFER_GC"] || -1).to_f
@last_gc_run = Time.zone.now
def self.start
GC.disable if NEW_GC_THRESHOLD > 0
end
def self.reconsider
View quake.rb
def strong_enough( earthquake, age )
starting_strength = 1000
cumulative_damage = 1
earthquake.each do |shockwave|
sum = 0
shockwave.each { |value| sum+=value }
cumulative_damage *= sum
end
@ryanclark2
ryanclark2 / Error
Created Mar 12, 2015
Sample Generator Error
View Error
rails g model Stuff
invoke active_record
create db/migrate/20150312174626_create_stuffs.rb
create app/models/stuff.rb
[WARNING] Could not load generator "generators/rspec/model/model_generator". Error: uninitialized constant Rspec::Generators::Base::RSpec.
/opt/rubies/2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.0/lib/generators/rspec.rb:10:in `<class:Base>'
/opt/rubies/2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.0/lib/generators/rspec.rb:9:in `<module:Generators>'
/opt/rubies/2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.0/lib/generators/rspec.rb:7:in `<module:Rspec>'
/opt/rubies/2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.0/lib/generators/rspec.rb:5:in `<top (required)>'
/opt/rubies/2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.0/lib/generators/rspec/model/model_generator.rb:1:in `<top (required)>'
@ryanclark2
ryanclark2 / gist:e8bee5a8e6710ad4b970
Created Mar 4, 2015
NoMethodError: undefined method `url_options' for #<Module:XXXXXX>
View gist:e8bee5a8e6710ad4b970
…ionpack-4.2.0/lib/action_dispatch/routing/route_set.rb: 271:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/route_set.rb: 222:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/route_set.rb: 334:in `block (2 levels) in define_url_helper'
…pack-4.2.0/lib/action_dispatch/routing/routes_proxy.rb: 31:in `new_user_session_url'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/failure_app.rb: 119:in `scope_url'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/failure_app.rb: 104:in `redirect_url'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/failure_app.rb: 64:in `redirect'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/failure_app.rb: 39:in `respond'
…/gems/actionpack-4.2.0/lib/abstract_controller/base.rb: 198:in `process_action'
…/gems/actionpack-4.2.0/lib/abstract_controller/base.rb: 137:in `process'
View gist:a46b8488156905b4cfc6
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 271:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 222:in `call'
…ionpack-4.2.0/lib/action_dispatch/routing/
route_set.rb: 334:in `block (2 levels) in define_url_helper'
…pack-4.2.0/lib/action_dispatch/routing/
routes_proxy.rb: 31:in `new_user_session_url'
…ruby/2.2.0/gems/devise-3.4.1/lib/devise/
failure_app.rb: 119:in `scope_url'
View gist:d824c2422e2ce7ffa753
ninefold help
Commands:
ninefold app SUBCOMMAND # manage your apps
ninefold brutus SUBCOMMAND # make Brutus do things
ninefold console # shortcut for app:console
ninefold db SUBCOMMAND # manage your databases
ninefold dbconsole # shortcut for app:dbconsole
ninefold help [COMMAND] # Describe available commands or one specific command
ninefold logs # shortcut for app:logs
ninefold rake # shortcut for app:rake
You can’t perform that action at this time.