IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!
Remove old nginx incl. nginx-common:
apt-get autoremove --purge nginx nginx-common| import unittest | |
| from datetime import datetime, timedelta | |
| def business_days(start, end): | |
| """ | |
| Calculating business days between two dates excluding weekends | |
| :param start: First date | |
| :param end: Second date |
| class DictionaryUtility: | |
| """ | |
| Utility methods for dealing with dictionaries. | |
| """ | |
| @staticmethod | |
| def to_object(item): | |
| """ | |
| Convert a dictionary to an object (recursive). | |
| """ | |
| def convert(item): |
| # Remove old docker containers | |
| docker rm $(docker ps --no-trunc -aq) | |
| # Remove unreferenced images | |
| docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi | |
| #OR | |
| #alias dockercleancontainers="docker ps -a -notrunc| grep 'Exit' | awk '{print \$1}' | xargs -L 1 -r docker rm" |