Skip to content

Instantly share code, notes, and snippets.

View Spitfire1900's full-sized avatar

Kyle Gottfried Spitfire1900

  • Web Infra. Admin @ Auto-Owners Insurance
  • Michigan
  • 14:37 (UTC -05:00)
View GitHub Profile
@leucos
leucos / post-commit
Created May 25, 2015 15:57
Transparent encryption/decryption with pre-commit and post-commit hooks
#!/bin/sh
#
# Post-commit hook that decrypts files containing '$ANSIBLE_VAULT'
#
# File should be .git/hooks/post-commit and executable
CRYPT_TAG='^\$ANSIBLE_VAULT'
EXIT_STATUS=0
wipe="\033[1m\033[0m"
@realtimeprojects
realtimeprojects / git-loglive
Last active June 20, 2018 06:08
a live tree view of my current git repository
#!/bin/bash
# usage: git loglive 20
while :
do
tput clear
git --no-pager log -$1 --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"
sleep 1
done
@kylemanna
kylemanna / connmanctl.md
Last active June 27, 2023 23:12
Connmanctl Cheat Sheet
@amiryal
amiryal / git config
Last active February 20, 2024 21:02
Easily visualise Git merge.conflictstyle diff3 with meld, while preserving all information
[merge]
conflictstyle = diff3
tool = three_meld
[mergetool "three_meld"]
# Opens up four diff windows:
# LOCAL:MERGED, BASE:LOCAL, BASE:REMOTE, LOCAL:REMOTE
#
# Lets you edit the MERGED file (including original diff3 markers), showing
# you the final diff from LOCAL. For reference, you can look in the other
# windows to see how LOCAL and REMOTE are each different from BASE, as well
@malclocke
malclocke / gist:943565
Created April 27, 2011 01:31 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
$ git branch -r --merged |
awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' |
xargs git push origin --delete