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 <%= migration_name %> < ActiveRecord::Migration | |
def self.up | |
add_column :<%= table_name%>, :<%= column_name%>, :integer | |
end | |
def self.down | |
remove_column :<%= table_name%>, :<%= column_name%> | |
end | |
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 :pushr do | |
set :pushr_path, "#{deploy_to}/pushr" | |
desc "Install pushr" | |
task :install do | |
run "git clone git://github.com/karmi/pushr.git #{pushr_path}" | |
end | |
task :check do | |
run "cd #{pushr_path}; rake app:check" |
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 Article < ActiveRecord::Base | |
acts_as_state_machine :initial => :opened | |
state :opened | |
state :state2, :enter => Proc.new {|model| puts "entering state 2" }, :after => Proc.new {|model| model.close! } | |
state :state3, :enter => Proc.new {|model| puts "entering state 3" }, :after => Proc.new {|model| model.close! } | |
state :state4, :enter => Proc.new {|model| puts "entering state 4" } | |
state :closed | |
state :returned |
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
get '/?' do | |
haml_with_erb_layout :index | |
end | |
def haml_with_erb_layout(template, options={}) | |
require 'haml' unless defined? ::Haml | |
require 'erb' unless defined? ::ERB | |
# options[:options] ||= self.class.haml if self.class.respond_to? :haml | |
data = lookup_template(:haml, template, options) | |
output = __send__("render_haml", template, data, options) |
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
def form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block) | |
end | |
def adjust_font_size_for_person(param); 0; end | |
def current_person; Person.find(session[:person_id]); end | |
def form_for(record_or_name_or_array, *args, &proc); end | |
def domain_path(id); end | |
def check_domains_path; end | |
def edit_person_path; end | |
def subjects_path; end | |
def link_to(*params); 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/sh | |
while [ 1 ] | |
do | |
sleep 5 | |
/root/jdserv-syslog -q | |
done | |
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
[ | |
{ | |
:date=>2008-03-03, | |
:repositories=>[ | |
{:name=>"prvni", | |
:commits=>...} | |
{:name=>"druhy", | |
:commits=>...} | |
] | |
}, |
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
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- /home/kubicek/margin.ps - | /usr/local/libexec/tray_select.rb -L | |
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
import sys, os, optparse, re | |
def die(msg): | |
print >>sys.stderr, '%s: %s' % (sys.argv[0], msg) | |
sys.exit(1) | |
def getParser(): | |
parser = optparse.OptionParser( | |
usage='%prog [OPTIONS] DIR', | |
description='Allow restricted git operations under DIR', |
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
users: | |
kubicek: | |
repositories: | |
- "xnet/superstudent.git" | |
- "xnet/aukce.git" |
OlderNewer