Skip to content

Instantly share code, notes, and snippets.

View sudara's full-sized avatar
🧪
Brewing new formulas

Sudara sudara

🧪
Brewing new formulas
View GitHub Profile
set :mongrel_base_port, 5000
set :mongrel_restart_delay, 30
set :mongrel_count, 2
namespace :mongrel do
task :restart, :roles => [:app], :except => {:mongrel => false} do
(mongrel_base_port..(mongrel_base_port+mongrel_count)).to_a.each do |port|
sudo "/usr/bin/monit restart mongrel_#{monit_group}_#{port}"
sleep mongrel_restart_delay
end
@sudara
sudara / gist:28514
Created November 24, 2008 16:27 — forked from smoofles/gist:28510
/* • lpl modal */
/* lepilo modal dialog */
/* include low pro for jquery, then.... */
Model = $.klass({
initialize = function() {
$('#cancel_modal').mouseup(function() {
delegate: function(rules) {
return function(e) {
var target = $(e.target);
// first check the target itself
for(var selector in rules){
if (target.is(selector))
return rules[selector].apply(this, $.makeArray(arguments));
}
// then, jump up to parents
for(var selector in rules){