Posts Tagged “how-to”

How to Stop the Computer Beep

Published on January 31, 2008

Here’s a super great tip I learned from an article at Lifehacker.

My laptop here at work, a Lenovo ThinkPad, has a tremendously loud beep (through headphones, it will nearly blow your ears out). This beep occurs every so often when I’m typing faster than the computer thinks I should, and I end up pressing several keys on the keyboard at once. Thankfully, there’s now a way to disable this annoying sound!

To temporarily disable the beep: net stop beep
To permanently disable the beep: sc config beep start= disabled

In the latter command, note the space between the equals and the word ‘disabled.’ I’m not sure if that’s necessary or not, but including it worked for me. The space is indeed required (thanks Dustin). I had no idea that a Windows service was responsible for this annoyance!

Fixing Broken HTML Document Icons

Published on October 7, 2007

I recently ran into a problem on my system where all the HTML document icons had been reset to the generic default icon: Default Windows Icon

Apparently, the Minefield build of Firefox had at some point corrupted this icon. I found that I was unable to change or reset the icon through the Folder Options » File Types dialog in Windows Explorer. No matter what I tried, I couldn’t restore the icon, and it drove me nuts. Then I figured out what to do, thanks to this forum post at MozillaZine:

  1. Open RegEdit.
  2. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML registry branch.
  3. Delete the ShellEx\IconHandler registry key entry.
  4. Close RegEdit.
  5. In Windows Explorer, browse to the Documents and Settings\{username}\Local Settings\Application Data folder.
  6. Delete the iconcache.db file. It’s hidden, so you may need to tweak your Windows Explorer settings to see it.
  7. Reboot.

Problem solved!

Configuring the Linksys WRT54GL

Published on October 6, 2007

I bought a Linksys WRT54GL today, to replace our aging DLink DI-624 (it had been acting pretty flaky as of late). The Linksys router supports open-source firmware, and our first course of action was to flash the highly recommended DD-WRT distribution. I have to say that I am very impressed with this firmware. There are lots of options available and it reports lots of interesting information.

Setting up the router wasn’t difficult, but my dad and I ran into problems getting our IBM laptops connected wirelessly. All of our other machines were able to connect without any problems, so it was clearly a problem with either the ThinkVantage Access Connections application or the IBM wireless adapter. We spent quite a while trying to get things working, and finally found the issue. We had originally set the Wireless Network Mode option in the router basic setup to “G-Only” mode since we intended to use 802.11g only around our house. But for whatever reason, the IBM laptops didn’t like that. Switching the option back to “Mixed Mode” cleared up the problem immediately, much to our delight. Hopefully this little tidbit will help out someone else facing the same problem.

A Perl Module Primer

Published on August 18, 2007

I’ve recently been wrangling with some Perl code for a project at work, and have been putting together a Perl module that includes a number of common functions that I need. As such, I had to remind myself how to create a Perl module. During my initial development, I ran into a number of problems, but I eventually worked through all of them. In the hopes of helping myself remember how to do this, and to help any other burgeoning Perl developers, I’ve written the following little guide. Hopefully it will help shed some light on this subject.

Read the rest of this entry »

Vignette Correction With Photoshop CS2

Published on August 6, 2007

I was touching up some of my photographs recently when I noticed that one shot in particular had substantial vignetting. Wishing to use this photograph as a desktop wallpaper, I set out to try and remove this effect from the photograph. All of the standard Photoshop tools failed to do the trick. Both the clone tool and healing tool produced poor results. Disappointed, I searched the web for help. Thankfully, I found the answer I was looking for: a new filter introduced in Photoshop CS2.

Read the rest of this entry »

Improving iTunes Video Performance

Published on July 29, 2007

I recently installed Apple iTunes for the first time (the QuickTime install on my laptop was having lots of problems). One of the first things I tried out was subscribing to a video podcast (specifically The Totally Rad Show), which was fairly easy to do. As soon as I started to play the latest episode, I noted that playback performance was horrible. I never had this kind of performance problem with QuickTime, so I was a little surprised that iTunes would be so different.

A quick Google search turned up a support article from Apple on iTunes performance in Windows XP and 2000. All of the standard suggestions are there (make sure you’re computer is fast enough, download the latest version, etc.), but one suggestion caught my eye: “Disable Direct3D video acceleration in QuickTime.”

I ventured to the Windows Control Panel, opened the QuickTime item, and turned off the Direct3D video acceleration. To my surprise, performance was restored! Who knew that a simple toggle could solve such an annoying problem?

In loosely related news, I’m getting closer to actually buying an iPod (something I thought I’d never do). More on this later.

You don’t know the power of the Dark Side; I must obey my master. — Darth Vader

How to Get a Complete Firefox Change Log

Published on July 18, 2007

