I will probably elaborate on this a bit further when I find some more time, but for now, this post is going to be mostly code. What I have here is a relatively simple way to generate images that are resized server-side based on the screen …
Tagged: regex
ASP.NET/C# image resizer for responsive layouts
Tags:Validating file uploads in Sitecore WFFM
Tags:Our Sitecore installation was in dire need of a way to lock down file uploads on forms built with the Web Forms for Marketers (WFFM) module; out of the box, it doesn't do any checking at all, which can lead to some risky situations. I …
Bulk rename Subversion files with PowerShell
Tags:Scenario: We're upgrading our reporting software at work, and the way that it used to integrate with SVN (through a terrible SCC bridge) involved arbitrarily placing "app*" at the head of the file names. Of course, in the new …
rexCrawler and HelpfulHighlighter are now open source
Tags:After having dipped my toe in the water of open source with some Arachni module changes and the development of a simple WordPress plugin, I've finally taken the plunge; two of my personal projects are now completely open source, and …
WordPress plugin minify Makefile
Tags: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 …
Easy SSL redirection for select folders in nginx
Tags: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 …
Kill all shared memory segments in Linux
Tags:See update below. I recently whipped up a shell script to kill all (IPC) shared memory segments in Linux for a client on oDesk. He wound up going with another contractor's offer, and so I figured I would post my script here for the …
Create anchor links in Twitter status text with JavaScript
Tags: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 …
bulkRename v1.1
Tags: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 …
Replacing MS Word's quotation marks in VB.NET
Tags:When dealing with text pasted from Microsoft Word, the presence of "special" (read: non-ASCII) quotation marks and apostrophes can be quite troublesome. Here's a simple way to convert them to "standard" (read: ASCII) …
Consuming newlines with the Javascript regex engine
Tags:In most server-side languages (with an available regex engine), programmers are given a wonderful set of pattern modifiers. One such modifier for PCRE (Perl-compatible regular expressions) is the "s" modifier, known in PHP as …