http://www.codeulatescreencasts.com/products/vim-for-rails-developers
- Typeracer
- [Keyboard cheat sheet][2]
| Hi user33! | |
| Here's what's been happening with your SpeakerRate profile lately. | |
| You were added as a speaker to 2 talks: | |
| * "TDD" (http://speakerrate.test/talks/1126-tdd) | |
| * "TDD" (http://speakerrate.test/talks/1127-tdd) | |
| New ratings on your talks: |
| class Object | |
| def given(meth) | |
| yield self if send(meth) | |
| end | |
| end |
| Processing UserSessionsController#create (for 127.0.0.1 at 2010-11-01 14:12:23) [POST] | |
| Parameters: {"action"=>"create", "authenticity_token"=>"rB6dLcQC55xOHF5Bl3R1/0Y3mqRSkZwYB6q7tyjhu0M=", "controller"=>"user_sessions", "login"=>"dce", "password"=>"[FILTERED]"} | |
| User Load (14.4ms) SELECT * FROM `users` WHERE (`users`.`pseudo_user_token` = '05505517a648f628c45da6d97ece48ead0b21519') LIMIT 1 | |
| insider UserSessions#create | |
| User Load (0.4ms) SELECT * FROM `users` WHERE (LOWER(`users`.login) = 'dce') LIMIT 1 | |
| SQL (0.1ms) BEGIN | |
| Speaker Columns (1.6ms) SHOW FIELDS FROM `speakers` | |
| Speaker Load (0.4ms) SELECT * FROM `speakers` WHERE (`speakers`.`id` = 2) AND (speakers.is_spam = 0 OR NULL) | |
| User Update (0.3ms) UPDATE `users` SET `updated_at` = '2010-11-01 14:12:23', `perishable_token` = 'wizLh57sve3jPaAJBw', `last_login_at` = '2010-11-01 14:10:21', `current_login_at` = '2010-11-01 14:12:23', `login_count` = 4, `last_request_at` = '2010-11-01 14:12:23' WHERE `id` = 2 | |
| SQL (0.6ms) COMMIT |
| def PostsController < ActionController::Base | |
| def create | |
| @post = Post.new(params[:post]) | |
| if @post.save | |
| redirect_to posts_path | |
| else | |
| render :action => "new" | |
| end | |
| end |
http://www.codeulatescreencasts.com/products/vim-for-rails-developers
| require "rubygems" | |
| require "mp3info" | |
| `ls -1 *.flac`.split(/\n/).each do |flac| | |
| filename = flac.gsub("flac", "mp3") | |
| `flac -d -c "#{flac}" | lame - converted/"#{filename}"` | |
| Mp3Info.open("converted/#{filename}") do |mp3| | |
| mp3.tag.title = filename[16..-5] | |
| mp3.tag.artist = "Artist" |
Doug Crockford:
Brendan Eich:
| Io> make_adder := method(x, block(y, x + y)) | |
| ==> method(x, | |
| block(y, x + y) | |
| ) | |
| Io> add5 := make_adder(5) | |
| ==> method(y, | |
| x + y | |
| ) | |
| Io> add5 call(3) | |
| ==> 8 |
| my_fold := method(list, coll, lambda, | |
| if (list size == 0) then ( | |
| return coll | |
| ) else ( | |
| return fold(list rest, | |
| lambda call(coll, list first), | |
| lambda) | |
| ) | |
| ) |
| var util = require("util"); | |
| var clone = function(obj) { | |
| var f = function() { }; | |
| f.prototype = obj; | |
| return new f; | |
| }; | |
| var person = { | |
| name: "Person", |