Skip to content

Instantly share code, notes, and snippets.

View alexandre-mbm's full-sized avatar

Alexandre Magno alexandre-mbm

  • Natal (RN), Brazil
View GitHub Profile
@alexandre-mbm
alexandre-mbm / config.md
Last active August 29, 2015 14:25 — forked from gladson/config.md
Configuração Virtualenvs Webfaction
require 'tmpdir'
# Usage:
# add to ruhoh-site/plugins/publish/github.rb
# - Your GitHub remote must be setup properly but The command will try to walk you through it.
# - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits.
#
# $ cd ruhoh-site
# $ bundle exec ruhoh publish github
class Ruhoh
@alexandre-mbm
alexandre-mbm / favicon.ico
Last active August 29, 2015 14:11 — forked from mikeymckay/friendly sqlite nosql sinatra
Example: Friendly + Sinatra
#!/usr/bin/env ruby
require 'json' # gem install json # also: activesupport (~> 2.3.18)
require 'rubygems' # gem install rubygems
require 'friendly' # gem install ihoka-friendly
Friendly.configure({
:adapter => "sqlite",
:database => "database.sqlite3"
})

locale_merge.rb

Dependencies:

sudo apt-get install ruby rails

Use:

curl -L http://git.io/locale_merge.rb | ruby - en.yml pt.yml > new-pt.yml