Skip to content

Instantly share code, notes, and snippets.

View ografael's full-sized avatar

ografael

View GitHub Profile
@ografael
ografael / robot.js
Created December 6, 2012 00:00
Zolmeister
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {
@ografael
ografael / robot.js
Created December 5, 2012 23:59 — forked from Shipow/robot.js
Shipow#001
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};
@ografael
ografael / gist:2853942
Created June 1, 2012 17:45 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@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: "« Anterior"
next: "Próximo »"
truncate: "…"
admin:
misc:
@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 / 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 / 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 / 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 / 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 / .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