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
<%- content_for :main_content do -%> | |
<div id="main_content"> | |
<%= render :partial => 'form' %> | |
</div> <!-- main_content --> | |
<%- 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 HomePageController < ApplicationController | |
# this ensures 'current_user' is populated with the logged in user | |
before_filter :login_required | |
def index | |
# populate an ivar (instance variable) so we can use it in the view | |
@user = current_user | |
@lists = @user.lists | |
@other_things_the_user_owns = @user.other_things_the_user_owns | |
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
# note: this code could be tightened up a lot, | |
# but the concept should be fairly clear | |
class HomePageController < ApplicationController | |
# this ensures 'current_user' is populated with the logged in user | |
before_filter :login_required | |
def index | |
@user = current_user | |
@lists = @user.lists | |
@other_things_the_user_owns = @user.other_things_the_user_owns |
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 CreateContents < ActiveRecord::Migration | |
def self.up | |
create_table :contents do |t| | |
t.text :data | |
# t.integer :layout_order | |
t.integer :position | |
# :position is idiomatic rails | |
t.integer :element_id | |
t.integer :webpage_id | |
t.integer :parent_id |
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
test ubiquity command sharing |
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
[deploy@partners ~]$ ps aux | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 0.0 0.0 1676 476 ? Ss Mar07 1:02 init [3] | |
root 2 0.0 0.0 0 0 ? S Mar07 1:40 [migration/0] | |
root 3 0.0 0.0 0 0 ? SN Mar07 0:00 [ksoftirqd/0] | |
root 4 0.0 0.0 0 0 ? S Mar07 0:00 [watchdog/0] | |
root 5 0.0 0.0 0 0 ? S< Mar07 0:00 [events/0] | |
root 6 0.0 0.0 0 0 ? S< Mar07 4:05 [khelper] | |
root 7 0.0 0.0 0 0 ? S< Mar07 0:00 [kthread] | |
root 9 0.0 0.0 0 0 ? S< Mar07 0:00 [xenwatch] |
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
# installing RVM per http://rvm.beginrescueend.com/install/ from the github repository | |
# on a fresh Snow Leopard install (updated): OSX 10.6.2 | |
new-host:~ george$ mkdir -p ~/.rvm/src/ | |
new-host:~ george$ cd ~/.rvm/src | |
new-host:src george$ rm -rf ./rvm/ | |
new-host:src george$ git clone git://github.com/wayneeseguin/rvm.git | |
Initialized empty Git repository in /Users/george/.rvm/src/rvm/.git/ | |
remote: Counting objects: 8977, done. | |
remote: Compressing objects: 100% (2504/2504), done. |
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
work ∴ cd gitjour | |
error: Gemset 'gitjour' does not exist, rvm gemset create 'gitjour' first. # <= correct, it doesn't exist | |
Using /Users/george/.rvm/gems/ree-1.8.7-2010.02 with gemset gitjour # <= surprising given it doesn't exist, but understandable | |
gitjour ∴ rvm gemdir | |
/Users/george/.rvm/gems/ree-1.8.7-2010.02@gitjour # <= again, surprising given it doesn't exist, but understandable | |
gitjour ∴ ls /Users/george/.rvm/gems/ree-1.8.7-2010.02@gitjour | |
ls: /Users/george/.rvm/gems/ree-1.8.7-2010.02@gitjour: No such file or directory # <= expected | |
gitjour ∴ rvm gemset create 'gitjour' | |
Gemset 'gitjour' does not exist, rvm gemset create 'gitjour' first. # <= I shouldn't see this since I'm in the process of creating it | |
'gitjour' gemset created (/Users/george/.rvm/gems/ree-1.8.7-2010.02@gitjour). # <= I <3 RVM |
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
# == Schema Information | |
# | |
# Table name: flying_spaghetti_monsters | |
# | |
# id :integer(4) not null, primary key | |
# awesomeness :string | |
# meatballs :boolean | |
# last_seen :datetime | |
# model-specific requires |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.5' | |
gem 'mysql2' | |
# gem 'ck_fu', :git => 'git@github.com:george/ck_fu.git' | |
gem 'configatron', '~> 2.6.4' | |
gem 'db_populate', '~> 0.2.6' | |
gem 'fastercsv' # TODO: delete (only needed for initial DB migration) | |
gem 'hoptoad_notifier', '~> 2.4.6' |
OlderNewer