How To Clean The Wii’s Laser Without Opening It Up

First I should say this. If you do this method and it ends up ruining your Wii, I have no responsibility whatsoever so proceed with caution at your own risk.

That said, here is the super easy, mind blowing method I used. I unplugged my Wii, held the CD port up to my mouth like a harmonica, and I blew hard and fast. Try not to get any spit in there when you do it. When I plugged it back in it worked great ... for now.

This isn't a fix-it-for-good method. It's more of a get-it-working-now method. Plus it reminds me of the good old days of pulling out the NES cartridges and blowing them out. Good luck and let me know if it works for you!

Tagged as , , ,
Posted in Nintendo Wii


Google Drive Loves Open Source

I just got the new Google Drive up and running on my computer(s) and when I was checking out all the different features I found the below image on the About link. Gotta love Google for giving credit where credit is due. Google loves open source and they have been a major contributor and supporter of it since the start. It goes to show that you don't have to lock down your stuff to be very successful.

Google Drive

Tagged as , , , , ,
Posted in Google


Perl in_array

PHP has a great function called in_array that allows you to test a value against an array to see if the value is in the array, returning TRUE or FALSE depending. I've now had to come up with this same thing in Perl a couple of times so I figured I would share. I can't remember where I found help or I'd reference them. But here you go. I've included both a syntax highlighted screenshot and the plain text to copy and paste.



my @states = ('California', 'Nevada', 'Texas', 'Utah');
my $findme = 'Utah';

if (in_array($findme, \@states)) {
  print "Found it!";
} else {
  print "Not found.";
}

sub in_array {
  my ($item, $array) = @_;
  my %hash = map { $_ => 1 } @$array;
  if ($hash{$item}) { return 1; } else { return 0; }
}

Tagged as , , , ,
Posted in Perl Programming


FIND and CHMOD Together

Getting directory and file permissions just right on Linux can be tricky because directories compared to files have different settings. This makes it so that a general, recursive chmod command will not work. This is where the power of using both 'find' and 'chmod' together comes in handy.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;


The above two commands do the following:

1. Search in the current directory represented by the dot.
find .

2. Look for the files or directories, respectively.
-type f
-type d

3. They execute the chmod command when they find it.
-exec chmod 644 {} \;
-exec chmod 755 {} \;

That's a really simplified example, but hopefully it helps out.

Tagged as , , , ,
Posted in Linux Command Line