Get all tags for a docker repository - alpine in the example
wget -q https://registry.hub.docker.com/v1/repositories/alpine/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}'Create a container with an interactive shell
docker run -it --entrypoint /bin/sh alpine:latestopen a shell into a container in a pod with a specific label
kubectl exec -it $(kubectl get pods -l "app=my-app" -o jsonpath='{.items[0].metadata.name}') -c my-container -- /bin/shReplace all occurances of a term in a git repo
Linux:
git grep -l 'original_text' | xargs sed -i 's/original_text/new_text/g'Mac:
git grep -l 'original_text' | xargs sed -i '' -e 's/original_text/new_text/g'Find multi-byte characters
SELECT * FROM <table> WHERE LENGTH(col) != CHAR_LENGTH(col)undo commit
git reset HEAD~get disk usage of directories:
du -ch --max-depth=1get disk usage summary:
df -h