Skip to content

Instantly share code, notes, and snippets.

View vinibaggio's full-sized avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
source $HOME/.vimrc
colorscheme vividchalk
set gfn=Menlo\ Regular:h12
set guioptions=egmrt
set showtabline=2
set transparency=5
set lines=50
charset_table: "0..9, a..z, _, A..Z->a..z, U+2E->., U+00C0->a, U+00C1->a,U+00C2->a, U+00C3->a, U+00C4->a, U+00C5->a, U+00C7->c, U+00C8->e,U+00C9->e, U+00CA->e, U+00CB->e, U+00CC->i, U+00CD->i, U+00CE->i,U+00CF->i, U+00D1->n, U+00D2->o, U+00D3->o, U+00D4->o, U+00D5->o,U+00D6->o, U+00D9->u, U+00DA->u, U+00DB->u, U+00DC->u, U+00DD->y,U+00E0->a, U+00E1->a, U+00E2->a, U+00E3->a, U+00E4->a, U+00E5->a,U+00E7->c, U+00E8->e, U+00E9->e, U+00EA->e, U+00EB->e, U+00EC->i,U+00ED->i, U+00EE->i, U+00EF->i, U+00F1->n, U+00F2->o, U+00F3->o,U+00F4->o, U+00F5->o, U+00F6->o, U+00F9->u, U+00FA->u, U+00FB->u,U+00FC->u, U+00FD->y, U+00FF->y, U+0100->a, U+0101->a, U+0102->a,U+0103->a, U+0104->a, U+0105->a, U+0106->c, U+0107->c, U+0108->c,U+0109->c, U+010A->c, U+010B->c, U+010C->c, U+010D->c, U+010E->d,U+010F->d, U+0112->e, U+0113->e, U+0114->e, U+0115->e, U+0116->e,U+0117->e, U+0118->e, U+0119->e, U+011A->e, U+011B->e, U+011C->g,U+011D->g, U+011E->g, U+011F->g, U+0120->g, U+0121->g, U+0122->g,U+0123->g, U+0124->h, U+0125->h, U+0128
module Spec
module MyHelper
def account
accounts(:blank_account)
end
def accounts(fixture)
@fixtures_cache ||= Fixtures.create_fixtures('spec/fixtures', 'accounts')
@fixture_hash ||= Hash[@fixtures_cache]
# spec/acceptance/acceptance_helper.rb
RSpec.configure do |config|
config.before(:each) do
Capybara.current_driver = :selenium if example.metadata[:js]
end
config.after(:each) do
Capybara.use_default_driver if example.metadata[:js]
end
end
def sign_in_with(user = Factory(:user))
visit '/users/sign_in'
fill_in "Email", :with => user.email
fill_in "Password", :with => user.password
click_button 'Sign in'
end
@vinibaggio
vinibaggio / gist:705464
Created November 18, 2010 19:29
Recursos do vim que vem com MacVim
Huge version with MacVim GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +float +folding -footer +fork() +fullscreen
-gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap
+libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession
+modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm
+mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme
@vinibaggio
vinibaggio / optimalperf.rb
Created January 22, 2011 03:01
A few changes over igrigorik's autoperf to support a few more things
#--
# Copyright (C)2008 Ilya Grigorik
# You can redistribute this under the terms of the Ruby license
#
# Modifications by Vinicius B. Fuentes
#++
require 'rubygems'
require 'optparse'
require 'ruport'
@vinibaggio
vinibaggio / call4paperz api
Created March 2, 2011 01:24
Api do call 4 paperz
# Index
http://www.call4paperz.com/events.json
# Show do evento
http://www.call4paperz.com/events/1.json
# Show da proposta
http://www.call4paperz.com/events/1/proposals/1.json
# Evento com JSONP (preste atenção no p no formato)
# coding: utf-8
FB_APP_ID = 'insert_me'
FB_APP_SECRET = 'insert_me'
class AuthApp < Sinatra::Base
use Rack::Session::Cookie
use OmniAuth::Builder do
provider :facebook, FB_APP_ID, FB_APP_SECRET
Module.class_eval do
def redefine_instance_method(name, &block)
old_instance_method = instance_method(name)
define_method(name) do
block.call(self, old_instance_method)
end
end
def redefine_class_method(name, &block)
old_method = method(name)