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
// Lastly, here's a help function pulled from Nick Lewis's blog to alter the form | |
// see: http://www.nicklewis.org/node/967 | |
// Nested fields are implemented by denmarkin. | |
// Usage example: $output .= _ahah_render($form, array('block_settings', 'module_block_'.$delta, 'custom_fields')); | |
function _ahah_render($fields, $name) { | |
$form_state = array('submitted' => FALSE); | |
$form_build_id = $_POST['form_build_id']; | |
// Add the new element to the stored form. Without adding the element to the |
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
set :application, "myapp" | |
# github stuff | |
set :repository, "[email protected]:exampleAcc/myapp.git" | |
set :scm, :git | |
set :scm_username, "github_id" | |
set :scm_passphrase, "github_password" | |
set :branch, "dev" | |
set :git_enable_submodules, 1 |
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
!!! 5 | |
/[if lt IE 7] <html lang="en" class="no-js ie6"> | |
/[if IE 7 ] <html lang="en" class="no-js ie7"> | |
/[if IE 8 ] <html lang="en" class="no-js ie8"> | |
/[if IE 9 ] <html lang="en" class="no-js ie9"> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
%head | |
%meta{:charset => "utf-8"}/ | |
/ | |
Always force latest IE rendering engine (even in intranet) & Chrome Frame |
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
# See http://rubydoc.info/gems/will_paginate/2.3.15/WillPaginate/Collection.create | |
# See https://github.com/mislav/will_paginate/blob/master/lib/will_paginate/array.rb | |
# Do in application_helper.rb or application_controller.rb (or somewhere else application-wide) | |
require 'will_paginate/collection' | |
Array.class_eval do | |
def paginate(options = {}) | |
raise ArgumentError, "parameter hash expected (got #{options.inspect})" unless Hash === options | |
WillPaginate::Collection.create( | |
options[:page] || 1, |
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
--type-add=ruby=.haml,.rake,.feature | |
--type-add=objc=.pch | |
--type-set=xcode=.pbxproj,.pbxuser,.perspectivev3 | |
--type-set=ragel=.rl | |
--type-set=nib=.xib | |
--type-set=plist=.plist | |
--type-set=tmstuff=.tmproj,.tm_build_errors | |
--type-set=ignorables=.log,.tmp,.pdf | |
--noignorables | |
--nonib |
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
set :application, "new-vegas" | |
set :repository, "[email protected]:mdominiak/new-vegas.git" | |
set :scm, :git | |
set :host, "newvegas.vault106.com" | |
set :user, "deploy" | |
set :use_sudo, false | |
set :deploy_to, "/home/deploy/new-vegas/production" | |
role :web, host |
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
### RAILS SHORTCUT GLORY | |
# | |
# printf "\033[0m0 All attributes off\033[0m\n" | |
# printf "\033[1m1 Bold\033[0m\n" | |
# printf "\033[4m4 Underline\033[0m\n" | |
# printf "\033[5m5 Blink\033[0m\n" | |
# printf "\033[7m7 Invert\033[0m\n" | |
# printf "\033[8m8 Hide\033[0m8 = Hide\n" | |
# printf "\033[30m30 Black\033[0m30 = Black\n" |
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
RUBY_HEAP_MIN_SLOTS=600000 | |
RUBY_GC_MALLOC_LIMIT=59000000 | |
RUBY_HEAP_FREE_MIN=100000 |
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
RUBY_HEAP_MIN_SLOTS=500000 | |
RUBY_HEAP_SLOTS_INCREMENT=250000 | |
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
RUBY_GC_MALLOC_LIMIT=50000000 |
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
# See: http://stackoverflow.com/questions/1226302/how-to-monitor-delayedjob-with-monit/1285611 | |
check process delayed_job with pidfile /full/path/to/app/shared/pids/delayed_job.pid | |
start program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job start'" | |
stop program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job stop'" |
OlderNewer