Skip to main content

GeoffStratton.com

  • About/Contact
  • GitHub
  • LinkedIn

Category: Web Development

Python: XML-RPC Requests

March 16, 2016March 16, 2022 Geoff Stratton Leave a comment

Tinkering with Python xmlrpclib, in this case for updating a WordPress blog from the command line. Using Python 2.7.6 here. xmlrpclib is included with Python 2.7, but if you need it, install with Pip.

Loading

Read More

WordPress Plugin Development Tutorial

March 15, 2016March 16, 2022 Geoff Stratton Leave a comment

This article is intended to serve as a simple WordPress plugin development tutorial. For the purpose of demonstration we’ll create a plugin that removes comment spam. For this to work, you have to be running some sort of anti-spam system like Akismet that marks spam comments as such when they’re submitted. Comments are written into […]

Loading

Read More

PHP Zend OPcache Installation

October 29, 2015March 16, 2022 Geoff Stratton Leave a comment

The Zend OPcache is a caching system that seeks to improve PHP performance by keeping precompiled PHP code in the shared memory of your web server. Since PHP is an interpreted language that has to be compiled into a set of intermediate instructions (“opcodes”) when someone accesses your PHP page or site, not having to […]

Loading

Read More

WordPress: Installation and Performance

October 29, 2015March 16, 2022 Geoff Stratton Leave a comment

This article describes some of the basics on installing and running WordPress to maximize its performance. The following scripts and text generally assume Debian/Ubuntu, so substitute Red Hat, Arch, etc. as needed. Installation If you’re less lazy than I am, you could combine the whole install routine into a single Bash script, and make it […]

Loading

Read More

Drupal: Programmatically Create a Block

October 8, 2015March 15, 2022 Geoff Stratton Leave a comment

So you want to add a block to your module in Drupal 7. First, define its internal name and human-readable title (for the Blocks UI) with hook_block_info(): Then, give it the permissions needed to view it, a title (to appear for your site visitors), and some content with hook_block_view(): If you want to give the […]

Loading

Read More

Customize the Drupal Search Form

September 23, 2015March 16, 2022 Geoff Stratton Leave a comment

Here’s an easy one: you want to customize the Drupal search form provided by the Search module in your Drupal 7 site. Fortunately, Drupal provides an easy way to do this, via hook_form_alter(). Put something like this in your theme’s template.php: This defines the appearance of the search block form, which you can then place […]

Loading

Read More

Drupal Module Development Tutorial

September 22, 2015March 16, 2022 Geoff Stratton Leave a comment

On my Drupal 7 site here, I wanted to create a method of automatically injecting my Google Ad banners on all content pages before the Disqus comments thread. You could do this manually, say by adding a text field to your basic page content_type with a default value of all the Google Ads JavaScript, but […]

Loading

Read More

The Drupal Database: Querying From the PHP filter

November 11, 2014March 16, 2022 Geoff Stratton Leave a comment

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 […]

Loading

Read More

Varnish and Pound with Apache

August 21, 2014March 16, 2022 Geoff Stratton Leave a comment

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 […]

Loading

Read More

Swap Apache Prefork for Worker

August 19, 2014March 16, 2022 Geoff Stratton Leave a comment

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 […]

Loading

Read More

Posts pagination

Newer posts 1 2 3 4 Older posts

About

This is the home server of Geoff Stratton. There's a little more about me on the About page. The server itself lives in Softlayer's DAL02/06 data center in downtown Dallas, Texas, geolocation 32 47 32.599 N 96 48 53.11 W 125m 10m 100m 10m.

I use this place mostly as a personal knowledge base, although I keep it public in case anything useful emerges. Caveat emptor, and don't go handling snake-skin.

Consider everything posted here to be covered by the GNU Public License Version 3. You should read the whole license, but essentially it means you can do anything you want with the code, including bundle it up and sell it as a new application. The catch is that if you make and distribute a new app, you are required to make all the source code available for free to everyone.

Tip Jar

Did you find something useful here? Please consider a tip. Many thanks!


Buy Me A Coffee


Categories

Tags

Ansible Apache awk Bash C# CentOS Debian DNS Docker Drupal Drush Fedora grep Hardware Hosting IP JavaScript jQuery LDAP Linux Mail Server mtr MySQL Nginx OTRS Perl PHP Plone Pound Python Redis sed SpamAssassin SQL SSL tcpdump TrueCrypt Tutorials ufw Varnish VB.NET Webform Windows WordPress Zope

Archives

sparkling Theme by Colorlib Powered by WordPress