Skip to content

Instantly share code, notes, and snippets.

Sergio Rabiela spacechurro

Block or report user

Report or block spacechurro

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
@spacechurro
spacechurro / git_hooks_with_git_templates.md
Last active Oct 24, 2018
auto-installed git hooks for new repos with git templates
View git_hooks_with_git_templates.md

Here is how you can have some default git hooks auto installed with every new repo you clone. I use this to install a pre-push hook that adds a confirmation step to any push to master so that I don't accidentally push up any changes.

  1. set up git to use a templatedir
git config --global init.templatedir '~/.git_template'
mkdir -p ~/.git_template/hooks
  1. add in the pre-push hook code in .git_template/hooks/pre-push
View links_books_email_lists.md
@spacechurro
spacechurro / rspec_its.rb
Last active Aug 29, 2015
undefined method `its' for RSpec::ExampleGroups::ActiveRecordBase::LookupFor:Class
View rspec_its.rb
~/lookup_by 👻 bundle exec rake
/Users/sergio/.rubies/2.1.1/bin/ruby -I/Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.0/lib:/Users/sergio/.gem/ruby/2.1.1/gems/rspec-support-3.0.0/lib -S /Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.0/exe/rspec ./spec/association_spec.rb ./spec/caching/lru_spec.rb ./spec/lookup_by_spec.rb
/Users/sergio/lookup_by/spec/association_spec.rb:62:in `block (2 levels) in <top (required)>': undefined method `its' for RSpec::ExampleGroups::ActiveRecordBase::LookupFor:Class (NoMethodError)
from /Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:331:in `module_exec'
from /Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:331:in `subclass'
from /Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example_group.rb:227:in `block in define_example_group_method'
from /Users/sergio/lookup_by/spec/association_spec.rb:11:in `block in <top (required)>'
from /Users/sergio/.gem/ruby/2.1.1/gems/rspec-core-3.0.
View gist:4053091
~/play/rdiorb$ ./rdio-call --consumer-key <key> --consumer-secret <secret> search query=Morrissey types=artist count=1 -i
{"query"=>"Morrissey", "types"=>"artist", "count"=>"1"}
args: {"query"=>"Morrissey", "types"=>"artist", "count"=>"1"}
Called method: search({"query"=>"Morrissey", "types"=>"artist", "count"=>"1"}) : auth=
Post to url=/1/ method=search args={"query"=>"Morrissey", "types"=>"artist", "count"=>"1"}
{
"status": "ok",
"result": {
"artist_count": 29,
"number_results": 29,
You can’t perform that action at this time.