Recent blog posts
(This is one of those articles I sometimes fear writing, because it reveals a vast gap in my knowledge. I've spend most of the past decade in PHP programming, with numerous forays into other langauges and frameworks, but mostly in the app dev end. I have to deploy my code and that's made me take forays lower into the stack.)
I'm getting back to setting up Drupal for LA IMC, but keep hitting little walls. I've decided I definitely want to extract proper nouns and keywords from the articles.
It's hard to concentrate when you're tired and cranky, so I wasted some time writing a simple calculator in several different languages.
This is a rough watchdog script to restart apache on the local machine when the website gets slow. If a GET to the url fails, or takes longer than 60 seconds, the local web server is restarted.
This is something I wrote to learn some of the latest Perl tech to scrape pages. What's cool about this demo script is that it doesn't use regular expressions that much.
Vim/GVim has great features to make it easy to read C (and PHP and Perl) code.
This script below will accept a URL parameter, download the HTML, convert it to a .mobi file with kindlegen, and copy the file onto your Kindle.
Rlib is a report writing engine that takes report specifications in an XML language. It emits reports in several formats including HTML and PDF.
I stumbled across RLIB while figuring out how to implement some MS Access report writing features in PHP. MSA users will know what writing a report is, but PHP coders probably don't, so I'll explain.
This was an odd project. Taking several PDFs of layoff data and turning them into text, so they might be used more like a database. This info should be offered up by the state as a database, but it's not (at least it wasn't to me). I ended up using a PDF to Text application to generate text files, then wrote these scripts to scrape the data out of the text. My goal was to dig up all the unionized workplaces.
This script is being used to move files around in a Maildir. A bunch of spam goes into the "new" directory.
If you're cheap and have a low-end, generic MP3 player that will also display text files, you can read your RSS feeds on it with the help of this script.
In the last entry, log lines were being "compressed" by placing them into a database table. There were a few bugs in that code that have been fixed, and features added to the new script, below, that save us from losing some log data. Explanation after the code:
Network traffic was growing, and it was getting hard to really "see" what was sucking up the capacity. It could be spam, or YouTube, viruses, hack attempts, or anything.
This is a script that takes an RSS URL as an argument, and emits the headlines. Potentially useful if you have a small text-reading device that doesn't handle HTML.
Sometimes, you have textual data, like log files, with IP addresses. You sometimes want this data to show hostnames instead.