My Recent Pastes (34 and counting)
Pastes by robotpoke (34 and counting)
Below are the 15 most recent pasties by robotpoke.
September 09, 2008
2:38PM EDT
by robotpoke
View all 51 lines
#test code 16 def test_leaf_node 17 a = Factory.create_curriculum_activity 18 19 deny a.is_leaf_node?
September 09, 2008
8:49AM EDT
by robotpoke
View all 10 lines
we have master and a branch, foo. we have some commits in foo that we'd like to merge into master but there are also some commits that should not be merged. what's one way to do this when their are lots of commits? 1. $git checkout -b tmp foo
June 22, 2008
11:06PM EDT
by robotpoke
View all 29 lines
Starting Juggernaut server on port: 5001...D, [2008-06-22T22:48:05.462095 #34732] DEBUG -- : New client [127.0.0.1] D, [2008-06-22T22:48:05.462476 #34732] DEBUG -- : Receiving data: <policy-file-request/> D, [2008-06-22T22:48:05.462730 #34732] DEBUG -- : Processing message: <policy-file-request/>D, [2008-06-22T22:48:05.462950 #34732] DEBUG -- : Sending crossdomain file D, [2008-06-22T22:48:06.474261 #34732] DEBUG -- : New client [127.0.0.1] D, [2008-06-22T22:48:06.478132 #34732] DEBUG -- : Receiving data: {"command": "subscribe", "session_id": "BAh7CToMY3NyZl9pZCIlYmFiOWQ4MDI2MTA4MWNlZjRjYjVkM2UzYWUxYTkz\nOTc6DnJldHVybl90bzA6DHVzZXJfaWRpBiIKZmxhc2hJQzonQWN0aW9uQ29u\ndHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA==--b6909b21d6939186d6f7b19855795b27ea4b446a", "channels": ["jonathan.wallace@gmail.com"]}
June 22, 2008
10:12PM EDT
by robotpoke
jonathanwallace@jonathan-wallaces-macbook[5047]~/Documents/projects/jabber_client% rake gems:install (in /Users/jonathanwallace/Documents/projects/jabber_client) rake aborted! no such file to load -- jabber_client_test_login
June 12, 2008
7:54PM EDT
by robotpoke
View all 14 lines
class ModelWithPaperclipAttachment < ActiveRecord::Base #'name' is the only attribute on this model except any attributes required by paperclip (i forget how it does that) has_attached_file :attachment_name, :path => ":rails_root/:class/:name/:basename.:extension end
May 30, 2008
4:25PM EDT
by robotpoke
View all 77 lines
Using ProFTPd with PostgreSQL (...and Rails) This is an overview of how we will use ProFTPd to link up FTP accounts with Rollbook accounts and users. It’s fairly simple and allows us to leave our data models untouched. For security, care has been taken to ensure all database access by the ftp daemon is read-only and segregated to its own schema. How it Works
May 28, 2008
11:23AM EDT
by robotpoke
View all 13 lines
'newtab' 'newtab' stringlist (default: "") Define which ex commands output the result in a new tab automatically. You can also use :tab command to manually output a command in a new tab.
May 28, 2008
10:59AM EDT
by robotpoke
NOTE: This validation will not fail if the association hasn‘t been assigned. If you want to ensure that the association is both present and guaranteed to be valid, you also need to use validates_presence_of.
May 28, 2008
10:50AM EDT
by robotpoke
View all 27 lines
Warning Validate the presence of the foreign key, not the instance variable itself. Do this: validates_presence_of :invoice_id
May 28, 2008
10:29AM EDT
by robotpoke
View all 16 lines
#account model class Account < ActiveRecord::Base has_many :users end
May 27, 2008
2:28PM EDT
by robotpoke
View all 34 lines
##account controller def create debugger permit "site_admin" @account = Account.new(params[:account])
May 13, 2008
8:48PM EDT
by robotpoke
View all 17 lines
077_create_wiki.rb 7: t.column "description", :text lms_development=# \d wikis
April 01, 2008
4:10PM EDT
by robotpoke
View all 6 lines
:authentication => One of :plain, :login, or :cram_md5. Your server administrator will help choose the right option. There is currently no way of using TLS (SSL) to connect to a mail server from Rails. This parameter should be omitted if your server does not require authentication. If you do omit this param-
April 01, 2008
3:53PM EDT
by robotpoke
View all 11 lines
config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { #we're using stunnel to tunnel TLS (SSL) connections to our gmail app for domains. another option is available at #http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html :address => "localhost",
March 18, 2008
9:39AM EDT
by robotpoke
View all 21 lines
##command line jonathanwallace@Jonathan-Wallaces-Computer[5116]~/rollbook/trunk% /opt/local/bin/ruby -Ilib:test "/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "/Users/jonathanwallace/rollbook/tru nk/test/unit/course_scorm_test.rb" /Users/jonathanwallace/rollbook/trunk/test/unit/course_scorm_test.rb:1: uninitialized constant Test (NameError)
