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

Tagged: tool

  • Minifying Javascript using ESBuild with Flask-Assets


    I've been using Flask and its Flask-Assets package (which is a wrapper around the webassets package) for quite some time now without issue, but recently, I've been scratching an itch for ES2016 and beyond. One of my favorite features of ES2016+ is that modules (and importing them) are part of the …

  • Tail for browser windows


    Have you ever been watching log output via a web application, and you just want your browser window to jump to the bottom of the document whenever new output shows up? Well, stranger, let me tell you, I certainly have. That's why I wrote a bookmarklet that does just that. The first time you invoke …

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

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

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

  • Mozilla's TogetherJS in a bookmarklet


    Mozilla recently introduced TogetherJS, a succession of their TowTruck service. Being that it is so similar to TowTruck, I went ahead and made a bookmarklet for it. …

  • 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 version, they no longer do this, and so all of our SVN references are out of whack. While renaming all of them to remove the "app_" at the beginning isn't the entire solution, it's one step I had to follow that I believe will be of benefit to others. …

  • Truck It!: Mozilla TowTruck in a bookmarklet


    Mozilla Labs 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, however, is the fact that the TowTruck Javascript file must be included in the source of your page in order to use it. …

  • Add "desktop version" and "mark all as read" links to Tiny Tiny RSS mobile plugin


    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 mobile 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 article bodies; and it automatically forwards you to the mobile version when you view TTRSS on your phone. I have just one problem with it—there is no way to mark articles as read in bulk from the interface… so I added some tweaks. …

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

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

  • Programmatically compile Audiences in SharePoint 2010


    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 is possible. The painful thing about it is that you must know the ApplicationId of the UserProfileService application. This is where reflection comes in extremely handy! …

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

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

  • Using WSE 3.0 with Visual Studio 2008 and .NET 3.5


    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 get a functional wrapper class for our vendor's web service shoehorned into Visual Studio 2008 and the .NET 3.5 platform. …

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

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

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

  • Backup automation and emailing attachments in Linux


    Any programmer who's ever been burned by data loss can tell you—you've got 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 take a bit more work. …

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

  • Linux: Get size of sub-directores in current directory


    Edit: 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 du manpage or what, but the functionality I was looking for is baked in: du -hd 1 The h flag is for "human-readable format", and d 1 tells the program to go "no deeper than 1 level from the given folder". (With no folder specified, the current directory is used.) The following string of commands can be used to not only list the immediate sub-directories of the current directory, but also print their size in human-readable format (kilobytes): du -sh `ls -l | grep '^d' | awk '{print $9}'` Here's how it works: …

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

View all tags