This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application "SimpleWizard" => org.android.example.wizard { | |
screen First { | |
# textView: "This is the first screen" {} | |
# button: "Next >" to Second {} | |
} | |
screen Second { | |
# textView: "And this is the second screen" {} | |
# button: "< Back" to First {} | |
# button: "Next >" to Third {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Vendoriza as gems automatizamente usando o Bundler | |
require "bundler/capistrano" | |
default_run_options[:pty] = true | |
ssh_options[:forward_agent] = true # Permite que o deploy use minhas chaves ssh | |
#Aplicação | |
set :application, "mytestapp" #nome da aplicação | |
#Os endereços dos diferentes servidores envolvidos no deployment | |
role :web, "mytestapp.reinaldojunior.net" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.eclipse.amalgam.tutorials.cheatsheets.xtext.actions; | |
import org.eclipse.jface.action.Action; | |
import org.eclipse.jface.dialogs.Dialog; | |
import org.eclipse.jface.viewers.StructuredSelection; | |
import org.eclipse.jface.wizard.WizardDialog; | |
import org.eclipse.swt.widgets.Shell; | |
import org.eclipse.ui.PlatformUI; | |
import org.eclipse.ui.cheatsheets.ICheatSheetAction; | |
import org.eclipse.ui.cheatsheets.ICheatSheetManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'date' | |
require 'uri' | |
# usage: ruby import.rb my-blog.xml | |
# my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
data = File.read ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyAwesomeEngine | |
class Engine < Rails::Engine | |
#isolate_namespace MyAwesomeEngine | |
config.after_initialize do | |
puts "Terminou a inicializacao" | |
end | |
# Antes de cada requisição (1 vez em production e sempre em development) | |
config.to_prepare do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webkit_server (capybara-webkit) leaks memory on the following environment: | |
* Mac OS X Mountain Lion (10.8.2) | |
* XQuartz 2.7.4 | |
* Qt 4.8.3 | |
How to fix: | |
1) Downgrade Qt to 4.7.4 | |
brew unlink qt | |
cd `brew --prefix` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
robot.clone(); | |
if(robot.parentId){ | |
robot.turn(90); | |
robot.ahead(50); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Robot(robot) { | |
this.dd = false; | |
} | |
// well, we need to do something... | |
// whenever our robot is idle, this method gets called. | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; |