Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Tillett DanielTillett

View GitHub Profile
View shed
#!/bin/sh -e
#
# POSIX shell script equivalent of:
# <https://github.com/mplewis/shed>
#
# Usage: shed [SHELL_ARGUMENTS...]
#
# Executes stdin after you edit it.
# If $EDITOR is unset, uses $PAGER.
# If $PAGER is unset, uses cat(1).
View remove-image-background.sh
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
View remove-image-background.sh
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
View rsync_parallel.sh
#!/bin/zsh
set -e
# Usage:
# rsync_parallel [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
View rsync_parallel.sh
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes: