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
$ ruby serialization.rb | |
Sizes: | |
marshal: 55 | |
msgpack: 35 | |
json: 46 | |
Rehearsal ----------------------------------------------------- | |
marshal 1.590000 0.050000 1.640000 ( 1.647142) | |
json 1.890000 0.200000 2.090000 ( 2.091030) | |
marshal with yajl 1.590000 0.030000 1.620000 ( 1.624589) | |
json with yajl 1.860000 0.060000 1.920000 ( 1.926875) |
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
#!/usr/bin/env ruby | |
require 'highline/system_extensions' | |
include HighLine::SystemExtensions | |
module Standup | |
module Control | |
extend self | |
def play |
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
function select_towns(towns) { | |
var options = $('#search_town_data option'); | |
towns.split(',').each(function(town_id_string) { | |
options.has('[value='+ town_id_string +']').attr('selected', 'selected'); | |
}); | |
} |
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 Post < ActiveRecord::Base | |
has_many :authors | |
attr_accessor :post_authors | |
memoize :post_authors | |
def post_authors | |
process_post_authors |
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
@import __base.sass | |
@import compass | |
$zen_first_sidebar_width: $zen_blueprint_left_units * $blueprint_grid_outer_width | |
$zen_second_sidebar_width: $zen_blueprint_right_units * $blueprint_grid_outer_width | |
$zen_content_width: $zen_blueprint_content_units * $blueprint_grid_outer_width - $blueprint_grid_margin | |
$zen_gutter: $blueprint_grid_margin | |
$zen_navbar_height: 40px | |
$zen_page_width: $zen_first_sidebar_width + $zen_content_width + $zen_second_sidebar_width |
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
# Match subdomain for a Sinatra route | |
# cz.application.local:4567 => 200 0K | |
# en.application.local:4567 => 404 Not Found | |
# In your /etc/hosts: | |
# 127.0.0.1 cz.application.local | |
# 127.0.0.1 en.application.local | |
require 'rubygems' |
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
module Ahoy | |
def self.included(base) | |
base.public_instance_methods.select {|m| m.to_s =~ /ar/ }.each do |method_name| | |
base.class_eval("alias #{method_name.gsub("ar", "arrr")} #{method_name}") | |
end | |
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
color ir_black " my favorite stock colorscheme is desert | |
set autochdir | |
syntax on | |
set hlsearch | |
set wildmenu | |
set wildmode=longest:full | |
set incsearch | |
filetype plugin on | |
set ruler | |
set laststatus=2 |
NewerOlder