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
| master>cap staging deploy | |
| * executing `staging' | |
| * executing `deploy' | |
| triggering before callbacks for `deploy' | |
| * executing `deploy:notify:start' | |
| * executing "curl -X POST -d \"application=mrteeth\" http://weather.engineyard.com/`hostname`/deploy_start -fs" | |
| servers: ["72.46.233.55"] | |
| [72.46.233.55:7000] executing command | |
| command finished | |
| Warning: We couldn't notify EY of your deploy, but don't worry, everything is fine |
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
| master>script/delayed_job start | |
| delayed_job: process with pid 7964 started. | |
| master>ps aux | grep 7964 | |
| master>script/delayed_job run | |
| /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:108:in `write': closed stream (IOError) | |
| from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:108:in `flush' | |
| from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:101:in `synchronize' | |
| from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:101:in `flush' | |
| from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:125:in `auto_flush' | |
| from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.rc/lib/active_support/buffered_logger.rb:66:in `add' |
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
| namespace :git do | |
| desc "do a Git commit" | |
| task :commit do | |
| if ENV['commit'].nil? | |
| else | |
| commit_message = ENV['commit'].to_s | |
| # bangle face | |
| puts `clear` | |
| puts `git status` | |
| puts %x{git add .} |
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
| import processing.video.*; | |
| import processing.net.*; | |
| Client myClient; | |
| Server myServer; | |
| //int dataIn; | |
| String whatClientSaid; | |
| String clientImageUrl; | |
| String clientName; | |
| String temp; | |
| PImage clientImage; |
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
| require 'rubygems' | |
| require 'socket' | |
| gem 'twitter' # necessary if you have twitter4r installed as well as twitter | |
| require 'twitter' | |
| IP = "192.168.2.27" | |
| PORT = 2000 | |
| tweets = [] |
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
| require File.join(File.dirname(__FILE__),'..','lib','rack','hapong') | |
| require 'rack/cache' | |
| # Test response when in development mode | |
| # if Merb.environment == 'development' | |
| # use Rack::Lint | |
| # end | |
| # handle OPTIONS / requests without invoking any handlers | |
| use Rack::HAPong |
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
| ActionController::Dispatcher.middleware.use 'Route301', {:routes => [ | |
| {:when => /images.*\.jpg/, :send_to => '/images/default-image.jpg'}, | |
| ]} |
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
| namespace :deploy do | |
| # To avoid having to add a password for sudo, visudo and add | |
| # deployusername ALL=(ALL) NOPASSWD: /etc/init.d/unicorn reload | |
| task :start do | |
| sudo "/etc/init.d/unicorn start" | |
| end | |
| task :stop do | |
| sudo "/etc/init.d/unicorn stop" |
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
| module ApplicationHelper | |
| # In Rails 2 this worked as expected, if the user was admin the block would execute and show up in the view | |
| # In Rails 3 it renders everything on the page up to here twice. | |
| def admin &blk | |
| yield if current_user.admin? | |
| end | |
| 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
| Loading development environment (Rails 3.0.3) | |
| no such file to load -- wirble | |
| ruby-1.8.7-p302 > c = Content.first | |
| => #<Content id: 2, title: "I win", body: nil, tipe: nil, dom_id: nil, position: nil, visible: nil, created_at: "2011-01-14 20:19:37", updated_at: "2011-01-14 20:19:37"> | |
| ruby-1.8.7-p302 > tom = c.to_yaml | |
| => "--- !ruby/object:Content \nattributes: \n position: \n tipe: \n created_at: 2011-01-14 20:19:37.813214\n title: I win\n body: \n dom_id: \n updated_at: 2011-01-14 20:19:37.813214\n id: 2\n visible: \nattributes_cache: {}\n\nchanged_attributes: {}\n\ndestroyed: false\nmarked_for_destruction: false\npersisted: true\npreviously_changed: {}\n\nreadonly: false\n" | |
| ruby-1.8.7-p302 > YAML.load(tom) | |
| NoMethodError: undefined method `keys' for nil:NilClass | |
| from /Users/bob/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.3/lib/active_support/whiny_nil.rb:48:in `method_missing' | |
| from /Users/bob/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-3.0.3/lib/active_record/base.rb:1512:in `attribute_names |