roadha.us development and whatnotWed, 01 Aug 2018 12:35:00 -0500Playing with Dungeon Painter Studio<p>As many nerds do, I play Dungeons &amp; Dragons--specifically, 5th Edition. I've mostly been a player the entire time, but I am the DM (Dungeon Master) of a play-by-post campaign, and recently, tried my hand at a live-play campaign that will serve as a palate cleanser for our regularly-scheduled games. In …</p>haliphaxWed, 01 Aug 2018 12:35:00,2018-08-01:/2018/08/playing-with-dungeon-painter-studio.htmldndgameshobbyMore FlaskBB development<p>The train keeps rolling. I've been busying myself with more <a href="">FlaskBB</a> development lately. I took the Docker image and expanded it into a <code>docker-compose</code> example. I've also built a plugin for managing email and RSS notifications and another for adding a dice-rolling macro to the forum. The <code>dicebot</code> plugin is …</p>haliphaxThu, 29 Mar 2018 23:03:00,2018-03-29:/2018/03/more-flaskbb-development.htmlmy softwarepythonflaskbbpluginFlaskBB development<p>Lately, I've been getting involved with some Python-based forum software, <a href="">FlaskBB</a>. I had been running phpBB for one of my web games' forums, and it became overrun with bots. Given my attraction to Python over the last few years, I began searching for a new solution written in Python. FlaskBB …</p>haliphaxMon, 25 Dec 2017 23:28:00,2017-12-25:/2017/12/flaskbb-development.htmlmy softwarepythonflaskbbpluginJumping on the static site generator bandwagon with Pelican<p>I've decided to abandon WordPress for my blog and switch to a static site generator. Given my recent interest in Python, I decided to look for a Python-based solution. I've settled on <a href="">Pelican</a>. I'm already resting easier knowing that my blog isn't a potential attack vector, and I'm experimenting with …</p>haliphaxMon, 05 Jun 2017 00:37:00,2017-06-05:/2017/06/jumping-on-the-static-site-generator-bandwagon-with-pelican.htmlpythonHosting my own git repositories<p>I've run my own personal git service for several years now. Previously, it was with <a href="">cgit</a> on nginx and gitolite. I then <a href="">modded cgit with some password maintenance features</a>. After a while, I tried using several more "modern" git repo hosting solutions, and I've finally settled on <a href="">gogs</a>, the <strong>Go …</strong></p>haliphaxThu, 06 Oct 2016 23:13:00,2016-10-06:/2016/10/hosting-git-repositories.htmlgitmy softwarerepo2site: Make a web site out of a git repo's MarkDown files<p>I've just finished the initial work on a script that will make a full-HTML website, driven by AJAX, out of the MarkDown (*.md) files in a git repository. It's currently geared toward GitHub, but could easily be adapted to other repository hosting services.<!--more--></p> <p><a href="">Check it out!</a></p> <p>The problem I was …</p>haliphaxWed, 05 Oct 2016 21:34:00,2016-10-05:/2016/10/repo2site.htmlgitjavascriptmarkdownmy softwaretoolASP.NET/C# image resizer for responsive layouts<p>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 <em>relatively</em> simple way to generate images that are resized server-side based on the screen dimensions (note: not window …</p>haliphaxTue, 27 Sep 2016 22:32:00,2016-09-27:/2016/09/asp-net-c-sharp-image-resizer-for-responsive-layouts.htmlaspxc-sharpdot netimage editingjavascriptmy softwareregexresponsiveA quick shell script for wine prefixes<p>Wine, the Windows emulator-that's-not-an-emulator for Linux distributions, has a way of maintaining separate Windows systems using the <code>WINEPREFIX</code> and <code>WINEARCH</code> 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 …</p>haliphaxThu, 16 Jun 2016 16:53:00,2016-06-16:/2016/06/quick-shell-script-wine-prefixes.htmllinuxmy softwareshelltoolLower-case specific query string keys with IIS URL Rewrite<p>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 <code>site=CampusName</code> into <code>site=campusname</code>. After quite a bit of tinkering with <a href="">IIS URL Rewrite</a> rules, I managed to pull it …</p>haliphaxWed, 11 May 2016 15:47:00,2016-05-11:/2016/05/lower-case-query-string-iis-url-rewrite.htmlfixiisregexseojQuery visibility pseudo-selectors<p>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 …</p>haliphaxWed, 20 Apr 2016 12:22:00,2016-04-20:/2016/04/jquery-visibility-pseudo-selectors.htmljavascriptjquerymy softwarepluginMy text editor configuration<p>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!<!--more--></p> <p>There are many neat features like autocompletion, highlighting the 80th column, a tag bar, quick …</p>haliphaxSat, 09 Apr 2016 00:26:00,2016-04-09:/2016/04/my-text-editor-configuration.htmlmy softwareplugintoolvimTwitter 'Acro' bot<p>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.<!--more--> An acronym is chosen at random by the bot, and then participants have …</p>haliphaxSat, 30 Jan 2016 22:47:00,2016-01-30:/2016/01/twitter-acro-bot.htmlapigitmy softwarepythontwitterDynamic GridView rows in ASP.NET<p>Here's a simple proof-of-concept for dynamically adding and removing rows in an ASP.NET <code>GridView</code> control while maintaining the existing data.<!--more--> The <code>ViewState</code> is used to maintain the information between postbacks. The <code>rehydrate_table</code> function takes advantage of this to rebuild the table anew whenever an event takes place.</p> <p><strong>Default.aspx …</strong></p>haliphaxWed, 23 Dec 2015 14:18:00,2015-12-23:/2015/12/dynamic-gridview-rows-asp-net.htmlajaxaspxc-sharpdot netformsCircumvent Get-ADGroupMember limit in PowerShell<p>If you've ever tried to pull the <code>members</code> list of a large AD group with the <code>Get-ADGroupMember</code> 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 <code>Get-ADGroup</code> and …</p>haliphaxSat, 26 Sep 2015 12:12:00,2015-09-26:/2015/09/circumvent-get-adgroupmember-limit-in-powershell.htmlactive directoryfixpowershellValidating file uploads in Sitecore WFFM<p>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 …</p>haliphaxMon, 17 Nov 2014 12:48:00,2014-11-17:/2014/11/validating-file-uploads-sitecore-wffm.htmlc-sharpdot netfixformsmy softwareregexsecuritysitecoreDisable SSLv3 to avoid POODLE attack in web.py<p>An open source application that I contribute to uses to provide a web server platform for its services alongside the other platforms available. I recently updated it to use a sane set of default ciphers and to disable the SSLv3 protocol in order to avoid the POODLE attack …</p>haliphaxWed, 15 Oct 2014 19:21:00,2014-10-15:/2014/10/disable-sslv3-avoid-poodle-attack-web-py.htmlencryptionmy softwarepythonsecuritySVG polyfill in pure Javascript<p>A designer at work pointed out <a href="">this SVG polyfill</a> as a candidate for our new production site. While I like the elegance of it, I was a bit disappointed that the author felt the need to include jQuery as a dependency simply to use its selector engine and <code>each</code> function …</p>haliphaxMon, 13 Jan 2014 13:42:00,2014-01-13:/2014/01/svg-polyfill-pure-javascript.htmljavascriptmy Condensed UserScript<p>Lately, my interest has been piqued by cryptocurrency. After discovering that my ATI card could produce a decent hash rate without seriously spiking my electricity bill, I got specifically interested in Litecoin. Long story short, I joined a Litecoin mining pool (<a href=""></a>) and decided that I could do without …</p>haliphaxThu, 05 Dec 2013 21:53:00,2013-12-05:/2013/12/give-coins-com-condensed-userscript.htmlencryptionjavascriptmy softwareuserscriptTribute: An Homage to My ASCII Heroes<p>I don't generally write anything on here that isn't about code; I don't like to use this as any kind of a soapbox. To me, this site is about sharing tricks and solutions I've created or come across in software development. That being said, I am so incredibly proud of …</p>haliphaxWed, 13 Nov 2013 18:25:00,2013-11-13:/2013/11/tribute-homage-ascii-heroes.htmlmy softwareMozilla's TogetherJS in a bookmarklet<p>Mozilla recently introduced <a href="">TogetherJS</a>, a succession of their TowTruck service. Being that it is so similar to TowTruck, I went ahead and made a bookmarklet for it.<!--more--></p> <p>Drag the bookmarklet below onto your bookmarks bar, and tell your collaborators to do the same. When you're on a page you want …</p>haliphaxThu, 17 Oct 2013 18:00:00,2013-10-17:/2013/10/mozillas-togetherjs-bookmarklet.htmlbookmarkletsjavascripttoolBulk rename Subversion files with PowerShell<p>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 version, they no longer do this, and so all of our …</p>haliphaxFri, 13 Sep 2013 10:39:00,2013-09-13:/2013/09/bulk-rename-subversion-files-powershell.htmlfixpowershellregexsvntoolwebfocusTruck It!: Mozilla TowTruck in a bookmarklet<p><a href="">Mozilla Labs</a> has this really nifty, Javascript-based collaboration utility, ~~TowTruck~~, which allows real-time web editing collaboration in the browser. It's got a lot of nifty features I won't get into in this post; sufficed to say, it's pretty frickin' sweet. What I did not find to be as frickin' sweet …</p>haliphaxThu, 11 Jul 2013 18:00:00,2013-07-11:/2013/07/truck-it-mozilla-towtruck-in-a-bookmarklet.htmlbookmarkletsjavascripttoolBrowsercache.php: A simple browser-cache-handling library for CodeIgniter<p>While <a href="">CodeIgniter</a> provides a disk caching mechanism, it lacks a <em>browser</em> caching mechanism. Without a lengthy introduction, here's one.<!--more--></p> <p><strong>Browsercache.php</strong> </p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">&lt;?php</span> <span class="k">if</span><span class="p">(</span><span class="o">!</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;BASEPATH&#39;</span><span class="p">))</span> <span class="k">exit …</span></pre></div></td></tr></table>haliphaxWed, 08 May 2013 23:16:00,2013-05-08:/2013/05/browsercache-php-a-simple-browser-cache-handling-library-for-codeigniter.htmlcodeignitermy softwarephpascii.js: A font-based rendering engine for ASCII artwork<p>A long-standing and thoroughly-enjoyed hobby of mine is creating and consuming <a href="">ASCII artwork</a> (though not the kind of watered-down crap you would see in, say, an e-mail signature or a chain letter). I recently went on a wild tear after stumbling across a faithful recreation of the Amiga's Topaz 500 …</p>haliphaxTue, 30 Apr 2013 18:34:00,2013-04-30:/2013/04/ascii-js-a-font-based-rendering-engine-for-ascii-artwork.htmlcssjavascriptmy softwarescrollFollow: An auto-scrolling extender for knockout.js<p>With the following knockout.js extender, you can tie an observable array to a scrollable HTML element. When the array is updated, the element will keep scrolling to the bottom. It's smart enough to realize if the user has scrolled up, as well, and will not interrupt them. I've found …</p>haliphaxSat, 20 Apr 2013 08:42:00,2013-04-20:/2013/04/scrollfollow-an-auto-scrolling-extender-for-knockout-js.htmljavascriptknockout.jsmvvmmy softwarepluginAdd "desktop version" and "mark all as read" links to Tiny Tiny RSS mobile plugin<p>I installed Tiny Tiny RSS on a server of mine, and after tinkering around with it for a little while, I turned on the built-in <em>mobile</em> plugin. It's a wonderful little thing; it uses the iUI library to present a slick, single page application; it strips images out of the …</p>haliphaxMon, 08 Apr 2013 16:18:00,2013-04-08:/2013/04/add-desktop-version-and-mark-all-as-read-links-to-tiny-tiny-rss-mobile-plugin.htmlphpplugintoolLDAP authentication with C#<p>LDAP, or Lightweight Directory Access Protocol, is a convenient, central repository for a system's personnel information. LDAP (and other Active Directory services) are widely-used by organizations big and small to consolidate user credentials and identification data. For instance: a reporting services application, a webmail client, and a database administration suite …</p>haliphaxFri, 05 Apr 2013 18:00:00,2013-04-05:/2013/04/ldap-authentication-with-c-sharp.htmlaspxc-sharpdot netencryptionldapsecurityResilient Ubuntu boot-to-RAM USB stick (Ubun2RAM) - Updated for 13.10<p>I love my little-engine-that-could media server machine. It runs incredibly well on hardware from at least two generations ago; it is completely headless; the entire system loads itself into RAM in the form of a compressed file system; it all fits onto a bootable USB stick; and I can back …</p>haliphaxWed, 23 Jan 2013 19:03:00,2013-01-23:/2013/01/resilient-ubuntu-boot-to-ram-usb-stick.htmladminlinuxshelltutorialubuntuvmstaggr featured on freewaregenius.com<p>My experimental link-staggering Facebook service, <a href="">staggr</a>, has been featured on the free software blog, <a href=""></a>. Cheggit:</p> <p><a href=""></a></p>haliphaxSun, 02 Dec 2012 10:39:00,2012-12-02:/2012/12/staggr-featured-on-freewaregenius-com.htmlfacebookmy softwarepressBatch convert audio files to MP3 with PowerShell and VLC Player<p>I adapted <a href="">a PowerShell script by Tim Van Wassenhove</a> that recurses through a given directory, searching for various types of audio files. These files are then converted to MP3 using VLC Player's command-line interface. My adjustments to Tim's original script include some string handling bits that ensure filenames with potentially …</p>haliphaxFri, 23 Nov 2012 15:46:00,2012-11-23:/2012/11/batch-convert-audio-files-to-mp3-with-powershell-and-vlc-player.htmlaudiomy softwarepowershelltoolvlcJavascript document.write alternative<p>When a script is loaded <em>synchronously</em>, its element's position in the DOM can be determined. With this information, the <code>&lt;script&gt;</code> element can act as a pivot point for inserting dynamic content. This eliminates the need for <code>document.write</code>, a function which wreaks havoc where AJAX is involved (and flies in …</p>haliphaxSat, 10 Nov 2012 09:05:00,2012-11-10:/2012/11/javascript-document-write-alternative.htmljavascriptmethodUserScript: Tidy up listings<p>The way that <a href="">'s listings</a> are organized is difficult to work with. This UserScript (compatible with <a href="">GreaseMonkey</a>, Chrome, Opera, and perhaps more) will gut the listings from the layout and give you one all-encompassing, manageable scroll bar for perusal.<!--more--></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 2 3 4 5 6 7 8 9 10 …</pre></div></td></tr></table>haliphaxSat, 13 Oct 2012 14:50:00,2012-10-13:/2012/10/userscript-tidy-up-tvguide-com-listings.htmljavascriptmy softwareuserscriptrexCrawler and HelpfulHighlighter are now open source<p>After having dipped my toe in the water of open source with some Arachni module changes and the development of <a href="/portfolio/whats-my-status/">a simple WordPress plugin</a>, I've finally taken the plunge; two of my personal projects are now completely open source, and hosted on <a href="">github</a>. Much of the code is stale—and …</p>haliphaxWed, 05 Sep 2012 22:53:00,2012-09-05:/2012/09/rexcrawler-and-helpfulhighlighter-are-now-open-source.htmlc-sharpdot netgitmy softwareopen sourcepluginregextoolvb.netProgrammatically compile Audiences in SharePoint 2010<p>According to the documentation for the SharePoint 2010 SDK, you cannot trigger Audience compilation programmatically. Well—that's not true. It isn't documented, but it <em>is</em> possible. The painful thing about it is that you must know the <code>ApplicationId</code> of the <code>UserProfileService</code> application. This is where reflection comes in <em>extremely</em> handy …</p>haliphaxFri, 31 Aug 2012 18:30:00,2012-08-31:/2012/08/programmatically-compile-audiences-in-sharepoint-2010.htmlaspxc-sharppowershellsharepointtoolWordPress plugin minify Makefile<p>While working on my first commercial <a href="">WordPress</a> 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 …</p>haliphaxFri, 10 Aug 2012 11:05:00,2012-08-10:/2012/08/wordpress-plugin-minify-makefile.htmljavascriptlinuxmy softwarephpregexshelltoolwordpressJavaScript Challenge #2 (Whac-A-Moo)<p>Though I am not a proponent of the <a href="">MooTools</a> JavaScript framework, <a href="">their blog</a> is an interesting resource that I enjoy reading. Not only is it packed with sensible practices and interesting insights, but they have recently begun posting JavaScript challenges where developers are tasked with building whatever system is presented …</p>haliphaxSun, 05 Aug 2012 09:04:00,2012-08-05:/2012/08/javascript-challenge-2-whac-a-moo.htmlexperimentjavascriptmy softwareAdd password maintenance feature to cgit with PHP<p>Have you ever wanted to have a nifty, browser-driven password maintenance feature in your <em>htpasswd</em>-secured <strong>cgit</strong> site? I've been meaning to build this for a while—and I finally did it.<!--more--> Granted, this was not a difficult task, and I'm not expecting to bask in any glory for completing …</p>haliphaxSat, 28 Jul 2012 19:12:00,2012-07-28:/2012/07/add-password-maintenance-feature-to-cgit-with-php.htmlgitjavascriptphpsecurityUsing cURL for parallel PHP without pcntl_fork<p>So, you want to do some parallel processing in PHP (alliteration FTW!), but your service provider does not grant you access to the <a href="">pcntl</a> family of functions<a href="#footnote-1">*</a>. What do you do? If you're in a *nix environment with access to the <a href="">curl</a> command line application, then you get creative.<!--more--></p> <p>First …</p>haliphaxThu, 07 Jun 2012 18:00:00,2012-06-07:/2012/06/using-curl-for-parallel-php-without-pcntl_fork.htmlcurllinuxparallelphpshellEasy SSL redirection for select folders in nginx<p>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 …</p>haliphaxThu, 24 May 2012 18:00:00,2012-05-24:/2012/05/easy-ssl-redirection-for-select-folders-in-nginx.htmlnginxregexsecurityAdd threaded discussions to cgit with disqus<p>While it provides an efficient, organized web front-end for your personal git repositories, the <a href="">cgit</a> application is missing a few of the more sparkling features found at <a href="">github</a>--notably, a comments/discussion system. Enter: <a href="">disqus</a>.<!--more--></p> <p>Disqus is a Javascript-injected, centralized discussion system that is gaining traction with blogs and other …</p>haliphaxFri, 11 May 2012 18:00:00,2012-05-11:/2012/05/add-threaded-discussions-to-cgit-with-disqus.htmlgitjavascriptPosts to resume shortly<p>I've migrated the blog back over to my VPS, as my hosting provider has been trying to blame me for the poor performance of my scripts on their hosting platform. I've got everything running on my VPS machine now (and I do mean <em>everything</em>) thanks to nginx, php5-fpm, and 752MB …</p>haliphaxWed, 02 May 2012 09:07:00,2012-05-02:/2012/05/posts-to-resume-shortly.htmlblog newsWhat's My Status v1.2 released<p>My WordPress microblog feed widget recently went through another update. This time around, I've added the ability to filter out replies and re-posts ("retweets" in Twitter lingo, "redents" in speak) from your activity feed. <a href="">Pick up the new version</a> from the <a href="">WordPress plugins site</a>.</p>haliphaxWed, 04 Jan 2012 18:09:00,2012-01-04:/2012/01/whats-my-status-v1-2-released.htmlmy softwarephppluginstatusnettwitterwordpressWhat's My Status? v1.1 released<p>My microblogging feed widget for WordPress, <em>What's My Status?</em>, has been updated. The plugin now uses <code>curl</code> for its main retrieval mechanism, with standard URL <code>fopen</code> as the fallback. Additionally, the <em>Reset cache</em> command has been fixed. You can <a href="">grab the plugin</a> for yourself over at the <a href=""></a> site …</p>haliphaxMon, 19 Dec 2011 23:39:00,2011-12-19:/2011/12/whats-my-status-v1-1-released.htmlmy softwarephppluginstatusnettwitterwordpressbulkRename v2.0 released<p>I've converted my bulk file renaming utility from VB.NET to C# and made use of a <a href="">command line arguments parsing library</a> so that it will accept folders and regex patterns with spaces in them. It behaves a bit weird if you don't encapsulate your arguments in quotation marks (") or …</p>haliphaxMon, 28 Nov 2011 18:00:00,2011-11-28:/2011/11/bulkrename-v2-0-released.htmlc-sharpmy softwaretoolSelective backup/copy script for moving files into production<p>Whenever our web site needs to undergo re-branding, there is always the hassle of creating both the selective package of files to move into production from development and the selective back-up of the necessary files already on the production server. While this is not a soul-crushingly elaborate and tedious task …</p>haliphaxMon, 03 Oct 2011 18:00:00,2011-10-03:/2011/10/selective-backupcopy-script-for-moving-files-into-production.htmlmy softwarephptoolSimple file access concurrency in C#<p>When working without the safety net of a RDBMS in a multi-user environment, file concurrency may become an issue. In a project I've been working on recently, XML files are being used as the custom data store. This is all fine and dandy for now—with a user base of …</p>haliphaxTue, 20 Sep 2011 18:00:00,2011-09-20:/2011/09/simple-file-access-concurrency-in-c.htmlaspxc-sharpmy softwarexmlUsing WSE 3.0 with Visual Studio 2008 and .NET 3.5<p>While I'm sure many of you have "moved on" to Visual Studio 2010, there are a large number of us still using 2008. Recently, my shop needed to write some code for interfacing with a vendor's web services. No problem, right? Well… not quite. It was quite an undertaking to …</p>haliphaxThu, 08 Sep 2011 18:00:00,2011-09-08:/2011/09/using-wse-3-0-with-visual-studio-2008-and-net-3-5.htmldot netfixtooltutorialKill all shared memory segments in Linux<p>I recently whipped up a shell script to kill all (IPC) shared memory segments in Linux for a client on <a href=""></a>. He wound up going with another contractor's offer, and so I figured I would post my script here for the benefit of all.<!--more--></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>ipcs -m <span class="p">|</span> cut -d …</pre></div></td></tr></table>haliphaxWed, 07 Sep 2011 18:00:00,2011-09-07:/2011/09/kill-all-shared-memory-segments-in-linux.htmllinuxmy softwareregexshelltooljQuery.imgradio Plugin v1.0 released<p>The default HTML radio buttons and check boxes aren't the most aesthetically pleasing things in the world of web design. With this in mind, I have created a <a href="">jQuery</a> <a href="">plugin</a> that will replace those pesky <code>&lt;input /&gt;</code> elements with <code>&lt;span /&gt;</code> elements for your CSS styling pleasure. Under the hood, the original …</p>haliphaxWed, 15 Jun 2011 18:00:00,2011-06-15:/2011/06/jquery-imgradio-plugin-v1-0-released.htmlcssformsjavascriptjquerymy softwarepluginjQuery.noFlickerSlide Plugin v1.0.0 released<p>Since 1.1.3, <a href="">jQuery's</a> <a href="">slideUp()</a> method has had problems with flickering in Internet Explorer. While this issue can generally be fixed by avoiding Quirks Mode with a <code>DOCTYPE</code> declaration, it doesn't always work so easily. (The HTML 5 declaration worked for me, but was unfortunately not an option in …</p>haliphaxFri, 13 May 2011 17:35:00,2011-05-13:/2011/05/jquery-noflickerslide-plugin-v1-0-0-released.htmlfixinternet explorerjavascriptjquerymy softwarepluginForward Gawker sites to their UK counterparts for a better layout<p>I wrote a (<em>really</em>) simple <a href="">userscript</a> today that reloads Lifehacker pages under <a href=""></a>. Why did I do this? Because the Lifehacker UK site doesn't have the trendy new (horrendous) AJAXified layout. Maybe using a <code>hosts</code> redirect instead of a userscript is a better way to handle it (since …</p>haliphaxMon, 09 May 2011 18:00:00,2011-05-09:/2011/05/forward-lifehacker-links-to-the-uk-site-for-a-better-layout.htmljavascriptlifehackermy softwaretooluserscriptSend XMPP messages with Perl (from the command line, too!)<p>I had been looking for a small, simple utility for Windows that could send XMPP messages from the command line for use in various automated tasks and notification processes. I came across <em>sendxmpp</em> as part of the <a href="">CygWin</a> installation, but could not successfully install its dependencies with CygWin's CPAN port …</p>haliphaxFri, 22 Apr 2011 18:00:00,2011-04-22:/2011/04/send-xmpp-messages-with-perl-from-the-command-line-too.htmlmy softwareperlshelltoolxmppCreate anchor links in Twitter status text with PHP<p>In a previous blog post, I outlined how to [convert Twitter @mentions,</p> <h1>hashtags, and</h1> <p>URLs]( (with or without protocol prefixes) into anchor links using JavaScript. Here is that same process wrapped up in a PHP function instead for your server-side needs.<!--more--></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 2 3 …</pre></div></td></tr></table>haliphaxWed, 20 Apr 2011 17:30:00,2011-04-20:/2011/04/create-anchor-links-in-twitter-status-text-with-php.htmlWhat's My Status? v1.0.0 released<p>My first officially-recognized <a href="">WordPress</a> widget, <u>What's My Status?</u>, has been released! It is a widget for displaying a given user's status feed from <a href=""></a>, <a href="">Twitter</a>, or any other service that provides a Twitter-like API. There are several features in the works for future versions—such as inclusion and exclusion …</p>haliphaxTue, 22 Mar 2011 03:38:00,2011-03-22:/2011/03/whats-my-status-v1-0-0-released.htmlmy softwarephppluginstatusnettwitterwordpressCreate anchor links in Twitter status text with JavaScript<p><em>Note: This also applies to any service using a <a href="">Twitter</a>-compatible API, such as <a href="">StatusNet</a> (see: <a href=""></a>) with some minor configuration changes.</em></p> <p>As a side project, I have been working on a StatusNet (specifically, status feed widget for the <a href="">WordPress</a> PHP platform. I had spent a fair …</p>haliphaxThu, 17 Mar 2011 17:41:00,2011-03-17:/2011/03/create-anchor-links-in-twitter-status-text-with-javascript.htmljavascriptmy softwareregextwitterHelp! I can't delete phpMyAdmin's setup.php<p>I've got a VPS server running Debian 5 "lenny" and recently attempted to perform several software upgrades to bring it up to speed (it had been longer than I care to admit). However, the upgrade for the phpMyAdmin package continually failed, stating that it was unable to remove <code>/usr/share …</code></p>haliphaxFri, 04 Feb 2011 12:30:00,2011-02-04:/2011/02/help-i-cant-delete-phpmyadmins-setup-php.htmllinuxphpshellCheck all CheckBoxes in a GridView using jQuery<p>If you're working with a <code>GridView</code> control where you've built a <code>CheckBox</code> control into each row of data displayed, odds are, it would be convenient for your users if a "Check/Un-check All" option was available. The following example will show how to do just that; and with only the …</p>haliphaxMon, 20 Dec 2010 13:00:00,2010-12-20:/2010/12/check-all-checkboxes-in-a-gridview-using-jquery.htmlaspxc-sharpdot netjavascriptjquerymy softwareCustom error messages with ValidationSummary in ASP.NET<p>Sometimes, there are problems encountered in a code-behind file that don't warrant the extra work and mark-up that would otherwise be required to add <code>CustomValidator</code> controls to the page for displaying error messages to the user through your <code>ValidationSummary</code>. Wouldn't it be nice if you could (somewhat) easily take care …</p>haliphaxMon, 29 Nov 2010 15:15:00,2010-11-29:/2010/11/custom-error-messages-with-validationsummary-in-asp-net.htmlaspxc-sharpdot netformsmy softwareProgrammatically modifying file permissions in .NET<p>For one reason or another, somewhere down the line, you're probably going to want to modify a file's access permissions from your code. Maybe your users have a nasty habit of overwriting them, or you want to ensure that newly-created files are given a specific permission mask. Whatever the reason …</p>haliphaxFri, 05 Nov 2010 12:00:00,2010-11-05:/2010/11/programmatically-modifying-file-permissions-in-net.htmlc-sharpdot netsecurityImage dimension Field Validator for Sitecore CMS<p>This <code>StandardValidator</code> extension will determine whether or not a given <code>ImageField</code>'s source image's height and width match with given parameters. Either parameter can be omitted if, for instance, you only care about validating the width of an image (or conversely, only the height).<!--more--></p> <p><em>Note: In the code below, replace …</em></p>haliphaxFri, 29 Oct 2010 12:00:00,2010-10-29:/2010/10/image-dimension-field-validator-for-sitecore-cms.htmlc-sharpdot netmy softwaresitecoreCurrency Field Validator for Sitecore CMS<p>This <code>StandardValidator</code> extension will determine whether or not a given field value passes for currency. In order to do so, it must meet the following requirements:</p> <ol> <li>It must pass decimal.TryParse()</li> <li>It must not have more than 2 digits past the decimal point</li> </ol> <p>Obviously, this does not fit all international …</p>haliphaxFri, 22 Oct 2010 12:39:00,2010-10-22:/2010/10/currency-validator-for-sitecore-cms.htmlc-sharpdot netmy softwaresitecoreFix CodeIgniter IP address detection on lighttpd<p>If the results of a call to <em>$this-&gt;input-&gt;ip_address()</em> gives you "" (the "invalid address" response) and you're running <strong>lighttpd</strong> as your web server, you may be able to fix it <s>with a minor tweak to</s> by extending one of the base <strong>CodeIgniter</strong> libraries. An IPv6-style …</p>haliphaxMon, 18 Oct 2010 00:43:00,2010-10-18:/2010/10/fix-codeigniter-ip-address-detection-on-lighttpd.htmlcodeigniterlighttpdphpNew WordPress blog<p>I've transferred my blog from the Blogger platform (externally hosted) to the WordPress platform (self-hosted) for a couple of reasons. First of all, I wanted more control over the blog on principle. Also, I needed an excuse to become familiar with the WordPress system—and working something into my own …</p>haliphaxWed, 08 Sep 2010 23:55:00,2010-09-08:/2010/09/new-wordpress-blog.htmlblog newsbulkRename v1.1<p>A while back (in 2008), I wrote a simple system utility with VB.NET which leverages the power of <a href="">regular expressions</a> 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 …</p>haliphaxFri, 02 Jul 2010 20:01:00,2010-07-02:/2010/07/bulkrename-v1-0.htmldot netmy softwareregextoolvb.netQuery across servers in Microsoft SQL Server 2005<p>If your organization/project has data repositories spread across more than one database server, chances are that you will eventually want to pull data from more than one server instance in a single query. If you want to perform these cross-server queries without setting up a persistent <em>Linked Server</em> configuration …</p>haliphaxFri, 04 Jun 2010 16:07:00,2010-06-04:/2010/06/query-across-servers-in-microsoft-sql-server-2005.htmlsqlReplacing MS Word's quotation marks in VB.NET<p>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) quotation marks and apostrophes...</p> <p><strong>VB.NET Code:</strong></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">myString</span> <span class="o">=</span> <span class="n">Regex</span><span class="p">.</span><span class="n">Replace</span><span class="p">(</span><span class="n">myString</span><span class="p">,</span> <span class="s">&quot;\u201C|\u201D&quot;</span><span class="p">,</span> <span class="s">&quot;&quot;&quot;&quot;</span><span class="p">)</span> <span class="n">myString</span> <span class="o">=</span> <span class="n">Regex …</span></pre></div></td></tr></table>haliphaxMon, 10 May 2010 19:51:00,2010-05-10:/2010/05/replacing-ms-words-quotation-marks-in-vb-net.htmldot netregexvb.netURL rewriting template engine<p>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 redirects necessary. Since the majority of …</p>haliphaxThu, 10 Dec 2009 17:03:00,2009-12-10:/2009/12/url-rewriting-template-engine.htmlapachelighttpdmy softwarephpregextoolBackup automation and emailing attachments in Linux<p>Any programmer who's ever been burned by data loss can tell you—you've <strong>got</strong> to have backups of your work. If it's code, perhaps they use a version control system such as Subversion. If it's something a little less-readily available, such as a weekly database text file dump, it might …</p>haliphaxWed, 09 Dec 2009 15:13:00,2009-12-09:/2009/12/backup-automation-and-emailing-attachments-in-linux.htmllinuxshellsqltoolPDF to TIFF batch conversion with ImageMagick<p>I have recently been tasked at work to create a script that will convert PDF files to TIFF files to be used for annotation within our document imaging service. The script is responsible for the following process:</p> <ul> <li>Create back-up copies of each PDF</li> <li>Time-stamp those back-up copies</li> <li>Convert each PDF …</li></ul>haliphaxFri, 20 Nov 2009 16:23:00,2009-11-20:/2009/11/pdf-to-tiff-batch-conversion-with-imagemagick.htmlimage editingmy softwarevbscriptRedirect Tomcat to FQDN<p>Recently, I have been trying to configure several Tomcat servers (versions 5.0, 5.5, and 6.0) to restrict all traffic to SSL and ensure that all requests are served through the FQDN (fully-qualified domain name) of the server involved.</p> <p>Well, the first half of that adventure was relatively …</p>haliphaxWed, 02 Sep 2009 20:17:00,2009-09-02:/2009/09/redirect-tomcat-to-fqdn.htmlsecuritytomcatWebFOCUS Impact Analysis report compactor<p>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 block.<!--more--></p> <p><strong>PHP code:</strong></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 2 3 4 5 6 7 8 9 10 11 …</pre></div></td></tr></table>haliphaxFri, 07 Aug 2009 16:34:00,2009-08-07:/2009/08/webfocus-impact-analysis-report-compactor.htmlbusiness intelligencemy softwarephpregexwebfocusLinux: Get size of sub-directores in current directory<p><strong>Edit:</strong> Now that I'm more familiar with the Linux command line, I realize that I was trying to reinvent the wheel. I don't know if I missed this part of the <code>du</code> manpage or what, but the functionality I was looking for is baked in:</p> <div class="highlight"><pre><span></span>du -hd 1 </pre></div> <p>The <strong>h …</strong></p>haliphaxFri, 17 Jul 2009 20:01:00,2009-07-17:/2009/07/linux-get-size-of-sub-directores-in-current-directory.htmllinuxshelltoolPhotobucket thumbnail bookmarklet<p>I've built a pretty simple little utility for turning the URL of an image hosted on Photobucket into a thumbnail which links to the full-sized image. I've designed one version for building bbCode (forum) mark-up, and one for building a basic HTML thumbnail link. Save the links below to use …</p>haliphaxFri, 17 Jul 2009 13:50:00,2009-07-17:/2009/07/photobucket-thumbnail-bookmarklet.htmlbookmarkletsjavascriptmy softwaretoolView live page source with Javascript<p>Have you ever been working on an AJAX-enabled webpage, or a page with complex redirects and permissions, and tried to view its source? What you wind up getting generally looks nothing like the current state of the page in question. You are viewing its <strong>initial</strong> state, since the browser loads …</p>haliphaxTue, 19 May 2009 15:21:00,2009-05-19:/2009/05/view-live-page-source-with-javascript.htmlbookmarkletsjavascriptmy softwaretoolHelp! KB932091 broke my SharePoint installation!<p>Well, it broke ours, too. Our root site collection was completely inaccessible, and the main SharePoint site was returning an HTTP status code of 500. After 12 solid hours of wild goose chases tracking down erroneous error messages, we installed KB936867. The installation failed on both steps 8 and 9 …</p>haliphaxFri, 17 Apr 2009 21:48:00,2009-04-17:/2009/04/help-kb932091-broke-my-sharepoint-installation.htmlsharepointConsuming newlines with the Javascript regex engine<p>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 the constant <em>PCRE_DOTALL</em>. This modifier will cause the "dot" character--which will usually match any normal character--to …</p>haliphaxFri, 20 Mar 2009 19:13:00,2009-03-20:/2009/03/consuming-newlines-with-the-javascript-regex-engine.htmljavascriptregexrexCrawler v2.5.0.0 released!<p>I have released a new version of my home-grown desktop search software, <a href="">rexCrawler</a>. Several aesthetic updates have been included, as well as tighter exception handling. Read about it <a href="">here</a> or download it <a href="">here</a>. Enjoy!</p>haliphaxWed, 11 Mar 2009 22:53:00,2009-03-11:/2009/03/rexcrawler-v2-5-0-0-released.htmlmy softwareUrban Dead Greasemonkey Scripts<p>I've built a home for all of my Urban Dead Greasemonkey scripts at <a href=""></a>. It currently houses CHUD, UDInventory, and the UDBrain Frame Fix script. It will be my base of operations for UD mods from here on out--and I plan to begin working with Google …</p>haliphaxThu, 19 Feb 2009 16:58:00,2009-02-19:/2009/02/urban-dead-greasemonkey-scripts.htmljavascriptmy softwareuserscriptUDInventory - GreaseMonkey script for Urban Dead<p>I've written another GreaseMonkey script for the web game, Urban Dead. This one will compact your inventory by grouping together guns, ammo, first-aid kits, syringes, etc. You can <a href="">install it from GreasyFork</a>. <s>Click here for an iWitness screen shot.</s></p>haliphaxThu, 05 Feb 2009 21:41:00,2009-02-05:/2009/02/udinventory-greasemonkey-script-for-urban-dead.htmljavascriptmy softwareuserscriptFiles as Resources in .NET projects<p>Have you ever found that sleek application you wrote slowly becoming scattered over time with the use of external files? Say you want to create a simple GUI application that can be distributed as just an executable file. What if you want to use a <em>*.chm</em> help file? This article …</p>haliphaxMon, 19 Jan 2009 21:40:00,2009-01-19:/2009/01/files-as-resources-in-net-projects.htmldot netvb.netrexCrawler v2.4.5.0 released<p>My complex file searching software, <a href="">rexCrawler</a>, has been updated. Version improves on version by adding an instructional help menu to the menu strip in the main window of the program. You can download the new version in the <a href="">releases</a> section of the …</p>haliphaxWed, 14 Jan 2009 00:58:00,2009-01-14:/2009/01/rexcrawler-v2-4-5-0-released.htmlmy softwarechud - GreaseMonkey script for Urban Dead<p>I've finished putting together my first GreaseMonkey script! It's called "chud"—the Caddy Healer for Urban Dead. It's been built to plug-in to my favorite web-based zombie apocalypse, <a href="">Urban Dead</a>. It will bring up a list of anyone in your map cell who can be healed with a first-aid kit …</p>haliphaxFri, 14 Nov 2008 23:53:00,2008-11-14:/2008/11/chud-greasemonkey-script-for-urban-dead.htmljavascriptmy softwareuserscriptrexCrawler release<p>I've released one of my personal software projects, rexCrawler. It is a program I use at work to search specified files/folders for (optionally) specified text/patterns. Knowledge of <a href="">regular expressions</a> is suggested, but unnecessary. Output can be sent to the screen, a CSV (comma-separated values) file, or both.</p> <p>You …</p>haliphaxWed, 29 Oct 2008 22:06:00,2008-10-29:/2008/10/rexcrawler-release.htmlmy softwareBrowser-independent XPath with Javascript<p>Now that you're able to <a href="">load XML</a> and <a href="">transform it</a> using an XSL stylesheet, wouldn't it be handy to also be able to perform XPath selects/functions on that XML outside of the stylesheet's formatting? Why, yes. Yes, it would:<!--more--></p> <p><strong>Javascript code:</strong></p> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 2 3 4 5 6 7 8 …</pre></div></td></tr></table>haliphaxWed, 24 Sep 2008 14:58:00,2008-09-24:/2008/09/browser-independent-xpath-with-javascript.htmljavascriptxmlxpathBrowser-independent XSLT with Javascript<p>To piggy-back on the <a href="">Javascript function to load an XML document</a>: what can be done to load an XSL stylesheet and apply it to the XML? For the most part, loading it is a snap... but, as is often the case, Internet Explorer is the exception to the rule. So …</p>haliphaxWed, 24 Sep 2008 14:43:00,2008-09-24:/2008/09/browser-independent-xslt-with-javascript.htmljavascriptxmlxslBrowser-independent XML load with Javascript<p>XML data is, in a word, awesome. It's standardized, it's well-formatted, and there are XML parsing methods in nearly every major programming language--including Javascript. However, when using Javascript, the nasty problem of "browser agnosticism" comes into play: a method that works in Firefox may not (read: won't) work in Internet …</p>haliphaxWed, 24 Sep 2008 14:35:00,2008-09-24:/2008/09/browser-independent-xml-load-with-javascript.htmljavascriptxmlLDAP authentication with VB.NET<p>LDAP, or Lightweight Directory Access Protocol, is a convenient, central repository for a system's personnel information. LDAP (and other Active Directory services) are widely-used by organizations big and small to consolidate user credentials and identification data. For instance: a reporting services application, a webmail client, and a database administration suite …</p>haliphaxThu, 21 Aug 2008 18:00:00,2008-08-21:/2008/08/ldap-authentication-with-vb-net.htmlaspxdot netencryptionldapsecurityvb.netRetrieving user properties from LDAP with VB.NET<p>As discussed in <a href="">an earlier post</a>, LDAP can be a wonderful tool for centrally storing user information and credentials. I've written about how to authenticate against the LDAP repository... but what if you're just looking for information?<!--more--></p> <p>The following code will contact the LDAP server and retrieve all properties for …</p>haliphaxThu, 21 Aug 2008 14:21:00,2008-08-21:/2008/08/retrieving-user-properties-from-ldap-with-vb-net.htmldot netldapvb.netSimple MD5 hashes in VB.NET<p>MD5 (Message Digest) hashes are a simple, efficient way to encode/encrypt information to be passed around. Rather than containing the data itself, an MD5 hash is merely a fingerprint of the information. The hash cannot be decrypted, but is instead compared to other hashed values for verification. This can …</p>haliphaxTue, 19 Aug 2008 18:45:00,2008-08-19:/2008/08/simple-md5-hashes-in-vb-net.htmldot netencryptionvb.netUsing the ConnectionStrings element in ASP.NET web.config<p>If you are building a series of web applications that may rely on duplicate data (such as connection strings for pages that query databases), or you want to separate certain constants from your other code, you need a centralized method for storing and referencing that data. In this case, the …</p>haliphaxMon, 21 Jul 2008 16:06:00,2008-07-21:/2008/07/using-the-connectionstrings-element-in-asp-net-web-config.htmlaspxdot netsqlWipe all elements in a form with Javascript<p>Javascript has a nifty method associated with the <em>form</em> DOM object called <em>reset()</em>. Using this method will revert all values of the form's associated input controls to the values they contained when the page was last sent to the user's browser. That's great... but if you want to revert the …</p>haliphaxFri, 18 Jul 2008 02:24:00,2008-07-18:/2008/07/wipe-all-elements-in-a-form-with-javascript.htmlformsjavascriptPrepared SQL statements in VB.NET<p>Thousands of websites have been hit lately by the rash of SQL injections being perpetrated en-masse. Most languages (current versions, at least) have a procedure for separating parameters from the query they augment in an effort to prevent SQL injection, and VB.NET is no different.<!--more--></p> <p>Assuming you have stored …</p>haliphaxThu, 17 Jul 2008 20:50:00,2008-07-17:/2008/07/prepared-sql-statements-in-vb-net.htmldot netsecuritysqlvb.netCentral repository<p>I'm starting this blog for two reasons.</p> <p>First of all, I wanted somewhere that I could (try to) keep track of all of my programming projects/interests; sort of an "online notepad," if you will.</p> <p>Second, I figure maybe some of the problems I'm working on--or hopefully, my solution(s …</p>haliphaxMon, 14 Jul 2008 02:42:00,2008-07-14:/2008/07/central-repository.htmlblog news