git (private server)
Alternative: github
Cashboard
+auto.master | |
/net /etc/auto.nfs --ghost, --timeout=30 |
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=1000000000 | |
export RUBY_HEAP_FREE_MIN=500000 | |
# in .bashrc: | |
# | |
# if [ -f ~/.rubyconfig ] ; then | |
# . ~/.rubyconfig |
# run from inside nginx directory | |
./configure --prefix='/opt/nginx' --with-pcre='../pcre-8.12' \ | |
--add-module='/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx' \ | |
--without-http_autoindex_module \ | |
--without-http_ssi_module \ | |
--with-openssl=../openssl-1.0.0d/ \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--pid-path=/var/run/nginx.pid \ |
View: | |
#block | |
%h3 Export | |
%ul{:class=>"horizontal"} | |
%li | |
- if controller.action_name == 'show' | |
= link_to "Open this Permit in Excel", permit_path(@item, :format => :csv) | |
- if controller.action_name == 'index' | |
= link_to "Open the list of Permits in Excel", permits_path(:format => :csv) |
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
def extract_model_name(controller_class); controller_class.to_s.match(/(.+)Controller/)[1]; end | |
def model(controller_class); extract_model_name(controller_class).singularize.constantize; end | |
def symbol_for_model(controller_class, options = {}) | |
tablename = extract_model_name(controller_class).tableize | |
options[:pluralize] ? tablename.to_sym : tablename.singularize.to_sym | |
end | |
describe "an ordinary 'show' action", :shared => true do |
#!/usr/bin/env ruby | |
# | |
# Originally written by http://redartisan.com/tags/csv | |
# Added and minor changes by Gavin Laking | |
# more changes by Kurt Sussman (don't expect 'id' in col#1, no attribute if no data) | |
# | |
# "id","name","mime_type","extensions","icon_url" | |
# "1","unknown","unknown/unknown","||","/images/icon/file_unknown.gif" | |
# "2","image/tiff","image/tiff","|tiff|tif|","/images/icon/blank.png" | |
# |
create_table "permits", :force => true do |t| | |
t.string "number", :null => false | |
t.string "name", :null => false | |
t.string "agency_project" | |
t.integer "contact_id" | |
t.string "category" | |
t.string "when_req" | |
t.string "owner" | |
permit_data: |