Skip to content

Instantly share code, notes, and snippets.

@matt-fff
matt-fff / pre-commit
Created December 13, 2018 22:22
Apply Black formatting before every commit
git diff --cached --name-status | grep -v '^D' | grep '.py' | sed 's/[A-Z][ \t]*//' | xargs black 2>&1 | grep '^reformatted' | sed 's/reformatted[ \t]//' | xargs git add
@matt-fff
matt-fff / conky-monitor-change.desktop
Created October 19, 2018 16:23
conky configuration (.desktop files in ~/.config/autostart/)
[Desktop Entry]
Exec=~/Workspaces/monitor_change.py
Name=Conky Automatic Restart
Comment=Run Conky automatic restart on monitor change
Type=Application
Icon=video-joined-displays-symbolic
NoDisplay=true
@matt-fff
matt-fff / .tmux.conf
Created October 19, 2018 16:20
tmux configuration
set -g mouse on
# if run as "tmux attach", create a session if one does not already exist
new-session -n $HOST
@matt-fff
matt-fff / .gitconfig
Last active December 9, 2017 22:21
Useful Git Aliases
[alias]
co = checkout
cob = checkout -b
ci = commit
st = status
br = branch
rb = rebase
rbi = rebase -i
brc = "!f(){ git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d; };f"
Verifying my Blockstack ID is secured with the address 1D3Jsbg9FZvdWNtPRV8GtcgmkaRbWZnfCr https://explorer.blockstack.org/address/1D3Jsbg9FZvdWNtPRV8GtcgmkaRbWZnfCr