A tiny snippet of useful bash shell code today, to help with setting your DISPLAY variable if integrating Cygwin/X into your Windows environment, add it to a .bashrc for effect. Launching X apps from the ‘Cygwin Terminal’ is smoothed as a result. #RT Check for XWin and set DISPLAY if present. ps -a | grep … Continue reading Conditionally setting DISPLAY variables in bash
Category: Scripts
Using the Unix Epoch timestamp for file naming
Another aide-mémoire today, illustrated via a small script. I was musing on file version numbering (yes I know about SVN et al, but sometimes they are overkill) and considered using the time represented as the number of seconds elapsed since the Unix Epoch, seems like a simple approach wrapped into the file and filename, what … Continue reading Using the Unix Epoch timestamp for file naming
Using .forward files and retaining a local copy
If your read your email on a platform able to utilise dot forward files (.forward), it's useful to know that aside from adding a forward address to bounce mail onwards seamlessly, you can retain a copy at the original receiving host by constructing your .forward as below, where I show an excerpt from my system. #cat .forward … Continue reading Using .forward files and retaining a local copy
Meta refresh, redirect and cache control
Now and again I need to redirect a page to another site or page and it’s infrequent enough that I forget, perhaps now I've written this down I might remember it, at the very least I’ll have a quick reference doc. Redirection and Reloading Simple redirect and refresh can be done from a META tag … Continue reading Meta refresh, redirect and cache control