Skip to main content
I'm streaming on Twitch right now. You should stop by. Let's go!

Tagged: my-software

  • A chat bot in your browser


    I've been tinkering with tmi.js (Twitch's messaging interface) in node as of late, and it occurred to me: the library works in the browser, as well! With this in my back pocket, I went off and built a tiny little chat bot as an experiment. The bot responds with a random "thank you" emote …

  • Track change events for YouTube with MutationObserver


    Have you ever wanted to react to events taking place on a web page, but they aren't capital-e Events that you can catch and handle? I was in this situation recently, where I wanted to grab the current video and chapter titles to display on my Twitch stream. YouTube isn't going to provide you with …

  • Rate limiting with Flask-SocketIO


    I've been transitioning the API for a Flask project I'm working on away from REST and toward Socket.IO. In doing so, I came to the abrupt and depressing realization that the rate-limiter I had been using for the REST endpoints (flask-limiter) was unable to apply to Socket.IO endpoints. The author …

  • Aethersprite: a Discord bot framework


    For some months, I had been tinkering with the discord.py library and slowly building up a bot for use in Nexus Clash faction servers. The more I added to it, the more I began to realize that what I was really building was a bot framework, and that framework just so happened to have some commands …

  • More FlaskBB development


    The train keeps rolling. I've been busying myself with more FlaskBB development lately. I took the Docker image and expanded it into a docker-compose 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 dicebot …

  • FlaskBB development


    Lately, I've been getting involved with some Python-based forum software, FlaskBB. 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 seemed …

  • Hosting my own git repositories


    I've run my own personal git service for several years now. Previously, it was with cgit on nginx and gitolite. I then modded cgit with some password maintenance features. After a while, I tried using several more "modern" git repo hosting solutions, and I've finally settled on gogs, the Go Git Service.  …

  • repo2site: Make a web site out of a git repo's MarkDown files


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

  • 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 dimensions) of the web browser requesting them. This way, you're not sending huge images to phones. Pair this with some CSS to scale your images to fit their containers, and you're cooking with gas!  …

  • 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 a simple shell script that handles most of that nasty business for you.  …

  • 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 top" link) after you've reached a certain point on the page, or only while some other element is within the viewport.  …

  • 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!  …

  • 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.  …

  • 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 attribute to the UploadFile control, and our security engineer can breathe easy.  …

  • Disable SSLv3 to avoid POODLE attack in web.py


    An open source application that I contribute to uses web.py 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 the Internet is currently buzzing about. Here's an abstract example so that you can do this yourself at home.  …

  • SVG polyfill in pure Javascript


    A designer at work pointed out this SVG polyfill 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 each function. So, I rewrote it in pure Javascript.  …

  • Give-Me-Coins.com Condensed UserScript


    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 (Give-Me-Coins.com) and decided that I could do without a few of the widgets on their dashboard page. Bing-bang-boom, I wrote a UserScript to rearrange things a little bit. Here it is for your consumption.  …

  • Tribute: An Homage to My ASCII Heroes


    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 this thing that I've made—I can't help but shout about it from the mountaintops.  …

  • Browsercache.php: A simple browser-cache-handling library for CodeIgniter


    While CodeIgniter provides a disk caching mechanism, it lacks a browser caching mechanism. Without a lengthy introduction, here's one.  …

  • ascii.js: A font-based rendering engine for ASCII artwork


    A long-standing and thoroughly-enjoyed hobby of mine is creating and consuming ASCII artwork (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 …

  • scrollFollow: An auto-scrolling extender for knockout.js


    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 this to be a useful mechanism for logs.  …

  • staggr featured on freewaregenius.com


    My experimental link-staggering Facebook service, staggr, has been featured on the free software blog, freewaregenius.com. Cheggit: http://www.freewaregenius.com/automate-facebook-link-posting-at-20-minutes-intervals-with-staggr/ …

  • Batch convert audio files to MP3 with PowerShell and VLC Player


    I adapted a PowerShell script by Tim Van Wassenhove 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 dangerous characters (apostrophes in the case of the VLC command line, and square brackets in the case of the Remove-Item call) are taken care of.  …

  • UserScript: Tidy up TVGuide.com listings


    The way that TVGuide.com's listings are organized is difficult to work with. This UserScript (compatible with GreaseMonkey, Chrome, Opera, and perhaps more) will gut the listings from the layout and give you one all-encompassing, manageable scroll bar for perusal.  …

  • 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 hosted on github. Much of the code is stale—and somewhat embarrassing—but I figured that it was high time I shrug off that self-defensive apprehension and use it as fuel to make me a better developer.  …

  • 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.  …

  • JavaScript Challenge #2 (Whac-A-Moo)


    Though I am not a proponent of the MooTools JavaScript framework, their blog 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 …

  • What's My Status v1.2 released


    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 identi.ca speak) from your activity feed. Pick up the new version from the WordPress …

  • What's My Status? v1.1 released


    My microblogging feed widget for WordPress, What's My Status?, has been updated. The plugin now uses curl for its main retrieval mechanism, with standard URL fopen as the fallback. Additionally, the Reset cache command has been fixed. You can grab the plugin for yourself over at the wordpress.org …

  • bulkRename v2.0 released


    I've converted my bulk file renaming utility from VB.NET to C# and made use of a command line arguments parsing library 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 if you forgo the use of an equals sign (=) between the parameter flag and its argument, but those are small concessions to make. You can download v2.0 to use yourself.  …

  • Selective backup/copy script for moving files into production


    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, it still takes time that could be better spent elsewhere in the project. With this in mind, I created a simple PHP script that will mirror the directory structure and only those files that will be changed in the process as it copies the files from development into production.  …

  • Simple file access concurrency in C#


    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 1 (myself)—but when the app is released "into the wild", concurrency may become a serious problem. To remedy this problem (in a simple, no-nonsense fashion), I have been relying on a mutex file to exclude concurrent writes to the XML data store; it has been holding up just fine in my simulated scenarios. The mutex allows for one web request to read in the XML, modify it, and write back to it without being usurped by concurrent requests. There is a fail-safe mechanism which will wait for up to 3 seconds (30 attempts to lock the file) before failing outright.  …

  • 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.com. He wound up going with another contractor's offer, and so I figured I would post my script here for the benefit of all.  …

  • jQuery.imgradio Plugin v1.0 released


    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 jQuery plugin that will replace those pesky <input /> elements with <span /> elements for your CSS styling pleasure. Under the hood, the original elements are still being used for storing the user's selection(s), so there's nothing extra for you to do when the form is submitted. Additionally, it can be configured to operate as a "rating" system—so that, for example, checking the 4th star in a 5-star list would swap the first 4 stars in the list to the "checked" state (visually speaking, at least… in the underlying radio buttons, only the 4th star would be selected).  …

  • jQuery.noFlickerSlide Plugin v1.0.0 released


    Since 1.1.3, jQuery's slideUp() method has had problems with flickering in Internet Explorer. While this issue can generally be fixed by avoiding Quirks Mode with a DOCTYPE declaration, it doesn't always work so easily. (The HTML 5 declaration worked for me, but was unfortunately not an option in the project at hand—which was filled with XHTML 1.0 Transitional pages.) To correct the problem with a JavaScript solution, you can overload the $.fn.slideUp prototype for all Internet Explorer versions and have it animate the element to a minimum height of 1px. The bug with IE seems to stem from it being unable to elegantly handle 0px-tall elements. I've built a jQuery plugin, jQuery.noFlickerSlide, which does just that.  …

  • Forward Gawker sites to their UK counterparts for a better layout


    I wrote a (really) simple userscript today that reloads Lifehacker pages under uk.lifehacker.com. Why did I do this? Because the Lifehacker UK site doesn't have the trendy new (horrendous) AJAXified layout. Maybe using a hosts redirect instead of a userscript is a better way to handle it (since you're still going to see a flash of the lifehacker.com site before being redirected with the userscript), but this method is far less intrusive—and less likely to break any pages on the UK site which may rely on resources from the naked domain.  …

  • Send XMPP messages with Perl (from the command line, too!)


    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 sendxmpp as part of the CygWin installation, but could not successfully install its dependencies with CygWin's CPAN port. I've been playing around with the Net::XMPP Perl library, and in spite of its poor documentation, I decided that I was going to hack away with it until I got something usable. I'm a programmer, after all—if a utility I need doesn't exist, why not make it myself?  …

  • Create anchor links in Twitter status text with PHP


    In a previous blog post, I outlined how to convert Twitter @mentions, #hashtags, and 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.  …

  • What's My Status? v1.0.0 released


    My first officially-recognized WordPress widget, What's My Status?, has been released! It is a widget for displaying a given user's status feed from identi.ca, Twitter, 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 filters—but at its core, it is a simple, effective status feed widget that will intelligently convert @mentions, #hashtags, and URLs alike into clickable links. It is also prepared to cache the feed results, so it shouldn't step on anyone's toes with regard to API access limits.  …

  • 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.  …

  • Check all CheckBoxes in a GridView using jQuery


    If you're working with a GridView control where you've built a CheckBox 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 tiniest bit of jQuery script!  …

  • Custom error messages with ValidationSummary in ASP.NET


    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 CustomValidator controls to the page for displaying error messages to the user through your ValidationSummary. Wouldn't it be nice if you could (somewhat) easily take care of it in your code-behind file alone, without adding additional clutter to your UserControl/Page/etc.? Well, you can! The following IValidator extension class can be added to a Page's Validators list with ease for displaying custom error messages.  …

  • Image dimension Field Validator for Sitecore CMS


    This StandardValidator extension will determine whether or not a given ImageField'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).  …

  • Currency Field Validator for Sitecore CMS


    This StandardValidator extension will determine whether or not a given field value passes for currency. In order to do so, it must meet the following requirements: It must pass decimal.TryParse() It must not have more than 2 digits past the decimal point Obviously, this does not fit all international systems—however, in my case, it works for my project (which does not require localization). The code could easily be customized to accommodate additional formats.  …

  • 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?  …

  • 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 redirects necessary. Since the majority of these will fall into a handful of categories, I began creating IIRF (Ionic ISAPI Rewrite Filter) URL rewriting rules that would, for instance, move a particular list of "Offices" from /offices/officename to http://newserver/offices/officename. (Note: These directives should be compatible with Apache's mod_rewrite, and even lighttpd's url.rewrite, as well.)  …

  • PDF to TIFF batch conversion with ImageMagick


    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: Create back-up copies of each PDF Time-stamp those back-up copies Convert each PDF to a LZW-compressed TIFF image  …

  • 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 block.  …

  • Photobucket thumbnail bookmarklet


    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 them: bbCode Thumbnailer HTML Thumbnailer Have a look at the code yourself:  …

  • View live page source with Javascript


    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 initial state, since the browser loads a fresh copy for the source view. That's just fine if everything you need to check was all set up and ready to go when the page was initially loaded; but that is rarely the case with AJAX.  …

  • rexCrawler v2.5.0.0 released!


    I have released a new version of my home-grown desktop search software, rexCrawler. Several aesthetic updates have been included, as well as tighter exception handling. Read about it here or download it here. Enjoy! …

  • Urban Dead Greasemonkey Scripts


    I've built a home for all of my Urban Dead Greasemonkey scripts at sites.google.com/site/udscripts. 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 Gears in order to …

  • UDInventory - GreaseMonkey script for Urban Dead


    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 install it from GreasyFork. Click here for an iWitness screen shot. …

  • rexCrawler v2.4.5.0 released


    My complex file searching software, rexCrawler, has been updated. Version 2.4.5.0 improves on version 2.4.4.0 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 releases section of the rexCrawler website. …

  • chud - GreaseMonkey script for Urban Dead


    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, Urban Dead. It will bring up a list of anyone in your map cell who can be healed with a first-aid kit, …

  • rexCrawler release


    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 regular expressions is suggested, but unnecessary. Output can be sent to the screen, a CSV (comma-separated values) …

View all tags