Skip to content

Instantly share code, notes, and snippets.

View dominikmontada's full-sized avatar

Dominik Montada dominikmontada

  • Archway
View GitHub Profile
@dominikmontada
dominikmontada / extract-version.sh
Created June 21, 2019 00:53
Extract version string from file using bash
# extract version string from file. Especially useful when single-sourcing
# version, e.g. in version.py in python.
# content of version.txt: version = "1.0.0"
# the following command pipes the content of version.txt to grep, extracts the
# first line containing the string 'version', uses awk to split the input at
# '=' and discards the key, then removes double quotes and trims whitespaces.
#
# output for example: 1.0.0
#
# replace 'version.txt' with your file, 'version' with your key, -F= with your
@dominikmontada
dominikmontada / .gitconfig
Last active May 16, 2019 01:00
Personal git config
# core {{{
[core]
editor = code --wait
pager=less -x4
sshCommand = C:/Windows/System32/OpenSSH/ssh.exe
#}}}
# user {{{
[user]
name = <Name>