Skip to main content

Tagged: regex

  • ASP.NET/C# image resizer for responsive layouts


    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 …

  • Lower-case specific query string keys with IIS URL Rewrite


    We're going through some normalization of URLs at my day job, which has necessitated some interesting rewrite rules for lower-casing specific query string keys. Essentially, we need to turn site=CampusName into site=campusname. After …

  • Validating file uploads in Sitecore WFFM


    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


    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


    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


    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


    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


    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


    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


    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


    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) …

  • URL rewriting template engine


    My employer is currently in the process of standing-up a content management system (CMS). In the process of migrating links on our existing site to the new CMS site, there are going to be—at least, at first—a metric tonne of possible URL …

  • WebFOCUS Impact Analysis report compactor


    Here's a little script I whipped up to combine several Impact Analysis reports generated by WebFOCUS Developer Studio. The script opens HTM-formatted IA reports, skims the data, and then concatenates it all in one CSV-formatted output …

  • Consuming newlines with the Javascript regex engine


    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 …

View all tags