Skip to content

Instantly share code, notes, and snippets.

View leonardoeloy's full-sized avatar

Leonardo Eloy leonardoeloy

View GitHub Profile
@leonardoeloy
leonardoeloy / amazon.md
Created October 2, 2019 16:44 — forked from terabyte/amazon.md
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@leonardoeloy
leonardoeloy / metrics-template.json
Created April 17, 2018 00:27 — forked from tegud/metrics-template.json
Template for using Elasticsearch as a Time Series Database
{
"metrics" : {
"order" : 0,
"template" : "metrics-*",
"settings" : {
"index" : {
"refresh_interval" : "5s"
}
},
"mappings" : {
https://medium.com/@IndianGuru/best-practices-for-a-new-go-developer-8660384302fc
http://golang.org/doc/code.html
http://mwholt.blogspot.in/2014/08/maximizing-use-of-interfaces-in-go.html
http://talks.golang.org/2012/splash.article
http://blog.golang.org/concurrency-is-not-parallelism
https://github.com/feyeleanor/GoSpeed
@leonardoeloy
leonardoeloy / multilogger.rb
Last active August 29, 2015 14:27
MultiLogger with Ruby
module Whatever
class MultiLogger
def initialize(*loggers)
@loggers = loggers
end
def method_missing(method, *args, &block)
@loggers.each do |logger|
logger_method = logger.method(method)
logger_method.call *args, &block

Webstorm and JSX

@leonardoeloy
leonardoeloy / gist:6088412
Created July 26, 2013 12:11
People who bother...
perl -e "foreach my \$i (1..20) {print \$i. ' job Jenkins ';print 'incomoda ' x \$i;if(\$i%2==0){print \"muito mais\n\";}else{print \"muita gente\n\";}}"
@leonardoeloy
leonardoeloy / reasons_to_use_ci_cd.md
Last active November 6, 2018 12:46
Reasons to use CI/CD

Reasons to use CI/CD

Recently, I've been asked by a group of people to provide arguments that should convince developers and managers to use a CI/CD infrastructure. If you're a developer and you haven't been frozen in an icy lake somewhere in Greenland for the past 8-10 years, you don't need to be convinced. Please, move on. You'll only read what you're used to do daily. And to thank you for stopping by, here's a nice photo of a dog:

We all don't

So, if you're still here, it means you're in doubt of how CI/CD will play a role in our software development utility belt. Although we all know that automated tests and even a simple CI/CD infrastructure are the foundation of modern software development practices, I wasn't able to answer their questions right on spot. I mean, it's obvious that what we do has benefits, but we still don't know how to quantify them. Often, we see folks banging their heads against the wall trying to figure out _wh

@leonardoeloy
leonardoeloy / gist:5691141
Last active December 17, 2015 23:39
O_O!
static inline unsigned short fe_ip_checksum(unsigned char *iph, unsigned int ihl) {
unsigned int soma;
asm volatile(
"movl (%1), %0" \
"subl $4, %2" \
"jbe 2f" \
"addl 4(%1), %0" \
"adcl 8(%1), %0" \
"adcl 12(%1), %0" \
@leonardoeloy
leonardoeloy / create_issue_from_note_gitlab.patch
Created September 26, 2012 12:08
Create issue from note in Gitlab
--- gitlabhq_original/app/controllers/notes_controller.rb 2012-09-26 08:58:50.000000000 -0300
+++ gitlabhq/app/controllers/notes_controller.rb 2012-09-26 08:35:35.000000000 -0300
@@ -17,6 +17,17 @@
def create
@note = Notes::CreateContext.new(project, current_user, params).execute
+ if not params[:create_issue].nil?
+ issue_params = {
+ :title => params[:note][:note][0..40] + "...",
+ :description => "#{params[:note][:note]} \n\nNote %#{@note.id}",
@leonardoeloy
leonardoeloy / Authentication.feature
Created July 12, 2012 19:25
Multiple browsers tests with Webinator, SpecFlow and NUnit
Feature: Authentication
In order to SOMETHING
As SOMEONE
I want to SOMETHING
Scenario: Registering with a valid e-mail
Given I am on the registration page
When I fill the "E-Mail" field with "valid@email.com"
And I click "OK"
Then I should be on the confirmation page