MozillaZine has announced that Firefox has been released (though, as of this writing, I still don’t see it via auto-update). I enjoy looking through change logs (weird as that may seem), so for every new Firefox release, I take a look at Bugzilla to figure out what has been fixed and what is new. Here’s how I do it:

  1. Browse to the BugZilla keywords description page (the link to this page is also available on the advanced search form).
  2. Look for the “fixed[versionNumberHere]” and “verified[versionNumberHere]” keywords. Note that the [versionNumberHere] bit refers to the Gecko version number, not the Firefox version number. For example, Firefox uses Gecko version (as you might guess, the 2.0 release used 1.8.1). Firefox 3 will use Gecko 1.9.
  3. Out to the right of each keyword, you should see a count of the total bugs that particular keyword corresponds to. Click that number, and you will see all of the bugs that use the specified keyword.

Here are the fixed bugs and verified bugs for If you really want to get clever, you can combine these keywords together (separated by a comma) on the advanced BugZilla search page. You’ll need to tweak some of the default settings on that form to get it to work, but it can be done (as this query for Firefox indicates).

There are two special notes about doing things this way:

  1. These queries are looking at fixes in the Gecko engine. As such, bug fixes for Thunderbird and Seamonkey will also show up.
  2. You may not see everything, particularly high-risk security fixes. For all security changes, see the known vulnerabilities page.

Optimizing WordPress Performance

Published on July 9, 2007

I’ve come across a few articles on how to optimize WordPress performance (all of the following links come from the first linked story in the list below):

WordPress is by far my favorite content management system, but I opted to use Movable Type over at Born Geek, mainly because it uses static HTML pages (which load faster). Considering the content in the above guides, I may eventually switch from Movable Type to WordPress.

How to Take Screenshots of Menu Items

Published on April 26, 2007

Taking a screenshot of an application is a simple task: the “Print Screen” key can be used alone (to grab the entire screen), or one can use the “Alt + Print Screen” key combination to take a snapshot of only the active window. But taking a screenshot of the active window, while an application menu is opened, is a little tougher. Sure you could use a third-party solution to do it, but suppose you don’t want to (or cannot) use such a tool. What is one to do?

One option, which isn’t very appealing, is to take a screenshot of the entire screen (using the “Print Screen” key) and then crop out the active window using some image editor. Again, this involves using a third-party application to do the cropping (although Microsoft Paint can be used to some minimal effect).

The better answer, as I accidentally discovered myself, is very simple. Any application worth its salt uses keyboard accelerators (access keys, to be exact) to allow keyboard users to access application menus. The problem is that most applications make use of the “Alt” key to invoke these access keys. For example, “Alt + F” in Windows Explorer will open the File menu. Suppose I want to take a screenshot of a highlighted menu item within the File menu. If I open the menu and press “Alt + Print Screen” to take the screenshot, the menu is dismissed, since the application thinks I’m trying to invoke another menu. But we can work around this limitation!

  1. Hold the Alt key down and press the corresponding access key to open the desired menu.
  2. Keep the Alt key pressed!
  3. Move the menu selection (using the arrow keys on the keyboard) to the desired menu item.
  4. Press the Print Screen key.

Voila! An active-window screenshot with a highlighted menu item, using no third-party application. Here’s an example:

Menu Screenshot Example

Counting Items in Multiple Tables With MySQL

Published on October 13, 2006

While working on my photo album software, I ran into an interesting SQL problem. I wanted to be able to display information about my photo albums, along with the number of images in each album. The problem is that my data is broken up into two tables: an albums table and an images table. My goal was to use exactly one SQL query to access all of the data, including the count of images. And I wanted empty albums (no images) to also show up in the query’s results. But try as I might, I couldn’t get the query to return the data I wanted. I finally found a solution that works, and I present an example below.

Let’s suppose we have two MySQL tables: one that represents directories, and another that represents files. The directories table has the following columns:

  • ID
  • Name

And the files table has the following columns:

  • ID
  • Parent_ID
  • Name

The Parent_ID field in the files table corresponds to the ID field in the directories table. In order to select both the count of files in each directory, as well as all of the directory information, we do a simple join. But here’s the trick: the order of your tables matters! Here’s the query that works for this scenario:

SELECT d.*, Count(f.ID) AS Count FROM directories d LEFT JOIN files f ON f.Parent_ID = d.ID GROUP BY d.ID

When the tables are reversed in the JOIN, only tables with 1 or more entries show up in the results. What a subtle change! Hopefully someone will find this tip useful. It sure took me a while to get this working.

Removing Inline Upload From WordPress

Published on September 24, 2006

Here’s a handy tip for all you WordPress 2.x users out there. The inline uploading feature of the “Write Post” administration page was completely useless to me. I never have, nor will I ever, upload files to my web server using the WordPress interface (that’s what we have SCP and SFTP for). What irritated me most, however, was that I couldn’t turn this feature off, thereby hiding the iframe that contained the uploading controls. It took up a large amount of space on the admin page, and it looked ugly. But I’ve figured out how to “disable” it. Here’s what I did:

In the wp-admin/ folder, I opened up the file named edit-form-advanced.php. Doing a search for the word upload yielded a block of code controlled by the following conditional expression:


I simply commented out this block (including the conditional) with some c-style comments. I did the exact same thing for the edit-page-form.php file. VoilĂ : no more inline upload! I’m so glad I’ve been able to reclaim that wasted screen real estate.

Zalman VF-900 Install Process

Published on August 18, 2006

Not too long ago, I posted a Zalman VF900 review and, due to my lack of a digital camera at the time, failed to post any images about the install process. Now that I have a camera, and due to my recent computer rebuild, I have posted a small photo set of the install process.

This time around, installation was much easier since I knew what to expect. Thankfully, the stock cooler on the eVGA GeForce 7900GT was easy to remove, unlike my previous card. And the Zalman cooler is, as always, a snap to install. Although I don’t have any current screenshots, my temperatures on this new card are phenomenal. The idle temperature stays around 40 degrees Celsius, and the highest load temperature I’ve seen has been a paltry 45 degrees! As I said before, I highly recommend the Zalman cooler; it truly works wonders.

Fun With Linux Development

Published on July 20, 2006

After graduating from school with a bachelor’s degree of computer science, I must admit that I knew virtually nothing about developing *NIX based applications (that’s UNIX / Linux based applications for the non-geeks out there). Granted, I did do a little bit of non-Windows based programming while in school, but it was always incredibly basic stuff: compiling one or two source files, or occasionally writing a make-file for larger projects (three or four source files). Having never had a Linux or UNIX box to play with outside of school, I just never got a chance to get my feet wet. Thankfully, my job at IBM has changed that.

Over the past few weeks, I’ve been doing a great deal of Linux programming, thanks to the cross-“platformedness” of one of the projects I’m working on. And this project is way more complicated than your typical school assignment. I’m now horsing around dynamically linked libraries, also known as “shared objects” in Linux land, like nobody’s business. Not only that, the project itself is essentially a multi-threaded shared object, making it all the more exciting. I’ve learned more about g++, ld, and ldd in the past few weeks than I ever knew before.

Unfortunately, debugging multi-threaded shared objects is easier said than done. The debugging tools in Linux (at least the ones I’ve played with) all suck so horribly. They make you really appreciate the level of quality in Microsoft’s Visual Studio debugger, or better yet, in WinDBG (this thing is hard core, and it’s what the MS developers actually use in practice). Fortunately, printf() always saves the day.

One cool trick I recently employed to debug a library loading problem I was having, is the LD_DEBUG environment variable. If you set LD_DEBUG to a value of versions, the Linux dynamic linker will print all of the version dependencies for each library used for a given command. If you have a Linux box, try it out. Set the LD_DEBUG environment variable, then do an ls. You’ll be amazed at the number of libraries that such a simple command involves.

Although Linux development can be frustrating at times, I’ve already learned a great deal and consider my experiences a great success. If I come across any more useful tips (like LD_DEBUG above), I’ll try my best to post them here (as much for my sake as for yours). Until then, you’ll find me knee-deep in my Linux code. I’ve got a few more bugs to squash.

Safekeeping Your Bookmarks

Published on September 18, 2005

Here’s a small but handy Firefox tip for “safekeeping” your bookmarks. It also lets you share your bookmarks across multiple profiles!

  1. Navigate to your Firefox profile directory. On Windows, this is usually located somewhere similar to the following: C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\
  2. Copy your bookmarks.html file and paste it in a safe location elsewhere on your hard drive.
  3. Back in your profile directory, create a text file called user.js (if one does not already exist). Open the file for editing in your favorite text editor (avoid word processors like Microsoft Word).
  4. Add the following line of text to this file, changing the path to the appropriate location (wherever you copied your bookmarks to earlier): user_pref("browser.bookmarks.file", “C:\Path to Bookmarks File\bookmarks.html”);
  5. Save the file and restart your browser!

You can use this trick in multiple profiles, allowing them to all point to the same bookmarks file. Additionally, it helps to safeguard against possibly losing your bookmarks if your profile becomes corrupt.

Open Command Window Here in Windows 2000

Published on August 15, 2005

The “Open Command Window Here” power toy for Windows XP is an excellent tool that I use all the time. I run Windows 2000 at work, however, so I don’t have access to this excellent computer aid. But I recently found this article, which discusses how to add the feature to any flavor of Windows. Method number 3 was my preferred choice, and I will reproduce the steps I took below.

  1. In Windows Explorer, open the Tools » Folder Options menu item.
  2. Select the File Types tab.
  3. Press the letter ‘n’ on your keyboard to scroll to the N/A section.
  4. Select the entry labeled Folder.
  5. Click the Advanced button.
  6. Click the New button.
  7. In the action field, type “Command Prompt” (without the quotes).
  8. In the application field, type “cmd.exe” (without the quotes).
  9. Save all your changes (click OK on each dialog) and exit the Folder Options dialog.

Once you perform the above steps, you’ll be able to right click a folder and select the “Command Prompt” menu item to open a command window. How cool is that?

Copyright © 2004-2019 Jonah Bishop. Hosted by DreamHost.