Attempting to install Fedora 20 on an older i7 system recently produced a series of failures. For starters, after the installation allegedly completed, the system would hang after the BIOS screens at the point where the OS should start. That’s because Anaconda installed no bootloader. A computer isn’t very useful with no operating system. To […]
Author: Geoff Stratton
The Drupal Database: Querying From the PHP filter
If you have a multi-site Drupal 7 install, or simply another database living alongside your Drupal database, sometimes you may want to pull a few records from the other database for display on your Drupal site. Displaying data from the Drupal database is pretty easy since you can just use Drupal’s built-in db_query function: (If […]
Python: MIME/SMTP
Send a MIME-encoded email in HTML and plain text using Python’s smtplib (Python 2.x). Just call ‘mailer’ with a return address, list of recipients, message subject and body.
Perl File Change Notifier
This notifies users by email (sendmail) when a particular file changes on a Unix-style filesystem. This was originally written for a page that was being modified by multiple people in the wiki software shipped with Apple’s OS X Server. This worked all right as a hack, but if you need extensive content management or granular […]
Python LDAP Lookups
An example of a Python LDAP lookup, Python 2.x. This one uses the on-campus LDAP service at UC Davis, so just change the LDAPServer and searchBase for another LDAP server. Or you can print the results a little more nicely:
Online Analytics Tools
AbuseIPDB The Robtex – The Robtex Swiss Army Knife Internet Tool Norsecorp Cyberattack Map GeoTrace – Uses WHOIS, Hostip.info, LOC records, and TRACEROUTE to track IP address to physical location IP Chicken – A quick “what’s my IP” type of thing (or you could look at my page footer) Internet Traffic Report MX Toolbox – […]
Varnish and Pound with Apache
Using Varnish and Pound together is a relatively easy way to ensure the Varnish cache works for both SSL and non-SSL web sites. Varnish is a general-purpose web cache that can make your web sites and applications run substantially faster for your visitors while reducing the overall load on your web server. It works by […]
Swap Apache Prefork for Worker
By default most Apache web servers — at least prior to Apache 2.4 — run Apache’s Prefork MPM (multi-processing module). Prefork works OK and offers the greatest compatibility with existing Apache modules, but it consumes a relatively large amount of memory because it spawns many processes that each handle one connection at a time. Prefork […]
Install the APC Opcode Cache
Note: This is an old article, and the APC Opcode Cache is now abandoned. Strongly consider installing Zend OPcache instead. APC is now effectively unsupported, although you can still install and use it. Furthermore, OPcache is included in the PHP core as of PHP 5.5, and OPcache is also available and fully supported for PHP […]
Back Up MySQL Databases
A simple bash script to back up MySQL databases. This backs up every database on the server to individual gzipped files in the directory you specify so that you can easily restore them separately. If you want it to run everyday, save it with an .sh extension and add it to the crontab of an […]