Skip to content

Instantly share code, notes, and snippets.

View rafdouglas's full-sized avatar

RafDouglas rafdouglas

View GitHub Profile
@rafdouglas
rafdouglas / qgis_asc_unmirror.sh
Created May 5, 2019 14:53
Script to correct the vertical mirror error of ASC files exported from QGIS through the "Raster->Conversion->Translate" command (which in turn invokes gdal_translate)
#!/bin/bash
#
# corrects the vertical mirror error of ASC files exported from QGIS
# through the "Raster->Conversion->Translate" command
# (which in turn invokes gdal_translate)
#
# RafDouglas - 190505
#
#
# example header section of the ASC file:
@rafdouglas
rafdouglas / lock_manager.sh
Last active June 19, 2017 14:49
automagic pid lock manager for bash script
#!/bin/bash
#
# Latest version at:
#
# https://gist.github.com/rafdouglas/45c56cffb0e1110a62093ed3e7eb4b6e
#
# will automatically take care of:
# - if not present, create a pidlock dir with the name of the caller script/shell
# - if present, honour it by warning and exiting
# - delete the pidlock dir when exiting, even by ctrl-c or kill (not kill -9)
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO