Skip to content

Instantly share code, notes, and snippets.


Nick Anderegg NickAnderegg

View GitHub Profile
NickAnderegg / Docker local CLI examples
Created October 8, 2021 19:42
Using Docker to run CLI utilities with access to local files
View Docker local CLI examples
#!/usr/bin/env bash
# This works only if all files specified as arguments below the PWD.
docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} \
jrottenberg/ffmpeg:4.3-alpine -i input.mp4 -c copy output.mkv
# If you need input directories that aren't below your current PWD,
# you can mount a parent directory of the input files (preferably read-only
# with the narrowest possible scope) to an identical location in the
# container, and then reference those files absolutely.
NickAnderegg /
Last active August 20, 2021 22:01
An example of how perceptual hashes change at various settings when one pixel changes
from PIL import Image
import imagehash
from pathlib import Path
from hashlib import sha256
PWD = (Path(__file__).resolve()).parent
demo1 = PWD / "demo1.bmp"
demo2 = PWD / "demo2.bmp"
NickAnderegg /
Last active June 14, 2021 19:21
git-clone-path: A script to help keep git repositories consistently named and located.


This is a script that helps keep git repositories named and stored in a consistent way. When this script is run, it will clone the specified git repository to a standardized location with a standardized directory structure.

Running either of these commands will result in the same output:

NickAnderegg /
Last active May 13, 2019 19:26
public sync settings
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

Keybase proof

I hereby claim:

  • I am nickanderegg on github.
  • I am nickanderegg ( on keybase.
  • I have a public key ASBHCoyNi-aGQoA9fRuDl0meE73MIYI3DchwitpvdDVsigo

To claim this, I am signing this object: