Ensure Text Files End with a Newline

Posted On Thu, 4 Oct 2012

Filed under Batch
Tags: , , , ,

Comments Dropped leave a response

From time to time, you may find yourself building up a file comprised of command output and snippets from other files. On these occasions, you will no doubt be using pipes and redirection, and commands such as copy, findstr, and type.

Which is all well and good except that you could easily run into trouble if some of the bits and pieces you're cobbling together end with a newline while others don't. For instance, type will join the last line of a file that doesn't end with a newline with the first line from the next file, forming one long line. Probably not what you want.

And according to Dave Benham in his treatise on the Undocumented Features and Limitations of FindStr, findstr under XP and Win7 will hang if redirected input doesn't end with a linefeed character.

Read the rest of this post »

Wayback Machine Bookmarklet

Have you ever returned to a web page you hadn't visited in a while only to discover it no longer exists, or has changed beyond all recognition? If so, one way to banish those dreaded “404 Not Found Blues” is to try your luck with the excellent Internet Archive's Wayback Machine.

Read the rest of this post »

Inspirational Sports Statue of Jesus

Below is just one of the many “inspirational sport statues” available from CatholicShopper.com. Promoted as: the perfect gift for every young Catholic athlete. These statues portray Jesus actively participating with boys and girls in a variety of sports. A wonderful way to reinforce Jesus “as friend” in everyday activities.

As an added bonus, all statues now have a brass nameplate with the inscription: Jesus Is My Coach

continue reading »

Stupid URL Tricks

Below is a small collection of simple tips and tricks you can use just by manually editing the URL in your browser's address bar. How to access the address bar depends on whatever combination of browser and operating system you happen to be using, but pressing <Alt+D> is a good bet, or try <F6> a few times until focus toggles round to the address bar. If all else fails, I suppose you could click the mouse on the URL currently displayed in the address bar, but where's the fun in that? Anyways, here they are. I hope you find them useful.

Read the rest of this post »

Bertie Ahern’s Most Hilarious Howlers

Posted On Sun, 2 Sep 2012

Filed under Humour
Tags: , , ,

Comments Dropped leave a response

This post has moved. Please update your bookmarks.

Extract a Range of Lines from a Text File

Posted On Mon, 27 Aug 2012

Filed under Batch
Tags: , , ,

Comments Dropped leave a response

Below is a little Batch program to extract a range of lines from a text file and output them to the screen. A simple enough task, or so I thought!

Read the rest of this post »

Kill Zombie Processes with a Keystroke

Does Windows ever grind to a halt because of unresponsive or “zombie” processes? Is it sometimes so bad that opening Task Manager becomes a task in itself? Fortunately, there's a little-known program called taskkill.exe that does exactly what its name suggests. In this post, I'll show you how to create a shortcut to taskkill.exe that will kill those zombies with a single keystroke.

Read the rest of this post »

Count the Number of Lines in a Text File

Posted On Thu, 9 Aug 2012

Filed under Batch
Tags: , ,

Comments Dropped leave a response

I have of late, wherefore I know not, started writing little Batch programs. Batch is ugly and buggy, but at the same time its raw minimalism makes it capable of performing surprisingly complicated tasks. Ah, but knowing how to exploit this power, therein lies the rub!

Let's start with the seemingly straightforward task of counting the lines in a text file and storing the result in a variable.

Read the rest of this post »

A Complement of Oxymorons

Posted On Sun, 15 Jul 2012

Filed under Humour
Tags: ,

Comments Dropped leave a response

What is the group noun for a collection of oxymorons? A contradiction, or maybe a paradox? Or how about a complement of oxymorons? Get it? Well, never mind…

Anyways, I put together a collection of the best oxymorons I could find. Many are old, a few are new. Most are borrowed, and one or two are blue, so be warned!

This collection is a “work in progress” and will be updated from time to time. Sign up for email notifications or subscribe to the RSS Feed (see footer) to be kept in the loop.

Read the rest of this post »

Prevent Mouse from Waking Windows out of Standby

Please note that although this post was originally written for Windows XP, the instructions outlined below still apply for later versions of Windows with minor (if any) differences.

Frustrated because the slightest twitch of the mouse is waking your Windows machine out of standby? Well, fret no more! Here's the solution…

Read the rest of this post »

Welcome to the Junk Heap

Greetings!

I'm in the process of transferring my old blog on Posterous to WP. The move was prompted by the news on March 12th that Posterous had been acquired by Twitter. The transition has been slow and the learning curve steep, but I'm ready to start blogging again.

Come back every week or two to check out what's new. Better yet, subscribe to the RSS Posts or Comments Feeds, or sign up for email notifications of new posts (see footer). Your feedback is also encouraged: feel free to send me a tweet or contact me by email.

« Previous Page