Skip to content

Instantly share code, notes, and snippets.

View grigory-rechistov's full-sized avatar

Grigory Rechistov grigory-rechistov

  • Intel
View GitHub Profile
#!/usr/bin/python3
# Ta in en GeoJSON fil av QGIS,
# producera en ny GeoJSON med nya etiketter och brus tillagt till koordinater
# Källor och referenser:
# - http://www.naturvardsverket.se/Sa-mar-miljon/Kartor/Nationella-Marktackedata-NMD/
# - http://gpt.vic-metria.nu/data/land/NMD/NMD_Produktbeskrivning_NMD2018Basskikt_v1_0.pdf
# - https://lists.openstreetmap.org/pipermail/talk-se/2019-March/003537.html
@grigory-rechistov
grigory-rechistov / commit-msg.sh
Created June 23, 2020 12:59
Check spelling in Git commit hook
# Add this snippet to the end of your .git/hook/commit-msg script
# Check spelling
ASPELL=$(which aspell 2> /dev/null)
if [ $? -ne 0 ]; then
echo "Aspell not installed, unable to check spelling" >&2
else
WORDS=$(grep -v "^Change-Id:" "$1"| $ASPELL --mode=email --add-email-quote='#' list | sort -u)
if [ -n "$WORDS" ]; then
echo -ne "\e[31m"
printf "### Possible spelling errors found in commit message: ###\n%s\n" "$WORDS" >&2