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
# Perhaps this | |
def run | |
last_id = CatProduct.find(:all, :limit => 1, :order => 'id DESC').first.id | |
last_id_run = 0 | |
num = 0 | |
while(last_id_run < last_id) do | |
this_batch = CatProduct.find(:all, :limit => 100, :offset => num, :order => 'id ASC') | |
GC.start | |
this_batch.each do |cp| |
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
$ unicorn_rails -p3001 | |
I, [2011-07-06T09:55:48.661727 #12729] INFO -- : listening on addr=0.0.0.0:3001 fd=3 | |
I, [2011-07-06T09:55:48.661868 #12729] INFO -- : worker=0 spawning... | |
I, [2011-07-06T09:55:48.662670 #12729] INFO -- : master process ready | |
I, [2011-07-06T09:55:48.663331 #12731] INFO -- : worker=0 spawned pid=12731 | |
I, [2011-07-06T09:55:48.663607 #12731] INFO -- : Refreshing Gem list | |
Sass is in the process of being separated from Haml, | |
and will no longer be bundled at all in Haml 3.2.0. | |
Please install the 'sass' gem if you want to use Sass. |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0.rc4' | |
gem 'therubyracer' | |
gem 'devise' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' |
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-1.9.2-p180 :012 > ::Refinery::Page.page(1) | |
=> [] | |
ruby-1.9.2-p180 :011 > ::Refinery::Setting.page(1) | |
NoMethodError: undefined method `page' for #<Class:0xb4b7228> | |
from /home/jadams/.rvm/gems/ruby-1.9.2-p180@refinerycms/gems/activerecord-3.1.0.rc5/lib/active_record/base.rb:1095:in `method_missing' | |
from (irb):11:in `paginate_all_settings' | |
from /home/jadams/.rvm/gems/ruby-1.9.2-p180@refinerycms/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:275:in `one_cmd' | |
from /home/jadams/.rvm/gems/ruby-1.9.2-p180@refinerycms/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:261:in `block (2 levels) in process_commands' | |
from /home/jadams/.rvm/gems/ruby-1.9.2-p180@refinerycms/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:260:in `each' |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0.rc5' | |
gem 'therubyracer' | |
#gem 'sprockets', :git => 'http://github.com/sstephenson/sprockets' | |
gem 'forem', :git => 'git://github.com/isotope11/forem', :branch => 'fansites-master' | |
#gem 'forem-theme-base', :git => 'git://github.com/radar/forem-theme-base' | |
# Bundle edge Rails instead: |
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
class FiservDataWarehouseImporter | |
attr_accessor :parser, :rows, :errors, :records | |
def initialize(file) | |
@parser = FiservDataWarehouseParser::Parser.new(file) | |
@suspended_debits_exporter = SuspendedDebits::Exporter.new() | |
@errors = [] | |
@records = [] | |
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
#!/bin/bash | |
# NOTE: The following script assumes that you have 1 node with hostname | |
# tandem-ac. Please modify it for the appropriate hostname, and bootstrap | |
# the node ahead of time. Also, set password below. Finally, make sure | |
# you have a hosts entry configured for it if it's not normally | |
# available by hostname. | |
# NOTE: It also must be run from a set-up chef repo. |
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
Handle 0x000E, DMI type 21, 7 bytes | |
Built-in Pointing Device | |
Type: Touch Pad | |
Interface: PS/2 | |
Buttons: 4 |
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
Given /^user "([^"]*)" has selected "([^"]*)" as his receive funds method$/ do |user, receive_funds_method| | |
u = model("user \"#{user}\"") | |
$ai = u.account_information | |
$ai.stubs(:receive_funds_method_raw).returns(receive_funds_method) | |
# Oh gods of ruby, do not be angry with me, for I could find no other way -ja | |
eval <<-EOF | |
class User < ActiveRecord::Base | |
alias_method :original_account_information, :account_information | |
def account_information | |
if id == #{u.id} |
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
--(jadams@timely)-(71/pts/3)-(2158/07-Nov-11)-- | |
--($:~/software)-- | |
$ ./hacketyhack-1.0.1.run | |
Verifying archive integrity... All good. | |
Uncompressing Hackety Hack.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. |