Tags: regex

WordPress plugin minify Makefile

While working on my first commercial WordPress plugin, the need for build automation finally struck me. The environments in which I do my most development are all driven by Linux, and so I wanted to use a tried, true, and ubiquitous build automation mechanism to fulfill my need. As such, I wound up going with a Makefile, to be parsed and executed by the GNU make application. The result is an incredibly convenient automated build that minifies my Javascript/CSS (thanks to reducisaurus), and creates a version-appropriate archive of my plugin. Read More →

Easy SSL redirection for select folders in nginx

I have many various web applications installed on my server; some of them need to be wrapped in a secure connection, while it is less important (or meaningless) for others. For those applications whose security I am concerned about, I’ve developed an easy way to force nginx to serve the application over an SSL connection. The method involves creating empty foldername.ssl files in a specific location, and then comparing the base folder name of an HTTP request against these file names. If there is a match, the connection is redirected to an https:// URL. Read More →

Create anchor links in Twitter status text with JavaScript

Note: This also applies to any service using a Twitter-compatible API, such as StatusNet (see: identi.ca) with some minor configuration changes.

As a side project, I have been working on a StatusNet (specifically, identi.ca) status feed widget for the WordPress PHP platform. I had spent a fair amount of my time trying to convert the various tokens (such as @mentions, #hashtags, and URLs—both with and without a protocol prefix) into clickable links when I realized that StatusNet, being the cool folks that they are, provide HTML-rendered versions of status posts through their API. However, my work hasn’t been for naught! Twitter uses an incredibly similar API—or rather, StatusNet’s API is similar to/based off of Twitter’s API—but does not provide HTML-rendered versions of the status posts (to my knowledge). With this in mind, I’ve re-engineered the code to accept options for pointing the various token URLs to the particular service—whatever it may be. Read More →

bulkRename v1.1

A while back (in 2008), I wrote a simple system utility with VB.NET which leverages the power of regular expressions to rename files in bulk according to a pattern. I’ve had to use it several times recently after placing it on a metaphorical shelf to gather dust, and it got me thinking: Maybe other people can benefit from this utility. That’s what software is supposed to be all about, right? Read More →