Category Archives: Programming

Script template

The following shell script doesn’t do anything interesting by itself but it is a very useful bit of boiler plate for parsing command line options.

Posted in Programming | Tagged | Leave a comment

Check remaining disk space

The following commands will check to see if you are running out of disk space and warn you when any partition has 20% or less free space.

Posted in Programming | Tagged | Leave a comment

Prompting for a Yes/No response (BASH)

Short bash function routine to prompt the user to enter Yes or No (which may be abbreviated to Y or N) in response to a prompt.

Posted in Programming | Tagged | Leave a comment

Installing updates from behind a firewall

If you are behind a web-proxy then installing packages or updating your system requires that the environment variable http_proxy is defined first – this then tells the system to use a web-proxy.

Posted in CentOS, Debian, Linux, Programming, Raspbian, RedHat, Ubuntu | Tagged , , | Leave a comment

Keyboard input with a timeout using Python

After just messing about and experimenting with my Sense Hat a bit I had a short python script that just loaded each ‘.png’ file it found in the current directory and displayed it on the 8×8 LED matrix.

Posted in Debian, Linux, Programming, Raspbian, Ubuntu | Tagged , , | Leave a comment