Skip to content

Instantly share code, notes, and snippets.

--(jadams@john-galt)-(27/pts/1)-(1833/07-Sep-08)--
--($:~/rails/ansuz)(work)-- ss
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.1.0 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1570:in `const_set': wrong constant name Ansuz::JAdams::ContentSectionVersionsAssociationExtension (NameError)
require 'ostruct'
# This model takes a filename for a CSV file intended as a product
# database. It will match products against existing products,
# creating and deleting products as needed
class ProductCsvImporter
attr_accessor :file, :products, :headers, :contents, :product_groups_with_set_headers, :header_indices
def initialize options
@file = options[:file]
@knewter
knewter / gist:27340
Created November 21, 2008 03:47 — forked from anonymous/gist:27339
asdf" asdfasdf "
odfas
asdfas
>> FasterCSV.parse(s.gsub(/"/, '\"'))
FasterCSV::MalformedCSVError: Illegal quoting on line 1.
from /opt/local/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1650:in `shift'
from /opt/local/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1568:in `loop'
from /opt/local/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1568:in `shift'
from /opt/local/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1513:in `each'
require 'zip/zip'
require 'zip/zipfilesystem'
require 'guid'
class AlbumZipImporter
attr_accessor :file, :photos, :album, :guid, :unzip_dir
def initialize album_name, file
@file = file
@photos = []
--(jadams@goro)-(62/pts/8)-(1159/03-Jan-09)--
--($:~/rails/ansuz_launcher)-- rake launch[fwuffins,baz.com]
(in /home/jadams/rails/ansuz_launcher)
Now run 'sudo rake setup_webserver[fwuffins,baz.com]'
--(jadams@goro)-(63/pts/8)-(1159/03-Jan-09)--
--($:~/rails/ansuz_launcher)-- sudo rake setup_webserver[fwuffins,baz.com]
(in /home/jadams/rails/ansuz_launcher)
Visit http://baz.com/admin and log in as admin/admin
/*
Media Player Plugin
This plugin sets up a Media player that can handle MP3 and OGG Vorbis formats
A flash object is used for MP3 and the <audio> tag (if supported) is for OGG Vorbis.
Copyright (c) 2008 Radio New Zealand
Author: Richard Hulse
This software is released under the GNU GPL version 2 or later. <http://www.opensource.org/licenses/gpl-2.0.php>
alias sg='script/generate'
alias ss='script/server'
alias sc='script/console'
alias sp='script/plugin'
alias sb='script/breakpointer'
alias rdb='rake db:migrate'
alias ri='ri -f ansi -T'
alias dwm='cap disable_web && cap deploy_with_migrations && cap enable_web'
alias sshmd='ssh josh@bloombox.tv'
--(jadams@goro)-(44/pts/2)-(1910/01-May-09)--
--($:~/software/gnome-shell)(sander-master)-- jhbuild shell
__ _ ___ _ __ ___
/ _` |/ _ \| '__/ _ \
| (_| | (_) | | | (_) |
\__, |\___/|_| \___/
|___/
Great men can't be ruled. -Ayn Rand
--(jadams@goro)-(1/pts/2)-(1910/01-May-09)--
--(jadams@quadtopus)-(19/pts/8)-(0904/21-Jul-09)--
--($:~/ruby/bowline-twitter)(master)-- rake app --trace
(in /home/jadams/ruby/bowline-twitter)
** Invoke app (first_time)
** Invoke app:bundle (first_time)
** Execute app:bundle
** Invoke app:build (first_time)
** Execute app:build
rake aborted!
can't modify frozen string
namespace :spec do
namespace :parallel do
desc "prepare parallel test running by calling db:reset for every test database needed with spec:parallel:"
task :prepare, :count do |t,args|
num_processes = (args[:count] || 2).to_i
num_processes.times do |i|
puts "Preparing database #{i + 1}"
`export TEST_ENV_NUMBER=#{i == 0 ? '' : i + 1} ; export RAILS_ENV=test ; rake db:reset`
end
end