- Alda Rocha: Mulheres que falam e palestram
- Alex Braha Stoll: Ruby + Rust
- Anderson Dias: 3B de jobs no Sidekiq
- Andre Luis Anastacio: Effective Rails Instrumentation
- Artur Caliendo Prado: Grafana, StatsD e InfluxDB
- Bruno Alves: Arquitetura de micro serviços
- Camila Campos: Como não escrever seus testes
- Charlotte Lorelei Oliveira: [Tolerância a falhas com supervisor trees em Elixir](https://docs.google.com/presentation/d/e/2PACX-1vT8eAiVAgK5_aHBduO-P2Cb1QbeaX4DyvHAsDbgfKOt0lDVBEl4Qm_KeCx7mNGn7PS16gMgZ-ffLkrO/pub?start=false&loop=fa
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 Mecha | |
private attr_accessor(:states_map, :callbacks, :transitions, :current_state) | |
public :transitions, :current_state | |
def initialize(initial_state:, transitions:) | |
self.states_map = transitions.parameters.select { |(type, _)| type == :keyreq }.to_h { [_2, _2] } | |
self.callbacks = Hash.new { |hash, key| hash[key] = [] } | |
self.transitions = transitions.call(**states_map).transform_values(&:freeze).freeze |
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
CRYSTAL = crystal | |
UNAME = "$(shell uname -ms)" | |
LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib | |
LIBS = -levent -lpcl -lpcre -lgc -lpthread | |
LDFLAGS = -Wl,-undefined,dynamic_lookup | |
TARGET = crystal_example_ext.bundle | |
$(TARGET): crystal_example_ext.o | |
$(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS) |
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 | |
# .git/hooks/pre-commit | |
# Git pre-commit hook that catches errors that I commonly make. | |
# | |
# To intentionally ignore the hook (i.e., when adding an alert call), commit | |
# from the command line with "--no-verify" | |
# | |
# Loosely based on Henrik Nyh's <http://henrik.nyh.se> work (2011-10-08) | |
# under the MIT License. |
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
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'lotus-router' | |
gem 'lotus-controller' | |
gem 'lotus-view' | |
group :test do | |
gem 'rspec' | |
gem 'capybara' |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
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 -e 'z=0x1F551;->(c,&b){loop{c.each(&b)}}.(11.times.map{|i|[z+i].pack("U")}){|m|print "#{"\b"*3}#{m} ";sleep 0.1}' |
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
# http://redis.io/commands/rpoplpush | |
module Resque | |
def self.move_queue(source, destination) | |
r = Resque.redis | |
r.llen("queue:#{source}").times do | |
r.rpoplpush("queue:#{source}", "queue:#{destination}") | |
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
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
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
require 'bundler/setup' | |
require 'active_record' | |
include ActiveRecord::Tasks | |
db_dir = File.expand_path('../db', __FILE__) | |
config_dir = File.expand_path('../config', __FILE__) | |
DatabaseTasks.env = ENV['ENV'] || 'development' |
NewerOlder