-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
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
error do | |
exception = request.env['sinatra.error'] | |
Hoptoad::Notifier.send_error exception, params, request.env if %w(staging production).include?(ENV['RACK_ENV']) | |
erb :five_hundred | |
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
#!/bin/bash | |
### Bash Script that automates the steps to set up an LXC (Linux Container) boxed environment on Ubuntu Linux | |
### <http://blog.philippklaus.de/2011/01/container-virtualization-using-lxc-on-ubuntu/> | |
### | |
### More inspiration can be found in <https://github.com/phbaer/lxc-tools> and in | |
### <https://github.com/halcyon/lxc-tools/commit/b428a6973dd12b75c2400d41f60c454e752c10c6> and | |
### <http://mindref.blogspot.com/2011/01/debian-lxc-create.html>. | |
### | |
### Written by Philipp Klaus <philipp.l.klaus @ web.de> |
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
sudo apt-get install libssl-dev | |
sudo gem install fpm | |
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
tar -zxvf ruby-1.9.3-p392.tar.gz | |
cd src/ruby-1.9.3-p392 | |
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/installdir) | |
fpm -s dir -t deb -n ruby -v 1.9.3-p392 -C /tmp/installdir \ | |
-p ruby-VERSION_ARCH.deb -d "libstdc++6 (>= 4.4.3)" \ |
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
worker: QUEUE=* bundle exec rake environment resque:work | |
scheduler: bundle exec rake environment resque:scheduler |
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 Forum | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
field :posts_count, :type => Integer, :default => 0 | |
has_many_related :posts | |
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
namespace :db do | |
desc "Replace the local dev DB with a copy from Heroku." | |
task :pull, [:src, :dest] do |t, args| | |
abort "Only in dev." unless ENV.development? | |
src = args.src || "heroku-app-name" | |
dest = args.dest || "local-db-name" | |
restore = "pg_restore -x -O -d #{dest}" | |
url = "heroku pgbackups:url --app #{src}" |
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
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
# By Peter Cooper | |
# | |
# MIT license | |
# | |
# * Not advised to use in your production environment! ;-) | |
# * Requires Ruby 1.9 | |
# * Supports A and CNAME records | |
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
# * All records get the same TTL |
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 main | |
import ( | |
"bytes" | |
"exec" | |
"log" | |
"os" | |
) | |
// Pipeline strings together the given exec.Cmd commands in a similar fashion |
OlderNewer