- Copy
prissy
to~/bin
(or elsewhere in your$PATH
) chmod +x prissy
gem install awesome_print multi_json
$ some_command_that_outputs_json | prissy
$ cat ~/.rspec | |
--color | |
--fail-fast | |
--backtrace | |
--format documentation |
Transcript of http://www.youtube.com/watch?v=bzkRVzciAZg
p1: And in conclusion we have found apache to be an excellent server for our web applications. Any questions?
p2: Yes, I have a question. Why didn't you use node.js? node.js is an event driven, non-blocking IO server that can be used to build high-performance web applications
p1: That is an excellent queiston. We evaluated several alternative webservers and concluded, that while options like node.js are very interesting, Apache meets our needs and has a solid track record.
p2: But it doesn't have performance. Everybody knows that apache applications are slow because they use blocking IO and have context switches.
module GoldPlating | |
extend ActiveSupport::Concern | |
extend ActiveModel::Naming | |
include ActiveModel::Conversion | |
include ActiveModel::Validations | |
included do | |
extend ActiveModel::Callbacks | |
define_model_callbacks :validation |
LETTERS = "abcdefghijklmnopqrstuvwxyz".split('') | |
def base_alpha_26(int) | |
num = int | |
letters = [] | |
i = 0 | |
i += 1 until 26**i > int | |
while (i -= 1) >= 0; |
Viz.WidgetsController = Ember.ArrayController.extend | |
init: -> | |
@refresh() | |
setInterval (=> @refresh()), 5000 | |
refresh: -> | |
$.ajax | |
url: @get('src'), | |
type: "GET", | |
context: this, |
# ZSH Theme - Preview: | |
local ob='%{$fg[blue]%}[%{$reset_color%}' | |
local cb='%{$fg[blue]%}]%{$reset_color%}' | |
local current_dir='%{$fg[green]%}%~' | |
local rvm_ruby='%{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt i v g)%{$reset_color%}' | |
local git_branch='$(git_prompt_info)' | |
PROMPT="${ob}${current_dir}${cb}${ob}${rvm_ruby}${cb}${git_branch} |
# A sample Gemfile | |
source "http://rubygems.org" | |
gem "rbench" | |
gem "mongomatic" | |
gem "bson_ext" | |
gem "activerecord" | |
gem "sequel" | |
gem "pg" |
| Active Record (3.2.0.rc1) mysql | Active Record (3.2.0.rc1) mysql-2 | Sequel mysql | Sequel mysql-2 | | |
------------------------------------------------------------------------------------------------------------------------------------------- | |
insert x1000 | 0.896 | 0.810 | 0.883 | 0.809 | | |
select 1000 records x1000 | 34.637 | 81.096 | 0.017 | 0.016 | |
post = Post.detect { |p| p.author == some_author } # GET /posts?author_href=/authors/1234 | |
posts = Post.select { |p| p.q == "Stuff" } # GET /posts?q=Stuff | |
posts = Post.select { |p| p.title == "Stuff" } # GET /posts (since `title` isn't an available query param, fall back to Enumerable#select) | |
post = Post.get("http://api.ls.com/posts/1") | |
posts = Post.get_collection("http://api.ls.com/posts/1") | |
posts = Post.get_collection(Service.discover("AllPosts")) | |
posts = Post.get_collection() # auto-discovers based on service_name/uri | |
# Given service_uri = /posts{?author_href} |