Skip to content

Instantly share code, notes, and snippets.

View ografael's full-sized avatar

ografael

View GitHub Profile
@ografael
ografael / combo_dinamico.html
Created March 14, 2012 15:12
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@ografael
ografael / .rvmrc
Created March 21, 2012 22:07 — forked from mergulhao/.rvmrc
Rake de deploy para o Heroku
export AMAZON_S3_BUCKET=mybucket-development
export AMAZON_ACCESS_KEY_ID=xxx
export AMAZON_SECRET_ACCESS_KEY=xxx
rvm 1.9.2@nome-da-app --create
@ografael
ografael / startupdev_heroku_bootstrapp.sh
Created March 21, 2012 22:08 — forked from rafaelp/startupdev_heroku_bootstrapp.sh
Startup DEV - Heroku Bootstrapp
#!/bin/bash
heroku auth:login
heroku create $1 --stack cedar
heroku sharing:add contato@mergulhao.info
heroku sharing:add ramonpage@gmail.com
heroku sharing:add rafael.lima@bielsystems.com.br
heroku addons:add shared-database:5mb
heroku addons:add custom_domains:basic
heroku addons:upgrade logging:expanded
@ografael
ografael / .rvmrc
Created March 21, 2012 22:11 — forked from mergulhao/.rvmrc
Rake de deploy para o Heroku
export AMAZON_S3_BUCKET=mybucket-development
export AMAZON_ACCESS_KEY_ID=xxx
export AMAZON_SECRET_ACCESS_KEY=xxx
rvm 1.9.2@nome-da-app --create
@ografael
ografael / integrate.rake
Created March 21, 2012 23:05 — forked from rafaelp/integrate.rake
Rake task to synchronous continuous deployment of Rails application deployed on Heroku
# -*- encoding : utf-8 -*-
namespace :integration do
namespace :heroku do
task :add_remote do
sh "git remote add staging git@heroku.com:nomedoprojeto-staging.git" if `git remote |grep staging`.strip.blank?
sh "git remote add production git@heroku.com:com:nomedoprojeto-production.git" if `git remote |grep production`.strip.blank?
end
task :check do
var = `heroku config -s --app nomedoprojeto-staging|grep INTEGRATING_BY`
@ografael
ografael / integrate.rake
Created March 21, 2012 23:10 — forked from rafaelp/integrate.rake
Rake task to synchronous continuous deployment of Rails application deployed on Heroku
# -*- encoding : utf-8 -*-
namespace :integration do
namespace :heroku do
task :add_remote do
sh "git remote add staging git@heroku.com:nomedoprojeto-staging.git" if `git remote |grep staging`.strip.blank?
sh "git remote add production git@heroku.com:com:nomedoprojeto-production.git" if `git remote |grep production`.strip.blank?
end
task :check do
var = `heroku config -s --app nomedoprojeto-staging|grep INTEGRATING_BY`
@ografael
ografael / deploy.rake
Created March 21, 2012 23:13 — forked from rafaelp/deploy.rake
Rake task to deploy Rails project to Heroku
# -*- encoding : utf-8 -*-
namespace :heroku do
namespace :deploy do
PRODUCTION_APP = 'nomedoprojeto-production'
STAGING_APP = 'nomedoprojeto-staging'
def run(*cmd)
system(*cmd)
raise "Command #{cmd.inspect} failed!" unless $?.success?
end
@ografael
ografael / Gemfile
Created March 22, 2012 02:15 — forked from mergulhao/Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'jquery-rails', '1.0.16'
gem 'pg', '0.11.0'
gem 'silent-postgres', '0.0.8'
gem 'thin', '1.2.11'
gem 'haml', '3.1.3'
gem 'delayed_job', '2.1.4'
gem 'state_machine', '1.1.0'
@ografael
ografael / rails31init.md
Created March 22, 2012 22:46 — forked from jraines/rails31init.md
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@ografael
ografael / rails_admin.pt-BR.yml
Created March 23, 2012 14:21 — forked from krsmurata/rails_admin.pt-BR.yml
Portuguese (pt-BR) translation for RailsAdmin 3.2
pt-BR:
home:
name: Home
views:
pagination:
previous: "&laquo; Anterior"
next: "Próximo &raquo;"
truncate: "…"
admin:
misc: