View reference.md
View keybase.md

Keybase proof

I hereby claim:

  • I am felipeelias on github.
  • I am felipeelias (https://keybase.io/felipeelias) on keybase.
  • I have a public key ASCXvgXFgRDO3gzYvfR9Q2V2K9pra4RL5kv-r8M3EoKmfQo

To claim this, I am signing this object:

View pubsub.ex
defmodule Pubsub do
use Application
def start(_type, _options) do
import Supervisor.Spec
IO.puts("Initializing Pubsub app on #{inspect self}")
children = [
worker(Pubsub.Server, [], [name: :server_supervisor])
View daily_walk.go
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
var wg sync.WaitGroup
View party.java
LaundryMachine washer = getLaundryMachine();
washer.open();
List<Unerdwear> pileOfUnerdwear = gatherUnerdwear();
for (Unerdwear underwear : pileOfUnerdwear) {
if (underwear.isDirty() OR underwear.isSticky()) {
washer.load(underwear);
} else {
putOn(underwear);
while (undewear.isntDirty()) {
View spec_helper.rb
RSpec.configure do |config|
config.around do |example|
# For examples using capybara-webkit for example.
# Remove this if you don't use it or anything similar
if example.metadata[:js]
example.run
ActiveRecord::Base.connection.execute("TRUNCATE #{ActiveRecord::Base.connection.tables.join(',')} RESTART IDENTITY")
else
ActiveRecord::Base.transaction do
View post-receive.sh
#!/bin/bash
APP_PATH=/home/applicake/app
# Production environment
export RAILS_ENV="production"
export PATH="/opt/ruby/bin:$PATH"
exit_with_error() {
View posts.rb
require 'date'
class Month
attr_accessor :year, :month
def initialize(year, month)
self.year = year
self.month = month
end
View fixnum_to_proc.rb
class Fixnum
def to_proc
lambda { |x| x + self }
end
end
p [1, 2, 3].map(&2)
# => [3, 4, 5]
View sync.js
function Dog() {
this.url = '/dogs';
this.fetch = function(callback) {
var self = this;
$.getJSON(this.url, function(attributes) {
self.attributes = attributes;
callback(attributes);
});
}