Thursday, September 6, 2012

Windows "Could not find this item" Error

I had an issue where something in the Windows file system got corrupt and I couldn't delete a certain folder.  The error I got was "Could not find this item".  I tried a lot of things like renaming, moving, etc., but nothing worked.  This finally did it:

1. Open up a command prompt and go to the parent directory of the problematic directory.
2. Run Dir /x and make a note of the 8.3 format version of the folder name.  It may be shortened, with a ~ in it.
3. Run Ren <8.3 folder name> <some arbitrary new name> to rename the folder.
4. Run Del <some arbitrary new name> or just delete the renamed folder in Windows Explorer.

Friday, August 31, 2012

Updating MAC Address After Cloning VirtualBox VM

If you want to clone a VM in VirtualBox, and want to have both VM's network-accessible, you have to select "Reinitialize the MAC address of all network cards" when creating the clone.  However, when starting your new clone, the network will try to use the old MAC address, so you'll have no connectivity.

[Note the below steps pertain to CentOS 6.2]

As root:
# vi /etc/udev/rules.d/70-persistent-net.rules
Get rid of the first line, which references eth0.  For the second line, change eth1 to eth0.  Make a note of the MAC address in this line (ATTR{address}). Save.

# vi /etc/sysconfig/network-scripts/ifcfg-Auto_eth0
Update HWADDR to be the new MAC address you made a note of in the previous step.  Save.

# service network restart

You should have connectivity now.

Taken from here http://zscribble.wordpress.com/2011/11/07/clone-a-virtual-machine-in-virtualbox/


Wednesday, January 5, 2011

CakePHP Console on Windows

Here's a nice little tip for using CakePHP's console in Windows.

1. Open System Properties by right_click on My Computer icon, select Properties. Or, you press Win + Break.
2. In the System Properties dialog box, select the Advanced tab and click Environment Variables.
3. In System Variables, find the Path variable, highlight it and click Edit .
4. You need to add the following two paths in the Variable value category: (make sure you separate entries with a semicolon.)
+ Path to the directory containing php.exe file. For example C:\xampp\php
+ Path to the CakePHP console directory. For example: C:\xampp htdocs\CakePHP\cake\console
5. You click OK three times to confirm the changes and reboot.
After reboot, you can use CakePHP console. Experiment by:
+ Click Start> Run> cmd [enter].
+ Type cake [enter]
You will see the Cake console Welcome screen appears.
Cake console installation is complete, congratulations!

Taken from http://forum.wareseeker.com/how-to-install-cake-in-windows-xp-t57404.html, with edits.

Thursday, November 11, 2010

Cross-Platform CSS Fonts

Here's an excellent resource for choosing font families that will work across all major platforms http://my.opera.com/area42/blog/css-font-matching-windows-mac-and-linux.

Deleting Duplicate Records

Similar to this post http://damianfiles.blogspot.com/2009/04/finding-duplicate-records.html, the below SQL will delete any records that have 'dupField' in common. It will keep the record that has the lowest 'uniqueField' value.

delete T1
from MyTable T1, MyTable T2
where T1.dupField = T2.dupField
and T1.uniqueField > T2.uniqueField

Found here http://www.cryer.co.uk/brian/sql/sql_delete_duplicates.htm.

Wednesday, November 11, 2009

Triple boot, OSX86/Linux/Windows. Finally!

Well, I finally managed to do it. An OSX86/Linux/Windows triple boot. The OSX86 part was a huge pain in the %$#$ for me, mainly because of SATA/OSX compatibility issues. (I can't set "IDE" for my ACPI settings on my particular MoBo.) But I finally managed to insert my SATA device ID into AppleVIAATA.kext, and now have an up-and-running SATA-only triple-boot system.

Photo log follows...

Partitioning my hard drive. I used GParted for this:
The OSX86 fat32 will be eventually formatted as HFS+ when you install OSX86, erase the partition, and format. Partition 6 is for disk sharing.

Windows Server 2008 installation:
By the way, Windows Server is expensive as *&^% and should be purchased as a last resort. Or if you have a paying client who requires it :)

OSX86 installation:

I have to say, I love Leopards installation video. Very diplomatic. Again, OSX is quite pricey, but it's a decent product, so get yourself a license.

(GRUB) Boot loader installation:

This is what you'll use when you start up to decide which OS to boot. Very important to configure correctly. Part of CentOS installation.

Linux (CentOS) installation:
I installed CentOS, simply because it's the same OS my collocated remote host uses. And it's very stable. Based on Fedora (or is it Red Hat), it's a very server-friendly OS that doesn't need to be updated often. Thought I'd give it a go.

Finally, at boot:
This is where you choose your OS. Enjoy :)

Tuesday, August 18, 2009

Latest PC build

Sharing some pics of my latest PC build. Like Xmas, it was. Tons of fun to build, and a treat to work with.

Starting off with the mainboard, processor and stock cpu fan.


This is the case with power supply and a system fan installed.


Everything installed and wired. cpu, cpu fan, mainboard, 3 system fans, hard drive, DVD, video card, 3 sticks of RAM, and what have you.


Xmas lights. All up and running.