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.

Monday, August 10, 2009

Some Firefox Add-Ons Cripple Sites

Are some sites (facebook, gmail) VERY slow when you visit them with Firefox? Try disabling some of your add-ons (Tools -> Options -> Manage Add-Ons).

After reading a few posts on other forums, it looked like disabling certain add-ons freed up their Firefox. For me, it was the Skype extension for Firefox. This add-on would put Skype availability icons next to names on web pages it recognized as Skype contacts. As soon as I disabled it, Firefox was back to normal.

Tuesday, June 30, 2009

SQL statement for rankings

Here's another SQL statement I find useful every now and then, and not necessarily intuitive enough to remember. This will return a list of people (for instance), with the people with the most records at the top. Great for rankings, etc.

SELECT person, COUNT(*) AS number_of_records
FROM people
GROUP BY person
ORDER BY number_of_records DESC;

Wednesday, May 20, 2009

Dynamic PDF Writer

This has been around for quite some time, but check out this library for creating dynamic pdf documents on the fly http://www.fpdf.org/ (using PHP). The tutorial section is helpful.

There are tons of add-ons to be found here as well http://www.fpdf.de/downloads/addons/.

Monday, April 6, 2009

Finding Duplicate Records

A very easy way to find duplicate database records:

SELECT Id FROM aTable GROUP BY Id HAVING (COUNT(Id) > 1)

Assuming "Id" is the field for which you want to find duplicates. Found here http://imar.spaanjaars.com/QuickDocID.aspx?QUICKDOC=218.

Tuesday, March 24, 2009

Updating PHP on a Plesk Linux VPS

I was recently trying to take advantage of some date functions available in PHP5. I noticed they were working on my home Linux box, but not my VPS. Sure enough, my VPS was still at PHP4. There's no way to update PHP through the Plesk interface, and after searching around a bit, I found the most strightforward solution here http://pbjots.blogspot.com/2008/03/yum-php-update-to-524-on-plesk.html.

I altered the steps a bit for my particular situation to come up with:

wget -q -O - http://www.atomicorp.com/installers/atomic.sh |sh
yum update php
(when prompted, "Is this OK?", say yes (y) and enter)
(it told me /etc/php.ini created as /etc/php.ini.rpmnew. Fine with me, that's what the next couple lines are for)
cp /etc/php.ini /etc/php.ini.20090320 (make a backup just in case)
mv /etc/php.ini.rpmnew /etc/php.ini
/usr/local/psa/admin/sbin/websrvmng -a
/etc/init.d/httpd reload

All done!

Sunday, February 15, 2009

Comcast Networking, Anyone?

It took me forever to work out my Comcast self-install kit. Connecting a computer directly to the modem, no problem (although watch out for tons of Comcast bloatware that comes with), but working out my network connection took a while. The solution was extremely easy, but to get there, it took reading a post by a very helpful network geek here http://ask.metafilter.com/49038/Unshackle-my-home-network. Check out the post by paulsc. The clincher was to wait for the modem to work out it's global ip (2 min) BEFORE connecting your router. Only then can your router figure out what ip's to divy out. Joy.

Wednesday, February 11, 2009

Javascript "Option" object not fully-functional in IE6

This is related to the previous post. In IE6, the following javascript command doesn't actually select the newly-created option for a drop-down:
myselect.options[myselect.options.length]=new Option("optionvalue", "optiontext", false, true);
Instead, you'll need to specify to select this afterwords using something like:
myselect.options[myselect.options.length]=new Option("optionvalue", "optiontext");
myselect.options[myselect.options.length-1].selected = true;

Internet Explorer 6 on Windows Vista

I've been dealing with a client which, like a lot of corporate America, is still using Windows XP with Internet Explorer 6. This is understandable given how long it takes IT departments to catch up with all the new protocols for a new operating system and browser. However, that means we as developers need to make sure we still test web projects out on IE 6 as well. How do we do that though in Vista?

Microsoft Virtual PC image just for this purpose here http://www.microsoft.com/downloads/details.aspx?familyid=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=en. Just select an IE browser version and download. You'll then need to install MS "Virtual PC" found here http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx. After installing Virtual PC, create a new virtual machine, and select the virtual hard drive you downloaded in the first link.

Sunday, February 8, 2009

SQL Syntax: MySQL vs. Oracle

This may seem obvious to a lot of folks, but I never realized that a lot of syntax I assumed was standard SQL syntax is only specific to MySQL. So I assumed something like "UPDATE table SET field = 'Damian\'s Text' WHERE id = 1;" would work in Oracle, but no such luck. Two single quotes does the escape trick in Oracle rather than a backslash. Not to mention Oracle requires a "COMMIT;" after any insert or update (and maybe other commands).

You can also forget about using LIMIT within your statements in Oracle. Again, this was another function I thought was standard SQL. ROWNUM does a similar thing, but in a more convoluted way.

Bottom line, if you're used to MySQL, you may have to check a bunch of your syntax to see what works with Oracle, and vice versa. There's got to be a page out there that shows syntax differences between these two (and other) database types.

Friday, January 23, 2009

First Post!

This is a blog mostly for web developer geeks like myself. I can't count the number of times I've searched for web programming help and found the answer in a forum or blog. So, in hopes of making solutions to web problems/questions more easily found for others, here's my contribution...

If you notice any dead links, please let me know. And please feel free to contribute as well.