If you use a Mac and Windows together, you’re likely to end up with a bunch of hidden .DS_STORE files all over your Windows drives. You can easily search and destroy them all using this command:

(Open the command line first of course. You can do this by mashing Win + R, then typing “cmd”. Or just type “cmd” in the Start Menu search box.)

del /s /q /f /a .DS_STORE

That will find every instance of this Mac resource file and delete it. Good times. But wait there’s more. In addition to DS_STORE, OSX will also put a bunch of other junk every where starting with “._”. Kill those like this.

del /s /q /f /a ._.*

(Why not use “._*'” instead? Apparently, you can sweep up legit files from other things such as Chrome by doing that. Thanks, commenters.)

Important note! This will only search inside the folder you’re in, as well as every folder below that. So, if you wanted to search and clean an entire drive, make sure you’re in the root folder. Get there with this:

cd \

You could also put all of this into a .bat file for great automation.

Pro tip: copy-pasting into your command window

Windows 10 will let you CTRL-V paste into the command line. Friggin sweet. But did you know you can do it in other versions of Windows too? Just right-click on the command window and click Paste. That will save you a little work.


Recently, I installed Lubuntu 11.10 (a netbook-optimized version of Ubuntu) on my wife’s netbook at Lifehacker’s suggestion. And wow–did it make an incredible difference. It’s like a brand new machine compared to Windows 7 running on it, which was getting unbearably slow.

While Lubuntu will look and act pretty familiar to anyone born and raised on Windows, I wanted to make sure when I handed the netbook back to her, she was as comfortable as possible. That meant configuring, among other things, the power management. (Lubuntu wasn’t putting the machine to sleep when the lid was closed by default.)

First, I had to make the power manager run on startup. To do this, you go to:

Menu (think Start Menu) > System Tools > Desktop Session Settings.

Here, you’ll see a number of items. Power Manager should be pretty close to the top. Check the Enabled box, hit OK, then restart.

Now you’ll see a familiar battery icon in the system tray. Yay! Right-click on that to find its preferences, like how long until the computer sleeps, what happens when power buttons are pressed and when the lid is closed, etc.

Back to that missing icon…

Anyhow, during my experiments, I accidentally set the power manager’s system tray icon to “Never show icon”. And there was no link to it under the System Tools or Preferences Panel. How the heck was I supposed to get it back? After too much searching, I finally discovered you can run the settings panel from the command line. Open up the terminal (in Lubuntu it’s under Menu > Accessories > LXTerminal). Now type this in and mash enter:

xfce4-power-manager-settings

The settings panel will appear. Breathe sigh of relief and continue.

Update:

Commenter Marc shares how to make the power manager’s settings panel appear in the Menu (Start Menu-esque Thing).

If you want to find an entry in the menu, you’ll have to edit /usr/share/applications/xfce4-power-manager-settings.desktop. Change:

OnlyShowIn=XFCE;

to

OnlyShowIn=XFCE;LXDE;

Update: This works all the way up to 10.10 Yosemite.

Ever wanted to have some more organization on your dock? I like to keep things separated more or less by group: everyday things, development tools, and apps that just happen to be open but aren’t permanent fixtures on my dock. I also like to keep my documents and folders separated from minimized things and the trash on the right side.

A Mac dock containing spacers
A-like so

It’s fairly simple to drop some spacers into your dock. And yes, it uses Terminal, but don’t get squeamish. Just copy and paste the lines you see below. To add spacers to the left side, open up Terminal and paste this:

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

Now mash Enter.

And now you’re wondering why nothing happened. We have to reset the dock to make the space appear. Now paste this:

killall Dock

And mash Enter again. Your dock will vanish and reappear with a space at the end of the left side. You can drag it around (or even off) just like any other icon. Repeat as desired for more spacers!

And for the right side…

Paste this, followed by the usual mashing of Enter afterwards.

defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'

Follow it up with the usual:

killall Dock

Now speak aloud the word “booyah” or other popular slang term designating success.

Note: I’ve confirmed this also works in OSX 10.7 Lion


At first glance, it may look like Microsoft disabled recording of internal—or “what you hear”—sounds in Windows 7. Well, they didn’t. It’s a little trickier, granted, but this is (often) a quick fix.

To enable it:

  1. Right click on the speaker icon in the system tray (bottom right).
  2. Choose Recording Devices.
  3. In the empty white space, right-click and choose Show Disabled Devices. You should see Stereo Mix appear in the list.
  4. Right click on Stereo Mix and choose Enable.
  5. Right click on Stereo Mix again, and choose Set as Default Device.

Now you can record anything you hear through your speakers. If you don’t have a program that can record audio, you can get a nice one called Audacity over here. It’s free.

Update 1:

What about Windows 11?

The old sound mixer isn’t available anymore. Or so it seems! You can use a command prompt, “Run”, or just search for mmsys.cpl. Run that to get the old sound mixer talked about above. Click the Recording tab.

If you’re trying to listen to Line In, you may need to right click it, choose Properties, then click the Listen tab and check Listen to this device.

Update 2:

I have a SoundBlaster card and this isn’t working!

As near as I can tell, this is a driver issue. In XP/Vista, the driver supported a “What U Hear” mode, which they seem to have axed since, or at least jacked with.

Since there are a variety of Sound Blaster cards and a slew of different driver sets, the best I can do is give you a list of things to try. Each of these options has worked for at least one person I know.

Option 1: Manually uninstall your drivers, then reinstall.

  1. Mash your Start Ball (start menu) and type in Device Manager
  2. Click the arrow next to Sound, video, and game controllers
  3. Find your SB card, then right click on it and choose Uninstall

Now there are two ways to proceed. First, try simply restarting your computer and let Windows 7 try to install the driver for you. There’s a chance you’re done at this point. If not, run Windows Update and let Windows 7 find and install the latest driver.

Option 2: Manually reinstall your drivers from your CD.
Apparently, the automatic installer on many of these driver CDs is doing it wrong. To manually install the driver…

  1. Insert your driver disc—but don’t let it do anything for you! Close any installers it opens.
  2. Mash your Start Ball (start menu) and type in Device Manager
  3. Click the arrow next to Sound, video, and game controllers
  4. Find your SB card, then right click on it and choose Update Driver Software…
  5. Click on Browse my computer for driver software
  6. Browse to your CD. Look for a “drivers” folder, and then find a sub-folder that fits your computer (64-bit or 32-bit). Install using those drivers and restart. If it still doesn’t work, you might have picked the wrong one (especially if your card stops working altogether). You might want to try a different driver from your disc.

Option 3: is to specifically locate SB24_VTDRV_LB_1_04_0065A.exe (if you have an Audigy, SE/LS/Live!24-bit). This version is outdated, but is known to have the “What U Hear” function.

Update 3:

Possibly Major Caveat

Since originally posting this, I’ve learned that some RealTek chipsets simply don’t support Stereo Mix, meaning you will likely never get this to work without another card, or some serious kludgery. More info as it becomes available.


iTunes 10. Good stuff. But I’m really surprised that Apple — who are known for their design expertise — would not only violate a well-known design convention, but their own well-known design convention with those stoplight control buttons. It may seem like a simple annoyance, but multiply it by 1000 times over the course of a week or a month, and you have a fairly irritating problem.

Fortunately, putting those buttons back the way they should be is pretty easy. (Mac only)

1. Close iTunes if it’s open.
2. Open up Terminal.
3. Copy/paste this line into it:

defaults write com.apple.iTunes full-window -1

4. Mash Enter.

Done. Re-open iTunes and enjoy.


We have Windows 7 Home Premium 3-bit on one computer and suddenly couldn’t change the wallpaper. This seems to be a problem out there. There can be various ways to fix it. This one worked for us:

  1. Hit the Start ball
  2. Type “adjust appearance”
  3. A link called “Adjust the appearance and performance of Windows” will appear. Click that.
  4. Toggle the top check box “Animate controls and elements inside windows”

 

Worked for us. Your actual mileage may vary.


Okay, so the thing about downloading a file is that you usually know that you downloaded it. Because you did that. You downloaded it. Intentionally. On purpose. And now, when you open it, Windows or OSX feels that it needs to remind you that you downloaded it.

Goodness, I find that annoying–especially when it’s my own file or script that I created, or it’s a Microsoft program that Windows is telling you to be careful of, because who knows where a file like that could have come from?

Alright, enough ranting. Let’s get rid of those messages.

Windows

This should work in XP, but I’ve only tested it in Vista and Windows 7.

1. Open the Control Panel, and choose Internet Options

2. Under the Security tab, click the button labeled Custom Level. In the box that appears, scroll down until you find a section called Miscellaneous

3. Find Launching applications and unsafe files and set it to Enable (not secure)

Windows and Internet Explorer will now freak out as if you’ve just agreed to download every virus ever created. Let’s fix that, too.

4. In the system tray (bottom right corner of screen) click on Open the Action Center. There will be a box about security issues and a link about not giving you warnings. Click that link.

5. Now go to Start, Run, and type in gpedit.msc

6. Under the Computer Configuration list, choose the Administrative Templates folder, then Windows Components, and Internet Explorer

7. Search through the list and find Turn off the Security Settings Check. Set that to Enabled.

 

Mac OSX:

I’ve tested this on Snow Leopard, Lion, and Mountain Lion. And it’s super easy. Open Terminal and paste this:

defaults write com.apple.LaunchServices LSQuarantine -bool false

Done. Nice ‘n easy.

 

Let me finish by saying that I understand the theoretical merits of these warnings. And I’m sure they’re useful for some people. What I see happening where I work is a whole bunch of people desensitized to warning messages in general because they’re exposed to so many of them. I myself have reflexively clicked right through several actually important message boxes because I’ve been trained to see any little box in the middle of the screen as a waste of my time. By disabling these file warnings on all of my computers, I hope to un-train myself to think that, and actually pay attention to the ones I still get.


Sometimes, you just wish you could list your WP pages more like posts. I wanted not just a list of them, but with some kind of excerpt. Here’s how I did it:

<?php
$thePages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page' ORDER BY menu_order", 'OBJECT');

if ($thePages) : foreach ($thePages as $pageData) : setup_postdata($pageData);
?>

  <!-- HTML markup goes here -->
  <h3><?php  echo "$pageData->post_title"; ?></h3>
  <p><?php  echo "$pageData->post_content"; ?></p>         
<?php endforeach; endif; ?>

Naturally, this custom loop is showing the whole page content, and not just a traditional excerpt. I wasn’t able to get excerpts to work, but the full content was just fine for what I was working on. It would not be terribly difficult to use the PHP strlen(); function to limit the post content and simulate an excerpt.


Recently, we had some problems setting up some network printers on computers running 64-bit Vista. We could connect to the print server, but making connections to the individual printers gave us this error. Good times.

The workaround was to add the printer manually, as a local printer. To do this: Go to Control Panel > Printers > Add Printer. Then add a new local printer, using a local port. (Not TCP/IP.) For the name, put in the whole path. This will be something like: \\YourPrintServer\ThePrintersName

Now it will ask you about drivers. (Make sure you have downloaded the 64-bit drivers for your printer.) Choose Have Disk…, and browse to where you saved them. With luck, it will now ask you for what you want to call the printer on your local computer, and you’re done!

This fix worked for every computer we ran into this error for. Good luck!


If you’re having troubles with WordPress’s automatic upgrade function (both the WP system and plugins), and your site is hosted by 1and1, try adding this to your .htaccess file (wherever your WP root folder is.)

AddType x-mapp-php5 .php

Worked like a charm for me!

Blog Pages