Tech Tips

jbminn

2 minute read

While working on the launcher for some new enterprise build management stuff, I ran into a situation I hadn’t seen before. The core javascript that launched the process was working as expected in IE, but was failing + throwing a very scary looking Status Code 0 in Chrome. Setting aside for a moment the amusement I felt by IE ‘working’ while Chrome failed, I dug into root causes behind a Status Code 0.

jbminn

1 minute read

Since Gmail began supporting IMAP, setting up Gmail to work with both Apple Mail & the iPhone is a common need for those of us with both iPhones and new Macbooks. I began using Gmail about two weeks and had noticed the inconsistencies mentioned in the below article, and was both pleased to see that the solution was so simple as well as slightly embarrassed that I hadn’t yet resolved the issue myself.

jbminn

4 minute read

Recently I had a need for a simple logfile viewer for use in some stuff we have planned at Freepository. But this log file viewer had a few requirements that made it unique: it had to get the log file contents from the server in small chunks, not tie up the browser (such as an old-style synchronous request would do), and refresh in the browser without reloading the page.

I thought I could easily find one that someone had already written, but Google was not my friend. I found nothing even close, so I wrote my own. Here it is.

Working example:  https://freepository.com/ajax-logtail-viewer/ajax-logtail-viewer.php

Open that page (↑) in a new window, follow the instructions and view the source.

jbminn

2 minute read

Tech Tip – Spamassassin Custom Rule

I had been inundated with so much spam lately that I added some custom rules to my spamassassin setup. These rules are added to your local.cf (don’t put them in /usr/share/spamassassion, as they’ll get overwritten with the next SA update). The single most useful one for me in this bunch is the LOCAL_RETURNED_MAIL rule.

jbminn

1 minute read

Here’s another quick tip. If you have a large directory tree (hundreds or thousands of nested levels), and you need to find and delete a set of files from the tree, consider this one-line approach: cd [target-dir-top-level];for i in find . -name *tar.gz; do rm -f $i; done Replace my pattern ‘tar.gz’ with one that matches the files you wish to delete. Tags: freepository, tech-tip, shell scripting