Skip to content

Instantly share code, notes, and snippets.

View charlenopires's full-sized avatar

Charleno Pires charlenopires

View GitHub Profile
@charlenopires
charlenopires / Result
Created November 21, 2009 19:13 — forked from chuyeow/Result
$ ./hpricot_vs_nokogiri.rb
user system total real
hpricot:doc 0.230000 0.010000 0.240000 ( 0.265904)
nokogiri:doc 0.030000 0.010000 0.040000 ( 0.041641)
user system total real
hpricot:xpath 1.050000 0.020000 1.070000 ( 1.114454)
nokogiri:xpath 0.210000 0.010000 0.220000 ( 0.226418)
user system total real
hpricot:css 1.140000 0.030000 1.170000 ( 1.339635)
nokogiri:css 0.700000 0.010000 0.710000 ( 0.835559)
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da
%% @author Leandro Silva <leandrodoze@gmail.com>
%% @copyright 2011 Leandro Silva.
%% @doc Functional test module for an imaginary websocket application.
-module(imaginary_websocket_app_test).
-author('Leandro Silva <leandrodoze@gmail.com>').
-include_lib("eunit/include/eunit.hrl").
describe "GET current" do
before do
@request.cookies['hidden_notices'] = "1,#{notices(:permanent).id}"
get :current, :format => 'js'
end
it { should respond_with(:success) }
it { should set_cookie(:hidden_notices).to("#{notices(:permanent).id}") }
it { should render_template('notices/current') }
end
@charlenopires
charlenopires / gist:2952294
Created June 19, 2012 04:33
Mongoid.yml for MongoHQ+Heroku
Command: heroku config e verifique o endereço do MONGOHQ_URL gerado pelo AddOn
Crie um Mongoid.yml no diretório /config seguindo o seguinte contexto:
development:
host: localhost
database: yourapp_development
test:
host: localhost
/**
* The sample usage of ECMA 5 Mozilla Features Implemented in V8
* https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8
* You can use thease new feature of ECMA5 on Node.js as you like.
* because there is no IE :)
* Order is deferent form original wiki.
* Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable)
*
* you can execute this file.
* $ node ecma5_on_v8.js
@charlenopires
charlenopires / script.js
Created November 28, 2014 01:42
waves with metablobs
var WIDTH = window.innerWidth;
var HEIGHT = window.innerHeight;
var PARAMS = {
height: 400,
damp: 0.04,
spread: 0.1,
k: 0.025,
g: 0.65,
nParticles: 20
@charlenopires
charlenopires / Animating-SVG-With-GreenSock.markdown
Created November 28, 2014 01:45
Animating SVG With GreenSock
@charlenopires
charlenopires / Elastic-stroke-CSS-+-SVG.markdown
Created November 28, 2014 01:48
Elastic stroke CSS + SVG