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 / .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 / 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]%}) "
Verifying that +renatomefidf is my blockchain ID. https://onename.com/renatomefidf
@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

$ docker run --rm -i hadolint/hadolint -c config.yaml < ./Dockerfile
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-c\": executable file not found in $PATH": unknown.
$ docker run --rm -i hadolint/hadolint hadolint -c config.yaml - <./Dockerfile

Command argument ignore

$ docker run --rm -i hadolint/hadolint hadolint --ignore DL3007 - <./Dockerfile
$ hadolint echo $?
0

Commenting above the issue on Dockerfile

$ docker run -v $(pwd):/project:ro --workdir=/project --rm -i hadolint/hadolint:latest-debian \
hadolint /project/Dockerfile /project/Dockerfile-something-else
$ echo $?                                                                           
0
FROM alpine:3.8
RUN my_repo = "http://myrepo.git" && cd /tmp && git clone $my_repo
$ docker run -v $(pwd):/project:ro --workdir=/project --rm -i hadolint/hadolint:latest-debian hadolint /project/Dockerfile
/project/Dockerfile:3 SC1068 Don't put spaces around the = in assignments.
/project/Dockerfile:3 DL3003 Use WORKDIR to switch to a directory
ignored:
  - DL3007 # this was here before...
  - SC1068