If you have fallen in love with Oh My Zsh you likely have at one point realized it currently lacks the “history -c” option to clear your terminal history. This code below will help with that.
Category: UNIX Shell Scripts
Mac OSX Terminal – Wi-Fi & Ethernet Switch
Sometimes you need to turn off Wi-Fi and turn on Ethernet and vice-versa NOTE: Important to know what your configuration is.
UNIX – Laptop Setup
This is my basic setup for a laptop/desktop that I have for my family to use. Debian Based Should work on Debian, Ubuntu (all Ubuntu flavors) Red Hat Based Should work on Red Hat, CentOS, and Fedora
Ubuntu / Raspberry Pi – Install NGINX Load Balance DNS
Replace the IP addresses with your IP addresses Modify your config file to look like this When done you need to test the config You should see something like nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Reference: https://www.nginx.com/blog/load-balancing-dns-traffic-nginx-plus/
UNIX – List USB Devices With lsusb
On the Mac “lsusb -v” is rather clean in comparison to other systems.
UNIX – Start Service If Not Running
Currently this script is developed for my Raspberry Pi (Debian, Raspbian) but in time I will have it working for RHEL (Red Hat, CentOS, Fedora). In the example above I’m checking if OpenVPN is running, if it is not running it will start the service. I set this script up…
Debian/Ubuntu LAMP Setup
The following code is for Debian 9 Stretch but should work on older Debian with minor changes
Mac OSX Terminal – Rename TTF/OTF Fonts
If you have ever received a list of fonts from a client where the font names didn’t make sense this code below will help. Caution: Backup your fonts directory just in case.