Skip to content

Instantly share code, notes, and snippets.

View aalin's full-sized avatar

Andreas Alin aalin

  • Peru
View GitHub Profile
@aalin
aalin / t_scope.rb
Last active December 11, 2015 13:18 — forked from henrik/t_scope.rb
module I18n
# Usage (Haml in examples):
#
# - t_scope(:"public.sign_up_or_log_in") do |s|
# = simple_format(s.t(:text,
# sign_up: link_to(s.t(:sign_up), signup_path),
# log_in: link_to(s.t(:log_in), login_path)))
#
# is equivalent to
#
@aalin
aalin / vim.rb
Created October 11, 2011 07:19 — forked from uasi/vim.rb
Vim formula for Homebrew
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2'
head 'https://vim.googlecode.com/hg/'
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d'
version '7.3.294'
def features; %w(tiny small normal big huge) end
def find_spec_helper(path)
spec_helper = File.join(path, 'spec_helper.rb')
if File.exists?(spec_helper)
spec_helper
elsif path == "/"
raise "No spec helper found"
else
find_spec_helper(File.dirname(path))
end
end