Skip to main content

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 dimensions (note: not window …

Continue reading

A quick shell script for wine prefixes

Wine, the Windows emulator-that's-not-an-emulator for Linux distributions, has a way of maintaining separate Windows systems using the WINEPREFIX and WINEARCH environment variables. While it's a powerful mechanism, it's not so handy to type it all in on the command line over and over. To that end, I have whipped up …

Continue reading

jQuery visibility pseudo-selectors

To help me with a project at work, I've written two jQuery pseudo-selectors which will help determine if an element is currently in the viewport or if it has been reached during scroll. This can be incredibly powerful if you're looking to only display certain items (like a "back to …

Continue reading

My text editor configuration

I've been a Vim (and gVim) user for several years now, so naturally, I've amassed a byzantine maze of configuration settings and blessed plugins. This evening, I decided to publicize my configuration. Check it out!

There are many neat features like autocompletion, highlighting the 80th column, a tag bar, quick …

Continue reading

Twitter 'Acro' bot

It's been a while since I actually wrote it, but I realized this evening that I never posted about it on my blog. What I'm referring to is the 'Acro' bot for Twitter I wrote in Python. An acronym is chosen at random by the bot, and then participants have …

Continue reading

Dynamic GridView rows in ASP.NET

Here's a simple proof-of-concept for dynamically adding and removing rows in an ASP.NET GridView control while maintaining the existing data. The ViewState is used to maintain the information between postbacks. The rehydrate_table function takes advantage of this to rebuild the table anew whenever an event takes place.

Default.aspx …

Continue reading

Circumvent Get-ADGroupMember limit in PowerShell

If you've ever tried to pull the members list of a large AD group with the Get-ADGroupMember PowerShell cmdlet, you will undoubtedly have run up against an error message telling you that the limit has been exceeded. There is, however, a way to work around this limitation: Using Get-ADGroup and …

Continue reading

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 tacked on a simple whitelist …

Continue reading