gem install rails --pre
rails new my_app -T
#model (idea 100% stolen from ryanb) | |
def author_tokens=(ids) | |
ids.gsub!(/CREATE_(.+?)_END/) do | |
Author.create!(:name => $1).id | |
end | |
self.author_ids = ids.split(",") | |
end | |
# jquery.tokeninput.js |
irb(main):004:0> Teacher.find_by_id(49) | |
Teacher Load (0.3ms) SELECT "teachers".* FROM "teachers" WHERE "teachers"."id" = 49 LIMIT 1 | |
=> #<Teacher id: 49, name: "Sam Rice", bio: nil, email: nil, created_at: "2011-06-22 21:03:41", updated_at: "2011-06-22 21:03:41", pic_file_name: nil, pic_content_type: nil, pic_file_size: nil, pic_updated_at: nil> | |
irb(main):007:0> Teacher.find_by_name("Sam Rice") | |
Teacher Load (0.3ms) SELECT "teachers".* FROM "teachers" WHERE "teachers"."name" = 'Sam Rice' LIMIT 1 | |
=> nil |
# add this to your spec helper | |
RSpec.configure do |config| | |
config.treat_symbols_as_metadata_keys_with_true_values = true | |
config.filter_run :focus => true | |
config.run_all_when_everything_filtered = true | |
end | |
# and then use the :focus tag in your specs | |
it "does something awesome", :focus do |
$('#book').animate({ | |
opacity: 0.25, | |
left: '+=50', | |
height: 'toggle' | |
}, 5000, function() { | |
// Animation complete. | |
}); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
### INSTALLATION NOTES ### | |
# 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
# 2. brew install zsh | |
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
# 5. Install iTerm2 | |
# 6. In iTerm2 preferences for your profile set: | |
# Character Encoding: Unicode (UTF-8) | |
# Report Terminal Type: xterm-256color | |
# 7. Put itunesartist and itunestrack into PATH |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.
The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.
What can you say?