Skip to content

Instantly share code, notes, and snippets.

@nkbt
Last active March 4, 2022 11:08
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save nkbt/29cd37d70523d7319eaf to your computer and use it in GitHub Desktop.
Save nkbt/29cd37d70523d7319eaf to your computer and use it in GitHub Desktop.
[push]
default = current
[user]
email = nik@butenko.me
name = Nik Butenko
[core]
autocrlf = input
excludesfile = /Users/nkbt/.gitignore
ignorecase = true
[alias]
cl = !git branch --merged | grep -v \\* | grep -v master | grep -v develop | xargs git branch -D
cll = !git branch | grep -v \\* | grep -v master | grep -v develop | xargs git branch -D
log1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
log2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
pl = pull --prune
mr = merge --no-ff --no-edit
clt = !sh -c 'git tag -l | xargs git tag -d'
brv = for-each-ref --sort=-committerdate --format='%(committerdate) %(authorname) %(refname)' refs/remotes/up/
mine = !sh -c 'git brv | grep -e ".$@" | grep Nik'
st = status -sb
tpl = merge --no-ff --no-edit template/master
fix = commit --amend --no-edit
amend = commit --amend
date = commit --amend --no-edit --date
br = !bash -c 'NAME=$(echo "$@" | tr -cd "[[:alnum:][:blank:][:punct:]]" | tr -c "[[:alnum:]/]" "-") && git branch $NAME && git checkout $NAME' -
brr = !bash -c 'git br $(packetloop-jira summary "$0")'
f = fetch --all --prune
local-branches = !bash -c 'git branch --no-color | tr -d "[*[:blank:]]"'
remote-branches = !bash -c 'git branch --remote --no-color | tr -d "[*[:blank:]]" | grep origin | grep -v "\\>" | sed -e "s/^origin\\\\///"'
all-branches = !bash -c 'git branch --all --no-color | tr -d "[*[:blank:]]" | grep -v "\\>" | sed -e "s/^remotes\\\\/origin\\\\///" | grep -v "remotes\\\\/" | sort -u'
match-local-branch = !bash -c 'git local-branches | grep -m 1 -i "$0"'
match-remote-branch = !bash -c 'git remote-branches | grep -m 1 -i "$0"'
match-any-branch = !bash -c 'git all-branches | grep -m 1 -i "$0"'
lb = !bash -c 'git local-branches'
rb = !bash -c 'git remote-branches'
b = !bash -c 'git all-branches'
ls = !bash -c 'git checkout $(git match-local-branch "$0")'
rs = !bash -c 'git checkout $(git match-remote-branch "$0")'
sw = !bash -c 'git checkout $(git match-any-branch "$0")'
ref = symbolic-ref -q HEAD
track = !git for-each-ref --format='%(upstream:short)' $(git ref)
current-branch = !bash -c 'git branch --no-color | grep "\\*" | tr -d "[*[:blank:]]"'
update-current-branch = !bash -c '[[ $(git track) ]] && git rebase --autostash $(git track) || echo Local branch, skipped'
update-branch = !bash -c 'GIT_CURRENT_BRANCH=$(git current-branch) && echo "Updating $0" && git checkout "$0" -q && git update-current-branch && git checkout $GIT_CURRENT_BRANCH -q'
up = !git f && git local-branches | xargs -I {} git update-branch {}
[color]
ui = 1
[diff]
renames = copies
renameLimit = 0
[url "git@github.com:"]
insteadOf = https://github.com/
atlassian-ide-plugin.xml
*.pyc
config/environments/david.rb
config/development.sphinx.conf
config/unicorn.rb
# db files
lib/GeoIP.dat
lib/GeoIPASNum.dat
lib/GeoLiteCity.dat
lib/GeoIPCity.dat
lib/osvdb-sqlite.latest.db
lib/allcves.xml*
lib/nvdcve*
lib/focus_mapping.json
lib/signature_mapping.json
lib/signatures.psql
lib/worldcitiespop.pgdump
lib/snort/cached_advisories
lib.tar.gz
snort.tar.gz
python.tar.gz
config.tar.gz
app/assets/javascripts/packetloop/sigs.json
app/assets/javascripts/packetloop/references.json
snort-cvss.csv
jobs.dot
jobs.png
jobs.pdf
build
build-bundle
packetloop.pybundle
REVISION
.bundle
config/labs.sphinx.conf
job
job-*
hi.py
lib/pcap
lib/pcap-linux
mrpcap_[0-9]*
snort_[0-9]*
mrgroupings_[0-9]*
mrbins_[0-9]*
autocomplete_[0-9]*
mrseen_[0-9]*
plvdb_recommend_[0-9]*
mrfilter_[0-9]*
sling_[0-9]*
mrgraph_[0-9]*
backchannels_[0-9]*
connections_[0-9]*
indexer_[0-9]*
coalesce_[0-9]*
mrdpi_[0-9]*
._mr_*
vendor/bundle
# q
.jhw-cache
snortrules-package.tgz
lib/allitems.xml*
.idea
.DS_Store
etc/ca/**/newcerts
etc/ca/**/devices
etc/ca/**/index.txt*
etc/ca/**/serial*
#coverage
etc/ca/*/devices/*
etc/ca/*/newcerts/*
etc/ca/*/index.txt*
etc/ca/*/serial*
config/environments/nkbt.rb
db/schema.rb
node_modules
# SECURITY
*.pem
*.cert
*.key
git config --global core.preloadindex true
git config --global core.fscache true
git config --global gc.auto 256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment