Skip to content

Instantly share code, notes, and snippets.

View leonardoeloy's full-sized avatar

Leonardo Eloy leonardoeloy

View GitHub Profile
@henriquegogo
henriquegogo / .vimrc
Last active December 4, 2020 03:02
My .vimrc
" Made by @henriquegogo
" Script moved to https://github.com/henriquegogo/dotfiles
" I'll maintain this one just for compatibility with old references and history
au VimEnter * !wget https://raw.githubusercontent.com/henriquegogo/dotfiles/master/.vimrc -O ~/.vimrc
@atimb
atimb / agent.js
Last active May 16, 2023 12:20
Real keep-alive HTTP agent for node.js
/**
* Real keep-alive HTTP agent
*
* ------------=================----------------
* UPDATE: There are more proper implementations for this problem, distributed as
* npm modules like this one: https://github.com/TBEDP/agentkeepalive
* ------------=================----------------
*
* The http module's agent implementation only keeps the underlying TCP
* connection alive, if there are pending requests towards that endpoint in the agent
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active September 23, 2024 03:01
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@jmosbech
jmosbech / webstorm-jsx.md
Created January 25, 2014 23:09
WebStorm and JSX

Webstorm and JSX

require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@bishboria
bishboria / springer-free-maths-books.md
Last active October 3, 2024 09:17
Springer made a bunch of books available for free, these were the direct links
@tegud
tegud / metrics-template.json
Created February 19, 2016 12:37
Template for using Elasticsearch as a Time Series Database
{
"metrics" : {
"order" : 0,
"template" : "metrics-*",
"settings" : {
"index" : {
"refresh_interval" : "5s"
}
},
"mappings" : {
@mmasashi
mmasashi / delete_dup_records_redshift.rb
Last active August 31, 2020 22:04
Duplicate Record Delete Query Generator For Amazon Redshift
# Duplicate record delete query generator for Amazon Redshift
# By running a generated query, duplicate rows in a specified table will be removed.
#
# Usage:
# ruby delete_dup_records_redshift.rb <table-name> <priary-keys-with-comma-separator>
unless ARGV.count == 2
puts <<EOT
Usage:
ruby delete_dup_records_redshift.rb <table name> <primary keys>
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
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?