This file contains hidden or 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
# 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 | |
This file contains hidden or 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
import java.io.*; | |
public class PrevaylerJr { | |
public static interface Command extends Serializable { | |
Object executeOn(Object system); | |
} | |
This file contains hidden or 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
#!/usr/bin/env bash | |
"$@" |
This file contains hidden or 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
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 |
This file contains hidden or 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 "./config/environment" | |
use Rails::Rack::LogTailer | |
use Rails::Rack::Static | |
run ActionController::Dispatcher.new |
This file contains hidden or 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 'test/unit' | |
require 'redgreen' | |
class Card | |
attr_reader :suite, :value | |
def initialize(options={}) | |
@suite = options[:suite] | |
@value = options[:value] |
This file contains hidden or 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
// 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); | |
}); |
NewerOlder