As more of a system administrator type I don’t generate as much code as a software engineer, and what I do generate isn’t usually suitable for public use.
That being said, on the off-hand chance someone might find any of this useful, a selection of code and configuration files has been posted below.
- .bashrc
- My .bashrc, I’ve only tested it on Debian-based systems but most of it should be fine on others. Looks like this.
- .bash_aliases
- Small file right now, but some bash aliases I use.
- .bash_functions
- Small file right now, but some bash functions I use.
- .dircolors
- The filetype colour highlighting I use.
- .profile
- My .profile file.
- .screenrc
- My config file for the GNU Screen terminal multiplexer.
- .vimrc
- My .vimrc file, not really much more to say.
- .Xdefaults
- Contains my terminal colour scheme and rxvt-unicode/urxvt settings. Looks like this.
- alarm.sh
- When I was at university, I had a rather messed up sleeping pattern. This script uses beep and should be called via cron to create a loud and configurable alarm, obviously the volume depends on your speakers and setup, for me it was obscenely loud. I used to listen to podcasts or audiobooks when trying to sleep so using the speaker instead of the sound card seemed the obvious choice.
- backup.sh
- This script can backup selected directories, databases and installed packages then send an e-mail summary.
- dir2csv.pl
- This is quite a bespoke script, not sure if it’ll be of use to anyone. I used it in combination with the Linux find utility, to manipulate the data in a directory of text files and then import it into a CSV file. It requires the Config::Directory and Text::CSV_XS Perl modules.
- firewall.sh
- Simple firewall script using IPTables, remember to change or add to the port values before using.
- logonscript.vbs
- When working on Windows systems, I find the black popup windows that batch files create to look unprofessional for this reason I prefer VBScript. This script is for use in an Active Directory domain and will map printers and network drives based on group membership.
- toascii.sh
- A shell script that uses uni2ascii to remove diacritics, ‘magic’ punctuation etc from a directory of text files, turning them into ASCII, it’s a bit simple for a shell script but I was dealing with 500,000 text files at the time.