Archive for December, 2009

Fixing wget file names in bash

I downloaded a bunch of images using wget.

The original file names were the same 6 names from 40 different pages. wget names those like this:
01_resize.jpg
01_resize.jpg.1
01_resize.jpg.2

etc.

The other files were:
02_resize.jpg
03_resize.jpg

etc, up to 6.

Here is what I came up with that gives each file a unique name and a valid extension ( 01_resize.jpg.02 becomes 02_01_resize.jpg ) (you can yell at me for parsing the output of ‘ls’ later)

for i in * ; do
        seq=$(echo $i | cut -d. -f 3)
        fname=$(echo $i | cut -d. -f 1-2)
        mv $i $seq\_$fname
done

Hopefully it’s of some use to someone! I’m basically grabbing the different parts of the filename using cut with a delimiter of ‘.’ ; that’s where the magic is. There’s probably a more efficient way of doing this, but it’s what made sense to my brain after being up for 24 hours.

Spyware removal – Google search redirectors

I recently go some spyware through Google’s Chrome browser. I had disabled AVG 9 in hopes of getting Mass Effect to run longer than 30 minutes without crashing (to no avail).

Anyway, I was doing something on the internet somewhere and I saw the evil AntiVirus2009 window pop up and the icon in my system tray. I knew the next few hours would be packed with fun!

The key, I found, was to completely clear all of the cookies from all of my browsers (FireFox, Internet Explorer, MineField, Opera, Chrome, Chromium, and Iron). This fixed the link redirection issue.

Here are the free projects that let me eventually remove all the crap from Windows XP:
1.) Ultimate Boot CD. I loaded it and ran EZ PC Fix to clear my temp files and recycler. http://www.ubcd4win.com/index.htm
2.) Malware Bytes: http://www.malwarebytes.org/
3.) SpyBot SD: http://www.safer-networking.org/en/index.html
4.) AutoRuns: http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
5.) Hijack This: http://free.antivirus.com/hijackthis/
6.) LSPFix: http://www.cexx.org/lspfix.htm
7.) WinSockXP fix: http://www.snapfiles.com/get/winsockxpfix.html
8.) Fixwareout: Source unknown, can be found at http://ip2k.com/tools
9.) Dial-A-Fix: http://wiki.lunarsoft.net/wiki/Dial-a-fix
10.) Windows Installer CleanUp Utility (to remove broken MSI packages): http://support.microsoft.com/kb/290301

I have the hard-to-find stuff mirrored here ( http://ip2k.com/tools ) so it never gets lost

Update your Motrola Droid to Android 2.0.1

1.) Download the update file from http://ip2k.com/droid_2-0-1.zip
2.) rename the file “update.zip”
3.) Upload the zip file (do NOT extract it, leave it zipped!) to the root of your MicroSD card (not in any folders, just on the root of the card)
4.) You needed to pull the battery in your Droid to get the card out, so replace the card and open the keyboard.
5.) Hold the “x” key on the Droid’s keyboard and power it on. Continue holding “x” until you see a triangle with an exclamation point.
6.) Release the “x” key. Simultaneous press the “volume up” and “camera shutter” buttons. A menu should pop up.
7.) Using the D-Pad, select to update the system software from the update.zip file.
8.) The update will take a few minutes. During this time, do NOT pull the battery or attempt to turn off the phone. Doing so may corrupt the firmware on your device and render it unbootable.
9.) Once the update is complete, select “Reboot system now”. Enjoy!

This was written based on the original article at http://www.phonearena.com/htmls/Want-to-manually-update-your-Motorola-DROIDs-software-Heres-how.-article-comments-a_8232-p_2.html
md5sum of orig file (and my mirror): 3af35446905040a3123ec09195299596