Deleting an image from the Docker Registry

There is no inbuilt method within the docker provided docker registry so follow the below process to delete images from the registry: Project repository: Downloading Script: curl | sudo tee /scripts/ >/dev/null sudo chmod a+x /scripts/ Setting up the Script: In order to setup the script, you will need to export the environment variable Read more about Deleting an image from the Docker Registry[…]

Python Monthly from Hourly Cost Calulator

A short script to calculate the daily/monthly/annual costs from an hourly cost value (Useful for AWS bill calculation!) printing the resulting cost in GBP. #!/usr/bin/python # -*- coding: utf-8 -*- # Ask for Hourly Cost cost = float(input(“What is the Hourly cost? “)) # Calculate Costing daily=float(cost*24) annually=float(daily*365) monthly=float(annually/12) # Print Results print “Costing based Read more about Python Monthly from Hourly Cost Calulator[…]

Script to modify htpasswd without Apache

This is a handy script I have written for an environment where I needed to modify a htpasswd file without Apache being installed on the server (Where openssl is installed). The script first verifies if the new user exists already, if it does it will delete the line containing the username first before creating the Read more about Script to modify htpasswd without Apache[…]

Script to Install Docker Ubuntu 14.04

#!/bin/bash # Docker Install apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL | sudo apt-key add – sudo add-apt-repository \ “deb [arch=amd64] \ $(lsb_release -cs) \ stable” apt-get update apt-get install -y docker-ce # Docker-Compose Install curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

Bulk rename of files script

A quick script I have made to bulk rename a set of files in a directory. This script was built around the requirement of having a large volume of files in the /root/pictures/ directory – named with the naming format july-123.jpgwhich I wished to rename to holiday-123.jpg (Though you can adjust the below as required to achieve your Read more about Bulk rename of files script[…]