Skip to content

Instantly share code, notes, and snippets.

View tinogomes's full-sized avatar
😀

Celestino Gomes tinogomes

😀
View GitHub Profile
@klauswuestefeld
klauswuestefeld / gist:1186975
Created September 1, 2011 19:03
Martin Fowler to Usurp Pattern
We couldn’t find that file to show.
@otobrglez
otobrglez / dropbox.rake
Created August 25, 2011 10:01
Rake task for moving Heroku PostgreSQL backups to Dropbox (Rails)
# By Oto Brglez - @otobrglez
# Rake task. Put in your (lib/tasks) folder of your Rails application
# Execute with "rake dropbox:backup"
# Configuration must be inside config/dropbox.yml file
namespace :dropbox do
desc "Backup production database to dropbox"
task :backup do
@klauswuestefeld
klauswuestefeld / gist:1103582
Created July 25, 2011 04:55
PrevaylerJr - "To serve the persistence needs of 99% of information systems in the world using 23 semicolons."
import java.io.*;
public class PrevaylerJr {
public static interface Command extends Serializable {
Object executeOn(Object system);
}
@drnic
drnic / $
Created June 10, 2011 15:20
never fear $ in tutorials again
#!/usr/bin/env bash
"$@"
@samnang
samnang / Rakefile
Created April 29, 2011 03:57
Register RSpec rake's tasks
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
rescue LoadError
task :spec do
abort "Please run `bundle install` to install RSpec."
end
end
@jlindley
jlindley / config.ru
Created April 18, 2011 17:03
Rails 2.3.x config.ru (to allow using http://pow.cx/ )
require "./config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new
require 'rubygems'
require 'test/unit'
require 'redgreen'
class Card
attr_reader :suite, :value
def initialize(options={})
@suite = options[:suite]
@value = options[:value]
// Load dependencies
var app = require("./lib/server").createServer(),
sys = require("sys");
// Start app server
app.listen(3002);
app.get("/:name", function(req, res){
res.render("Hello " + req.params.name);
});