This file contains 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
Traceroute has started ... | |
traceroute: Warning: google.com has multiple addresses; using 64.233.167.99 | |
traceroute to google.com (64.233.167.99), 64 hops max, 40 byte packets | |
1 * * * | |
2 gig10-0-2.ptldmeptl-rtr02.nyroc.rr.com (24.25.160.129) 6.173 ms 6.912 ms 4.960 ms | |
3 ge-5-1-0.syrcnycsr-rtr03.nyroc.rr.com (24.24.7.149) 28.695 ms 26.670 ms 26.702 ms | |
4 ae-3-0.cr0.chi10.tbone.rr.com (66.109.6.72) 44.948 ms 44.729 ms 46.175 ms | |
5 ae-0-0.pr0.chi10.tbone.rr.com (66.109.6.153) 44.950 ms 44.713 ms 42.934 ms | |
6 74.125.48.109 (74.125.48.109) 44.707 ms 44.435 ms 45.423 ms |
This file contains 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
def update | |
@instructor = Instructor.find(params[:id]) | |
respond_to do |format| | |
if @instructor.update_attributes(params[:instructor][course]) | |
flash[:notice] = 'Instructor was successfully updated.' | |
format.html { redirect_to(@instructor) } | |
format.xml { head :ok } | |
else | |
format.html { render :action => "edit" } |
This file contains 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 CreateTextContainers < ActiveRecord::Migration | |
def self.up | |
create_table :text_containers do |t| | |
t.string :formatting | |
t.text :body | |
t.boolean :is_published | |
t.boolean :is_initial_record, :default => true | |
# ... and all the other revisable fields | |
t.timestamps | |
end |
This file contains 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 Page < ActiveRecord::Base | |
acts_as_taggable_on :tags | |
has_many :containers, :as => :containable, :dependent => :destroy, :order => "position" | |
has_many :comments, :as => :commentable, :dependent => :destroy | |
before_validation :generate_slug | |
before_validation :set_dates | |
This file contains 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
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
This file contains 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
# Install logrotate on OS X: | |
# sudo port clean --all logrotate && sudo port install logrotate | |
# Add e.g. this to your crontab: | |
# /opt/local/sbin/logrotate -s /Users/deploy/.logrotate/sites.status /Users/deploy/.logrotate/sites.conf | |
# This file would be sites.conf. | |
# See http://overstimulate.com/articles/logrotate-rails-passenger for more info. | |
daily | |
missingok | |
rotate 30 |
This file contains 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
# from: http://pastie.org/47453 | |
# http://blog.jayfields.com/2007/03/rails-presenter-pattern.html | |
class CompletePresenter < Presenter | |
presentable :account, UserAccount.new | |
presentable :address, Address.new | |
presentable :credential, UserCredential.new | |
def save |
This file contains 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 '../lib/liquid' | |
class User | |
attr_accessor :name | |
liquid_methods :name | |
def initialize(name) | |
@name = name | |
end | |
end |
This file contains 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
alias home='cd ~/' | |
alias ll='ls -lAGhF' | |
alias tld='tail -f log/development.log' | |
alias tlp='tail -f log/production.log' | |
alias ss='script/server' | |
alias ssd='script/server --debugger' | |
alias ssp='script/server -e production' | |
alias sc='script/console' | |
alias scs='script/console --sandbox' | |
alias sg='script/generate' |
This file contains 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
/* | |
NAME: Russell Jones | |
DATE: February 21, 2007 | |
PROJECT: LinSprite | |
FILE: GamePanel.java | |
*/ | |
package linsprite; | |
import java.awt.Color; |
OlderNewer