Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mikestok on github.
  • I am mikestok (https://keybase.io/mikestok) on keybase.
  • I have a public key ASDNFHiNthDAjGMhBUl6MuyOZDgRhOu1U_Z7TnqegMbkWAo

To claim this, I am signing this object:

#!/usr/bin/env bash
#
# WARNING: Rubocop 0.36.0 can turn not(foo) into notfoo :-( Need to check that
# or wait for 0.37.x to be safe.
#
# Perform automated cleanp of ruby files leaving only uncorrected problems'
# rubocop:disable lines in the files.
#
# e.g.
#
An error occurred while Lint/DefEndAlignment cop was inspecting /Users/mike/tmp/bug.rb.
An error occurred while Lint/UselessComparison cop was inspecting /Users/mike/tmp/bug.rb.
An error occurred while Style/ColonMethodCall cop was inspecting /Users/mike/tmp/bug.rb.
For /Users/mike/tmp: configuration from /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.0/config/default.yml
Inheriting configuration from /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.0/config/enabled.yml
Inheriting configuration from /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.0/config/disabled.yml
Inspecting 1 file
Scanning /Users/mike/tmp/bug.rb
undefined method `size' for nil:NilClass
/Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.0/lib/rubocop/cop/mixin/on_method_def.rb:26:in `modifier_and_def_on_same_line?'
project :test => :shoulda, :renderer => :haml, :stylesheet => :sass, :script => :jquery, :orm => :activerecord
#default routes
APP_INIT = <<-APP
get "/" do
"Hello World!"
end
get :about, :map => '/about_us' do
render :haml, "%p This is a sample blog created to demonstrate the power of Padrino!"
@mikestok
mikestok / stack.rb
Created May 31, 2013 12:23
Simple (incomplete) stack with a command pop
#!/usr/bin/env ruby
class Stack
def initialize(container_class=Array)
@container = container_class.new
end
def empty?
@container.empty?
end
Script started on Tue Oct 5 22:27:26 2010
bash-3.2$ date
Tue Oct 5 22:27:29 EDT 2010
bash-3.2$ ~/tmp/reinstall-cinderella.sh
+ rm -rf /Users/mike/.cinderella.bootstrap.log '/Users/mike/.cider*' /Users/mike/Developer '/Users/mike/.rvm*'
+ perl -pi -e 's/(.*\.(?:cinderella|cider).*)/# $1/' /Users/mike/.profile /Users/mike/.bashrc
+ sudo rm -rf /usr/bin/cinderella /usr/bin/cider /Library/Ruby/Gems/1.8/cache /Library/Ruby/Gems/1.8/doc /Library/Ruby/Gems/1.8/gems /Library/Ruby/Gems/1.8/specifications
Password:
+ sudo gem cleanup
Cleaning up installed gems...
Script started on Sat Oct 2 19:46:59 2010
bash-3.2$ ~/tmp/reinstall-cinderella.sh
+ rm -rf /Users/mike/.cinderella /Users/mike/.cinderella.log /Users/mike/.cinderella.profile '/Users/mike/.cider*' /Users/mike/Developer '/Users/mike/.rvm*'
+ perl -pi -e 's/(.*\.(?:cinderella|cider).*)/# $1/' /Users/mike/.profile /Users/mike/.bashrc
+ sudo rm -rf /usr/bin/cinderella /usr/bin/cider /Library/Ruby/Gems/1.8/cache /Library/Ruby/Gems/1.8/doc /Library/Ruby/Gems/1.8/gems /Library/Ruby/Gems/1.8/specifications
Password:
+ sudo gem cleanup
Cleaning up installed gems...
Attempting to uninstall rails-1.2.6
Unable to uninstall rails-1.2.6: