Skip to content

Instantly share code, notes, and snippets.

View renatomefi's full-sized avatar
:octocat:
Wahoo!

Renato Mefi renatomefi

:octocat:
Wahoo!
View GitHub Profile
@renatomefi
renatomefi / the-creative-developer.md
Last active December 23, 2016 10:50
The Creative Developer - Abstract

V2

Do you think you can finish a new REST API with 3 simple CRUD endpoints in ONE day? That simple question gets asked many times in your life and it can be a trap, your brain will try to calculate how productive you can be in a single day, what your experiences are with API's and what risks you see. But you are blinded by the fact that the initial task mentions "one day" and you often forget to account for the risks you don't see and you end up giving a really bad estimation! Does it sound familiar? Situations like that show the effects of cognitive bias.

This talk gives an overview of these biases and also exemplifies some of those situations which the goal being to be able to control (or at least be conscious about it) it better in the future!

V1

The Creative Developer is a talk which tries to explore the influences we receive every time while trying to be problem solver, creative and productive

@renatomefi
renatomefi / README.md
Last active December 13, 2021 12:15
Milhog start script for Ubuntu 14.04

This is a simple way to install mailhog, might not be the best solution for everyone, you can look for repositories, still have to register the binary in the PATH, among other things, this is a manual simple install.

Binary download

Download mailhog from the releases page on github: https://github.com/mailhog/MailHog/releases Save the binary at /opt/mailhog/mailhog Give it executable permission chmod +x /opt/mailhog/mailhog

Init script

Download the gist: https://gist.github.com/renatomefi/d133fea9cb5a7b00f91edb24b83d9a31#file-init-d-mailhog-sh Put it at /etc/init.d/mailhog

@renatomefi
renatomefi / gen-jwt-rsa-keys.sh
Last active May 28, 2019 08:29
Generate RS256 JWT keys to use at jwt.io
#!/bin/bash
# This will write private.pem and public.pem in the current directory
# The default key strenght is 2048 bits
# usage:
# # ./gen-jwt-rsa-keys.sh mykey
# # ls
# gen-jwt-rsa-keys.sh mykey-private.key mykey-public.pem
# first time you have to give execution permission or use bash and the filename
# # chmod +x gen-jwt-rsa-keys.sh
KEYNAME=${1:-jwtrsa}
Verifying that +renatomefidf is my blockchain ID. https://onename.com/renatomefidf
@renatomefi
renatomefi / multitail.conf
Last active July 11, 2020 15:49
Symfony 2 and 3 monolog color output with multitail
# Symfony 2, 3, 4 color scheme - aka monolog
# Usage: multitail -cS symfony logfile
# Inspired by: https://gist.github.com/Stubbs/9504462
colorscheme:symfony
cs_re:white,,bold:^\[....-..-.. ..:..:..\]
cs_re:cyan: .*\.(DEBUG):
cs_re:blue: .*\.(INFO|NOTICE):
cs_re:yellow: .*\.(WARNING):
cs_re:red: .*\.(ERROR|CRITICAL):
cs_re:red:(ERROR|CRITICAL)
@renatomefi
renatomefi / mefi.zsh-theme
Created June 3, 2015 00:51
My oh-my-zsh theme
local ret_status="%(?:%{$fg_bold[green]%}#:%{$fg_bold[red]%}#%s)"
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[blue]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[cyan]%}% %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}) %{$fg[yellow]%}✗%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[cyan]%}) "
@renatomefi
renatomefi / php-alternatives-install.sh
Last active December 11, 2018 14:08
Alternatives install for PHP
#!/bin/bash
# ------------------------------------------------------------------
# [Author] Renato Mefi <gh@mefi.in>
# https://github.com/renatomefi
#
# [Desc] Configure alternatives for PHP Installations
# Very usefull when you are building your PHP and don't want to use
# more sofsticated softwares like 'phpbrew', 'php-build', 'php-env' ...
#
# [Usage] ./php-alternatives-install.sh /path/for/php/installation 200
@renatomefi
renatomefi / .travis.template.yml
Created March 31, 2015 12:43
Running Travis after_script only once
# This is a workaround for running Travis after_script only once in a matrix, it has one fault,
# if your chosen build was successful and the others don't, it will run anyway, there are more
# complete solutions available, but here is a simple one.
language: php
php:
- 5.4
- 5.5
- 5.6
@renatomefi
renatomefi / git-mirror-update.sh
Created March 15, 2015 22:49
Simple script to update your git mirrors, with different ssh keys and paths
#!/usr/bin/ssh-agent bash
# Script for updating git mirror repositories
# $1 repository
# $2 ssh key
echo "$(date +'%F %H:%M:%S') Start updating the mirror repository: " $1
ssh-add $2
echo "Key added: " $2