Skip to content

Instantly share code, notes, and snippets.

@bjarneo
Last active January 8, 2018 09:14
Show Gist options
  • Save bjarneo/dd5652212ac834dc87278f83dec77dd4 to your computer and use it in GitHub Desktop.
Save bjarneo/dd5652212ac834dc87278f83dec77dd4 to your computer and use it in GitHub Desktop.
snippets
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)
# Delete all
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi -f $(docker images -f "dangling=true" -q)
# Run NPM without sudo
sudo chown -R $(whoami) ~/.npm
# Pypi
python setup.py register -r pypitest
python setup.py sdist upload -r pypitest
python setup.py register -r pypi
python setup.py sdist upload -r pypi
# Replace every occurence of a string in all files in directory
find ./ -type f -exec sed -i 's/string1/string2/g' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment