Skip to content

Instantly share code, notes, and snippets.

View wesleyhf's full-sized avatar
🇧🇷
{"developer":1, "dotaPlayer":1, "catLover":1, "singer":0}

Wesley Francisco wesleyhf

🇧🇷
{"developer":1, "dotaPlayer":1, "catLover":1, "singer":0}
  • Enschede - Netherlands
View GitHub Profile
@wesleyhf
wesleyhf / .zsh
Created February 8, 2017 20:43
Load custom zsh config file per directory
# Load Custom Config File per Directory
function _load_custom_zsh_on_dir () {
if [ -r $PWD/.zsh_config ]; then
source $PWD/.zsh_config
return 0
else
return 1
fi
}
@wesleyhf
wesleyhf / github-status.sh
Created July 31, 2017 18:54
Send github status to Slack using Incoming Webhook
#! /bin/bash
# 0 8,13,18 * * * ./github-status.sh
GITHUB_STATUS_RESPONSE=$(curl -s https://status.github.com/api/last-message.json)
GITHUB_STATUS=$(echo $GITHUB_STATUS_RESPONSE | jq -r '.status')
GITHUB_BODY=$(echo $GITHUB_STATUS_RESPONSE | jq -r '.body')
INCOMING_WEBHOOK='https://hooks.slack.com/services/#######'
case "$GITHUB_STATUS" in
@wesleyhf
wesleyhf / .gitconfig
Last active March 30, 2018 04:28
Useful aliases for git
[alias]
s = status -u
l = log --oneline
a = add --all
cm = commit -m
d = diff
amend = commit --amend --no-edit
unstage = reset HEAD
wip = !git add --all && git commit -q -m 'wip'
@wesleyhf
wesleyhf / delete-branches.sh
Created June 17, 2020 01:45
Delete merged branches on your repository
# delete remote
git branch -r --merged | grep -v '\*\|master\|develop' | sed 's/origin\///' | xargs -n 1 git push --delete origin
# delete local
git branch --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d