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
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
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 'benchmark' | |
gem = ARGV.shift.strip rescue '' | |
if gem == '' | |
STDERR.puts "usage: #{$0} [gem]" | |
exit 1 | |
end | |
`free` |
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 'benchmark' | |
gem = ARGV.shift.strip rescue '' | |
if gem == '' | |
STDERR.puts "usage: #{$0} [gem]" | |
exit 1 | |
end | |
`free` |
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
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
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 'activerecord' | |
require 'active_record/base' | |
require 'active_record/validations' | |
module ActionDuck | |
def self.included(klass) | |
klass.extend ClassMethods | |
klass.send(:include, InstanceMethods) | |
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
/* Jquery plugin for quick Comet long polling connections | |
Nothing special about this (just a recursive Ajax call). | |
The key is having the server hold connections open until there's data to push back to the client. | |
This can be done with Nginx and the nginx_http_push_module (http://github.com/slact/nginx_http_push_module) | |
---------------------------------------------------------------------------*/ | |
(function($){ | |
var changed, etag; | |
var wait = 1000; | |
$.comet = function(url, success_callback, error_callback) { |
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
namespace :bundler do | |
task :install do | |
run("gem install bundler --source=http://gemcutter.org") | |
end | |
task :symlink_vendor do | |
shared_gems = File.join(shared_path, 'vendor/gems') | |
release_gems = "#{release_path}/vendor/gems/" | |
%w(cache gems specifications).each do |sub_dir| | |
shared_sub_dir = File.join(shared_gems, sub_dir) |
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
# include at least one source and the rails gem | |
source :gemcutter | |
gem 'rails', '~> 2.3.5', :require => nil | |
group :development do | |
# bundler requires these gems in development | |
gem 'rails-footnotes' | |
end | |
group :test 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
# Author: Michael van Rooijen | |
# Description: | |
# A Rails Stack Installer for Ubuntu 8.04/9.04 with the light-weight and fast NginX Web Server. | |
# This shell script will install a basic Rails Stack with a bunch of useful and commonly used utilities. | |
# It will install Ruby Enterprise Edition with Phusion Passenger (Reduces Rails Application Memory Usage By Approx. 33%) | |
# It will install some essential gems like mysql, sqlite, postgres etc. | |
# It will install NginX Web Server | |
# It will install the MySQL database | |
# It will install Git | |
# It will install these utilities: ImageMagick, FFMpeg, Memcached |
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
/* Ismael Celis 2010 | |
Simplified WebSocket events dispatcher (no channels, no users) | |
var socket = new ServerEventsDispatcher(); | |
// bind to server events | |
socket.bind('some_event', function(data){ | |
alert(data.name + ' says: ' + data.message) | |
}); |
OlderNewer