email is so 1990's.
the kids now are on IM and Facebook. What is next after that?
IM is toally IRC which is so 1990s as well.
Voice chat?
Video chat?
Telepathic chat?
Etheric chat?
two_days_ago:
id: 1
date: <%= Time.now.yesterday.yesterday %>
yesterday:
id: 2
date: <%= Time.now.yesterday %>
today:
id: 3
date: <%= Time.now %>
tomorrow:
id: 4
date: <%= Time.now.tomorrow %>
next_day:
id: 5
date: <%= Time.now.tomorrow.tomorrow %>
class CreateProgramExercises < ActiveRecord::Migration
def self.up
create_table :program_exercises do |t|
t.column :position, :integer
end
end
end
class Program < ActiveRecord::Base
has_many :program_exercises, :order => "order"
has_many :exercises, :through => :program_exercises
end
3) Error:
test_spec {General tests} 003 [ProgramExercises should be ordered by order column](General tests):
ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order' at line 1: SELECT * FROM program_exercises WHERE (program_exercises.program_id = 1) ORDER BY order
create_table :table_name, :id => false do |table|
...
end
create_table :exercises_types, :id => false do |t|
t.column "exercise_id", :integer
t.column "type_id", :integer
end
rake db:migrate VERSION=0 ; rake db:migrate ; rake db:test:clone
Culture is not your friend, a video of Terence McKenna talking.
alias -g S=w:/usr/sness/www.sness.org/images
scp 29962050.jpg S
S current-name.jpg new-name.jpg
# role_id :integer(11)
# role_type :string(255)
class User < ActiveRecord::Base
belongs_to :role, :polymorphic => true
end
class Trainer < ActiveRecord::Base
has_one :user, :as => :role
has_many :clients
end
class Client < ActiveRecord::Base
has_one :user, :as => :role
belongs_to :trainer
end
context "" do
fixtures :trainers
fixtures :clients
fixtures :users
setup do
# Trainers
@deryn = trainers(:deryn)
@gordo = trainers(:gordo)
# Clients
@sness = clients(:sness)
@matt = clients(:matt)
@melissa = clients(:melissa)
end
specify "Client and User should be easy to create and link together" do
t = Client.new
u = User.new
u.login = "userlogin"
u.role = t
u.save_without_validation
u.role.should.be t
t.user.should.equal u
end
specify "Client should be able to be associated with a User" do
@matt.user.should.equal users(:matt)
end
specify "Client should be associated with a trainer" do
@matt.trainer.should.equal @deryn
@sness.trainer.should.equal @deryn
@melissa.trainer.should.equal @gordo
end
specify "Should be able to add a Trainer to a Client" do
c = Client.new
c.trainer = @deryn
c.save
@deryn.clients.length.should.equal 3
end
end
woah, so trippy and cool.
btw, i'm growing lots of watermelons in my garden, just planted 9 out in the garden today. watermelon love.
This is really cool, it's a video job posting, two guys from Montreal trying to start a company for the Job Recruiting market. A neat way to advertise for like minded people. I like the "Mac Switcher" music in the background, and the way it's editted, it makes it pretty funky.
bhairavi 1 [~] % ps -auwwx | grep evince
sness 1762 12.4 13.3 58564 34020 pts/38 Sl+ 18:40 0:04 evince agile_rails_development.pdf
bhairavi 2 [~] % ps -auwwx | grep acroread
sness 1836 16.4 23.9 123364 61160 pts/38 S+ 18:43 0:03 /usr/local/Adobe/Acrobat7.0/Reader/intellinux/bin/acroread agile_rails_development.pdf
[1,2,3].to_json
"[1,2,3]"
puts "123".split("").to_json
["1","2","3"]
a = JSON.parse "123".split("").to_json
["1", "2", "3"]
# Split the symbols_sent string into a javascript array
def convert_symbols_sent_into_javascript_array()
str = symbols_sent
n = "["
for i in (0...str.length)
n += "\"" + str[i..i] + "\""
if i < str.length - 1
n += ", "
end
end
n += "]"
@symbols_split = n
end
gem install json
puts "123".split("").to_json
["1","2","3"]
specify "check json conversion of symbols_sent" do
orig_array = @adam.symbols_sent.split("")
json_array = JSON.parse
@adam.convert_symbols_sent_into_javascript_array
json_array.should.equal orig_array
end
# Split the symbols_sent string into a javascript array
def convert_symbols_sent_into_javascript_array()
symbols_sent.split("").to_json
end
# == Schema Information
# Schema version: 5
#
# Table name: senders
#
# id :integer(11) not null, primary key
# ip_address :string(255)
# idhash :string(255)
# created_at :datetime
# last_alive :datetime
# last_symbol_index :integer(11)
# receiver_id :integer(11)
# user_id :integer(11)
# symbols_sent :string(255)
# state :string(255)
# archived :boolean(1)
#
class Sender < ActiveRecord::Base
belongs_to :user
has_one :telepathy_test
before_create :generate_idhash
before_create :generate_test
def generate_idhash
write_attribute "idhash", rand(0xffffffffffffffff).to_s(16)
end
# Generate the 10 symbols to be guessed, these are represented by
# integers between 1 and 5
NUM_SYMBOLS = 10
NUM_SYMBOL_TYPES = 5
def generate_test
symbol_string = ""
NUM_SYMBOLS.times do
symbol = rand(NUM_SYMBOL_TYPES) + 1
symbol_string += symbol.to_s
end
end
context "Adam sender" do
fixtures :senders
setup do
@adam = senders(:adam)
@adam.generate_idhash
@adam.generate_test
end
specify "id hash should be between 0 and 0xffffffffffffffff" do
@adam.idhash.to_i(16).should.be > 0
@adam.idhash.to_i(16).should.be < 0xffffffffffffffff
end
specify "total number length of symbols_sent should be NUM_SYMBOLS" do
@adam.symbols_sent.size.should.be Sender::NUM_SYMBOLS
end
specify "all symbols in symbols_sent should be in the range of 0..NUM_SYMBOL_TYPES" do
@adam.symbols_sent.each_byte { |c|
c.chr.to_i.should.be >= 1
c.chr.to_i.should.be <= Sender::NUM_SYMBOL_TYPES
}
end
end
adam:
id: 1
bob:
id: 2
keycode 66 = Super_L
keycode 115 = Hyper_L
add mod2 = Super_L
add mod3 = Hyper_L
Start a new tab:
G
M-x w3m-goto-url-new-session
Make a copy of the the current tab:
C-c C-t
w3m-copy-buffer
Switch to the next and previous tab:
C-c C-n
w3m-next-buffer
C-c C-p
w3m-previous-buffer
Switch between tabs:
C-c C-a
w3m-switch-buffer
and then
M-n and M-p
Close a tab:
C-c C-w
w3m-delete-buffer
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
svn co svn://caboo.se/plugins/court3nay/empty_apps/ssl
telnet zenmoo.zennet.com 7777
telnet cheshire.oxy.edu 7777
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
if (length($line) < 23) {
print "Invalid ligand file. Exitting\n";
exit;
}
New Pricing (effective June 1st, 2007)
Instances
$0.10 per instance-hour consumed (or part of an hour consumed)
Data Transfer
$0.10 per GB - all data uploaded
$0.18 per GB - first 10 TB / month data downloaded
$0.16 per GB - next 40 TB / month data downloaded
$0.13 per GB - data downloaded / month over 50 TB
New Pricing (effective June 1st, 2007)
Storage
$0.15 per GB-Month of storage used
Data Transfer
$0.10 per GB - all data uploaded
$0.18 per GB - first 10 TB / month data downloaded
$0.16 per GB - next 40 TB / month data downloaded
$0.13 per GB - data downloaded / month over 50 TB
Data transferred between Amazon S3 and Amazon EC2 is free of charge
Requests
$0.01 per 1,000 PUT or LIST requests
$0.01 per 10,000 GET and all other requests*
* No charge for delete requests
Storage and bandwidth size includes all file overhead