Skip to content

Instantly share code, notes, and snippets.

@dcrck
dcrck / watermark.sh
Last active May 5, 2020 22:51
Watermarking for my photos. Run like `./watermark.sh input_file.jpg`, which produces `input_file_wm.jpg`
#!/bin/bash
if [ "$1" != "" ]; then
dr=$(dirname $1)
scdr=$(dirname $0)
fn=$(basename $1)
filename="${fn%%.*}"
extension="${fn#*.}"
output="${dr}/${filename}_wm.${extension}"
# wm.png is my watermark. It's a white logo with 50% opacity and a transparent background.
wm="${scdr}/wm.png"
@dcrck
dcrck / hugo_install.sh
Last active March 18, 2018 05:55
Simple script to download/install latest Hugo binary to your x64 Linux OS
curl https://github.com/gohugoio/hugo/releases/latest | grep -Po "(\d+\.)+\d+" | xargs -i wget https://github.com/gohugoio/hugo/releases/download/v{}/hugo_{}_Linux-64bit.deb
sudo dpkg -i hugo*.deb /usr/local/bin