Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
(extend-type js/RegExp | |
cljs.core.IFn | |
(-invoke ([this s] (re-matches this s)))) | |
(#"foo.*" "foobar") ;=> "foobar" | |
(#"zoo.*" "foobar") ;=> nil | |
(filter #".*foo.*" ["foobar" "goobar" "foobaz"]) ;=> ("foobar" "foobaz") |
# Change ACL on the app/logs and app/cache directories | |
after 'deploy', 'deploy:update_acl' | |
# This is a custom task to set the ACL on the app/logs and app/cache directories | |
namespace :deploy do | |
task :update_acl, :roles => :app do | |
shared_dirs = [ | |
app_path + "/logs", |
module MonkeyIrb | |
def self.included(base) | |
# Monkey-patching Array | |
class << Array | |
def toy(n=10, &block) | |
block_given? ? Array.new(n, &block): Array.new(n) { |i| i + 1 } | |
end | |
end | |