Skip to content

Instantly share code, notes, and snippets.

@Kova93
Kova93 / .bashrc
Last active January 23, 2023 12:32
.bashrc for Windows git bash
SSH_AGENT_PID=$(ps | grep ssh-agent | awk '{print $1}')
if [[ -n "$SSH_AGENT_PID" ]]; then
SSH_AUTH_SOCK=$(find /tmp/ssh-* -name "agent.$(( $SSH_AGENT_PID - 1 ))")
export SSH_AGENT_PID
export SSH_AUTH_SOCK
else
eval $(ssh-agent)
fi
ssh-add ~/.ssh/id_ed25519
@Kova93
Kova93 / .gitconfig
Last active May 16, 2023 10:32
git aliases
[core]
longpaths = true
[alias]
printbranch = branch --show-current
nuke = !"git reset --hard; git clean -fdx #"
get = !"git fetch origin $1:$1 #"
go = !"if [ \"$(git printbranch)\" != \"$1\" ]; then git get $1; git checkout $1; fi #"
fp = fetch --prune
pullall = !"git pull; git branch -v | grep -Po '(?<=^ )(\\S+)(?=\\s+\\S+\\s+\\[behind \\d+\\])' | xargs -r -L 1 git get #"
cleanupbranches = !"git branch -vv | grep ': gone' | awk '{print $1}' | xargs -r -L 1 git branch -D #"
@Kova93
Kova93 / init.el
Last active January 14, 2020 09:42
emacs init
;; auto-generated
;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
(quote
("0598c6a29e13e7112cfbc2f523e31927ab7dce56ebb2016b567e1eff6dc1fd4f" default)))