Skip to content

Instantly share code, notes, and snippets.

@parmindersk
parmindersk / tmExclusionUtil.js
Last active October 16, 2023 18:53
Script to create a list of exclusions for time machine. Edit the config section at the top of the file. Running it will create a shell file that can be run to add time machine exclusions on a Mac. Please review the generated file before running to make sure it includes what you intended for it to have
// --Config section--
// SHELL file that will be created with tmutil addexclusion
const EXCLUSION_SHELL = "tmExceptionAdder.sh";
// Paths in the user directory that will be directly added to exclusions
const userPathsToIgnore = ["Library", ".vscode", ".npm", ".nvm", ".gradle", ".expo", ".kube"];
// Paths to scan under the user directory (
const userPathsToScan = [""];
// Folders to search for in the scanned paths
const toSearch = ["node_modules", "WEB-INF/lib"];
// Absolute paths to add to exclusions
@parmindersk
parmindersk / docker_cmds.sh
Last active February 19, 2019 01:18
Shortcut commands for docker
# Remove exited instances
alias drm="docker ps -a | grep 'Exit\|Created' | cut -d ' ' -f 1 | xargs docker rm"
# View Network details
alias dinw="docker network inspect bridge"
# List images
alias dlsi="docker images"
# List containers
alias dpsa="docker ps -a"
# Remove given image
dirm(){ docker image rm $1 --force; }