Skip to content

Instantly share code, notes, and snippets.

View italovieira's full-sized avatar

Ítalo Vieira italovieira

View GitHub Profile
@italovieira
italovieira / setup-nvim.sh
Last active August 19, 2019 19:17
Script for download and setup Neovim
#!/bin/sh
BIN=$HOME/.local/bin/nvim
CONFIG=$HOME/.config/nvim/init.vim
if [ ! -f $BIN ]; then
curl -fLo $BIN --create-dirs \
https://github.com/neovim/neovim/releases/download/stable/nvim.appimage
fi
@italovieira
italovieira / commit-msg
Created December 7, 2020 14:50
Verificar se a mensagem de commit contém o id de uma issue do JIRA (Nullbank)
#!/usr/bin/env bash
# regex to validate in commit msg
commit_regex='(NUL-[0-9]+|merge)'
error_msg="Abortado. Sua mensagem de commit está faltando o id de uma Issue do JIRA"
if ! grep -iqE "$commit_regex" "$1"; then
echo "$error_msg" >&2
exit 1
fi