Skip to content

Instantly share code, notes, and snippets.

View oriolgual's full-sized avatar

Oriol Gual oriolgual

View GitHub Profile
https://kickass.to/the-troll-hunter-i1740707/
https://kickass.to/the-innkeepers-i1594562/
https://kickass.to/sinister-i1922777/
https://kickass.to/the-evil-dead-i0083907/
https://kickass.to/v-h-s-i2105044/
https://kickass.to/the-descent-i0435625/
https://kickass.to/splinter-i1031280/
https://kickass.to/el-espinazo-del-diablo-i0256009/
https://kickass.to/paranormal-activity-i1179904/
https://kickass.to/the-pact-i2040560/
@oriolgual
oriolgual / env.rb
Created February 13, 2015 14:39
Spinach with rspec 3
ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'rspec/rails'
require 'capybara-webkit'
require 'vcr'
VCR.configure do |c|
c.cassette_library_dir = 'fixtures/vcr_cassettes'
c.hook_into :webmock
describe Woman do
its(:mood) { should == [':)', ':(', ':***', ':|', ':__(', ':__)', ':/', ':-)', ':*', ':@'].choice }
end
@oriolgual
oriolgual / gist:475677
Created July 14, 2010 16:57
In Radiant, group children in N slices
<r:children:slice slices="2">
<ul>
<r:each>
<li><r:title /></li>
</r:each>
</ul>
</r:children:slice>
@oriolgual
oriolgual / devise.ca.yml
Created September 21, 2010 19:39
I18n Catalan translation for Devise (http://github.com/plataformatec/devise)
ca:
errors:
messages:
not_found: "no s'ha trobat"
already_confirmed: "ja està confirmat"
not_locked: "no està bloquejat"
devise:
sessions:
link: 'Iniciar sessió'
@oriolgual
oriolgual / numlock.vim
Created September 22, 2010 20:32
Map your number to their correspondeing Shift+Number. Feel free to add more layouts
" Add it to your local vimrc
" Toggle it with Shift+n
let g:numberlock = 0
" Tried with inoremap 1 <S-1> but it wasn't working, so we'll have to set different layouts
" Anyone knows how to fix it?
let g:numberlock_layout = 'us'
nnoremap <silent><F4> :call NumberLock()<CR>
function! NumberLock()
# coding: utf-8
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'cgi'
class Goear
def self.find(song)
puts "Searching for #{song}"
url = "http://www.goear.com/search.php?q=#{CGI.escape(song)}"
@oriolgual
oriolgual / Github https redirect
Created November 3, 2010 10:46
Redirection fail
http://wiki.github.com/aslakhellesoy/cucumber/
GET /aslakhellesoy/cucumber/ HTTP/1.1
Host: wiki.github.com
HTTP/1.1 302 Found
Server: nginx/0.7.67
Date: Wed, 03 Nov 2010 10:45:11 GMT
Content-Type: text/html; charset=utf-8
convert file.jpg -format %c -colors 8 -depth 24 histogram:info:- | sort -r -k 1
@oriolgual
oriolgual / helper_with_class.feature
Created November 17, 2010 14:00
rspec failing feature when a helper has a class inside the module
Scenario: failing test when a helper has a class inside a module
Given a file named "spec/helpers/with_class_helper_spec.rb" with:
"""
require "spec_helper"
describe WithClassHelper do
describe FooClass do
it 'works' do
helper.works.should be_true
end