Skip to content

Instantly share code, notes, and snippets.

View Nerian's full-sized avatar

Gonzalo Rodríguez-Baltanás Díaz Nerian

View GitHub Profile
➜ sample-capybara-rspec-issue git:(master) ✗ rspec
Puma starting in single mode...
* Version 3.10.0 (ruby 2.4.2-p198), codename: Russell's Teapot
* Min threads: 0, max threads: 4
* Environment: test
* Listening on tcp://127.0.0.1:49219
Use Ctrl-C to stop
....^CFFFFFFFFFFFFFFFF- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2017-11-19 10:37:49 +0100 ===
- Goodbye!
@Nerian
Nerian / gist:6ea104736101ad7bb103
Created January 30, 2015 11:55
too many gems
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
HTTP 200 OK
Fetching gem metadata from https://rubygems.org/
Query List: ["rails", "mongoid", "sass-rails", "uglifier", "coffee-rails", "jquery-rails", "turbolinks", "jbuilder", "slim-rails", "bootstrap-sass", "autoprefixer-rails", "simple_form", "country_select", "bcrypt", "sorcery", "reform", "mongoid-enum", "bootstrap-typeahead-rails", "dropbox-sdk", "carrierwave", "carrierwave-mongoid", "font-awesome-rails", "pundit", "mongoid-sadstory", "dropzonejs-rails", "bootstrap-datepicker-rails", "rails-i18n", "bootstrap-wysihtml5-rails", "cocoon", "jquery-ui-rails", "rails_12factor", "rspec-rails", "capybara", "guard-rspec", "ruby_gntp", "selenium", "letter_opener_web", "rails_admin", "quiet_assets", "better_errors", "binding_of_caller", "powder", "fabrication", "database_cleaner", "pry-rails"]
Query Gemcutter Dependency Endpoint API: rails,mongoid,sass-rails,uglifier,coffee-rails,jquery-rails,turbolinks,jbuilder,slim-rails,bootstrap-sass,autoprefixer-rails
Failure/Error: expect { clinic.create_invoice(invoice_attributes.merge({:invoice_number => '2012 - 5'})) }.to_not change{ clinic.next_invoice_number.number }.from(1).to(2)
NotImplementedError:
`expect { }.not_to change { }.to()` is not supported
➜ bundler git:(backport_to_186) rake spec
/Users/Nerian/projects/bundler/lib/bundler/lockfile_parser.rb:56:in `<class:LockfileParser>': uninitialized constant Bundler::Source::SVN (NameError)
from /Users/Nerian/projects/bundler/lib/bundler/lockfile_parser.rb:14:in `<module:Bundler>'
from /Users/Nerian/projects/bundler/lib/bundler/lockfile_parser.rb:13:in `<top (required)>'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler/definition.rb:58:in `initialize'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:178:in `new'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:178:in `to_definition'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:11:in `evaluate'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler/definition.rb:26:in `build'
from /Users/Nerian/.rvm/gems/ruby-2.1.1/gems/bundler-1.6.2/lib/bundler.rb:153:in `definition'
#!/usr/bin/env ruby
#
# Locates and removes Homebrew installation
# http://brew.sh/
#
# Author: Stephen Benner
# https://github.com/SteveBenner
# https://gist.github.com/SteveBenner/11254428
#
require 'optparse'
class ConcurrencyTestApp < Sinatra::Base
get "/asynch_test" do
Net::HTTP.get(URI("http://localhost:5000/long_call"))
"Hello world"
end
get "/long_call" do
sleep 4
end
➜ projects zsh --version
zsh 5.0.5 (x86_64-apple-darwin13.0.0)
➜ projects rvm get stable --auto-dotfiles
Warning! PATH is not properly set up, '/Users/Nerian/.rvm/gems/ruby-2.1.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.1'.
class MyTestClass
def cucu
tra(1)
tra(2)
end
def tra(args)
end
end
# MySQL sandbox
export SANDBOX_HOME="$HOME/.mysql_sb"
export BINARY_BASE="$HOME/.mysql_sb_bin"
alias mysql_sandbox_start="$HOME/.mysql_sb/rsandbox_5_5_16/start_all"
alias mysql_sandbox_stop="$HOME/.mysql_sb/rsandbox_5_5_16/stop_all"
alias mysql_sandbox_pidcleanup="rm $HOME/.mysql_sb/*/*/data/*.pid"
alias give_a_console="RAILS_ENV=fastdev ruby script/console"
alias resque_worker='RAILS_ENV=fastdev QUEUE=fast,medium,slow,singleton,cloud_backup rake environment resque:work'
alias reset_the_database="time (rake db:reset; rake db:test:clone_structure)"
alias haiku_make_cloud="rake s3:cloudify_domain DOMAIN=lawrence_schools_in confirm=true"
➜ ~ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install openssl098 --use-llvm 2>&1
==> Downloading http://www.openssl.org/source/openssl-0.9.8y.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl098-0.9.8y.tar.gz
tar xf /Library/Caches/Homebrew/openssl098-0.9.8y.tar.gz
==> ./config --prefix=/usr/local/Cellar/openssl098/0.9.8y --openssldir=/usr/local/etc/openssl zlib-dynamic shared
./config --prefix=/usr/local/Cellar/openssl098/0.9.8y --openssldir=/usr/local/etc/openssl zlib-dynamic shared
Operating system: i386-apple-darwinDarwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
Configuring for darwin-i386-cc
Configuring for darwin-i386-cc
no-camellia [default] OPENSSL_NO_CAMELLIA (skip dir)