It was the PRAM

Last week I bought another Kingston 96GB SSD drive from Newegg. This was my second SSD from Kingston. I’ve had a great experience with the first one so I figured why not get another, plus the price was good… pretty much $1 per GB.

Anyway, I had a nightmare getting this installed on my new 2011 MBP 15″. First I tried to clone the old HDD with the new SSD using the Acronis utility software that came with my first SSD. That didn’t work because it didn’t recognize the OS X partition. Then I tried to use Disk Utility to do a restore. Found out it won’t work because the original drive is 500GB while the SSD is only 96GB. So I get an error that says it won’t work because there’s not enough room. Then I tried to do a clean install onto the SSD after I installed it on my MBP, I kept getting an error.

It reminds of the errors I’d get using Windows. You know, the short and sweet ones that don’t explain anything.

The next thing I did was I put the SSD into a USB enclosure then plugged it into my iMac. I was able to install Lion 10.7 on there so that tells me the DVD isn’t messed up and the SSD drive is working. With Lion finally installed, I installed the SSD back on my MBP and it ran weird and slow. I tried to do a clean install again, and again the error (There was a problem installing “Mac OS X”. Try reinstalling.).

I finally Googled the error and found people resetting their PRAM (hold Option+Command+P+R while your Mac boots up… let go once it restarts). This fixed the issue and I was able to do a clean install… finally.

I have installed Lion using a DVD and a pen drive. The DVD install took 30-40 minutes while the USB pen drive took 1.5 hours. It’s weird but that’s what I got. Maybe my pen drive sucks. My guess was the USB install would’ve been quicker but I was wrong.

Now my 2nd Gen i7 with 8GB of ram is using SSD (SATA2 – 3Gbps). It’s running great. Once the SATA3 SSDs become more affordable, I may upgrade again.

 

 

 

My new iMac 27″ i7 MC814LL

My work was kind enough to replace my aging 24″ iMac (MA456LL) with a new 27″ iMac (MC814LL). It’s a huge difference, not just screen size but performance as well. I’m coming from a Core 2 Duo processor to Intel’s i7 Quad Core Sandy Bridge. This has Hyper Threading so I get up to 8 threads. It’s very nice and fast. I’ve been able to run multiple Virtualbox VMs without slowing down.

This is the latest version of the Apple iMac line (Spring 2011) and comes with 2 Thunderbolt ports – which I don’t have any compatible devices to play with. The have removed support for Firewire 400 which I thought was not a good move. I still have devices using that port. I can still use it with a Firewire 400 to 800 cable. They should have at least added USB3.0 support but of course Apple doesn’t like using mainstream ports (also no support for eSATA or Bluray). Oh well, that’s Apple for you. I also have to replace my mini DV cable if I want to use a secondary monitor. An SDHC card reader available on the right side. This is a great addition, consider my Macbook Pro 13″ has it, it’s another way to transfer files between devices. It’s also convenient pulling images off my camera if needed.

 

Here’s a screenshot of the About this Mac.

As you can see, it comes with an 8GB ram running at 1333. My desktop at home (PC clone) with the same CPU is running 16GB at 1600MHz. I’m not sure if it will recognize the 1600MHz, but the great thing about my desktop at home is I can overclock the ram and CPU if i choose to – which is one of the limitations of Apple hardware.

Here is a screenshot of the details on the ram. As you can see, there are 4 total slots and can go as high as 16GB.

This iMac comes with an AMD Radeon 6970M 1GB video card. Based on the System Profiler, it’s running on the x16 slot and has a maximum resolution of 2560×1440. As with all iMac design, it isn’t something that can be replaced and upgraded. Notice the “M” on the model number. That stands for Mobile which is the same type of card you’ll find on laptops and is embedded on the motherboard.

The iMac is configured to have a 1TB hard drive. It’s a Western Digital 7200RPM. Based on the model number it’s a Caviar Black with 32MB cache. Not bad at all. The System Profiler also reveals that  the max speed supported is 6Gbps – so it can use SATAIII drives. The drive it currently has is SATAII – 3Gbps.

I don’t know much about the the Thunderbolt ports nor do I have any devices I can plug in it. So I’ll just post the screenshot of its section in the System Profiler.

 

Using Geekbench I got a score of 11809. The free version only runs in 32bit. I’m not sure if there’s a big difference if it’s running in 64bit. You can check the details here… http://browse.geekbench.ca/geekbench2/view/426677. I also ran Geekbench on my old iMac and got a score of 3210. It’s almost 4x faster but keep in mind, it’s a Core 2 Duo with no Hyper Threading and 4GB ram plus it’s slower ram. You can check out the details here… http://browse.geekbench.ca/geekbench2/view/426690.

My new Linksys E2000 Router

I was using an Apple Extreme Base Station for a few years now. It’s the model right before they added the gigabit ethernet support but it does have wireless N. There were several things I hated about this router. The one thing I just can’t stand is it has to reboot every time you make any changes. I’ve owned other routers from Linksys, Netgear, and Belkin prior to this router and they never rebooted nor took a long time to apply changes. I use Mac address filtering so whenever a new device is introduced to the network, I have to make this change. In order to do so, anyone who is connected will be disconnected because it has to reboot.

After doing some research I found the Linksys E2000. It does everything I need it to do. Comparing it to my old Apple router, it has more ethernet ports (4) and supports gigabit speed. It’s fast when you make changes and the Cisco Connect software is compatible with OS X. Another great feature is it has a guest mode where it has a separate connection for guest devices. Guest devices can access the internet but will not have access to your LAN. Great feature, but for now I have it disabled. I still have to check how far that signal reaches. I don’t want anyone camped outside leeching off my internet.

The installation is simple. Only problem I had was with the software trying to connect to the router after I had changed the default settings. Turns out the version of the software was old. Linksys has a support chat system and they were able to direct me to the latest version of the software. After I installed the newer version, I was up and running.

I picked up a factory refurbished version. I figured it’s half the cost and should work as well as a new one. There are certain brands I don’t concern about quality even though it is refurbished, and Linksys is one of them. I’ve always had great experiences with their products. It’s a big savings compared to the $180 I originally paid for the Apple router (never again). A brand new E2000 will run $80 and up.

The only thing I lose from the Apple router is the USB port. Actually I won’t miss it at all. I hardly used it. What you can do with it is attached a USB printer to share or a hard drive. I have 2 wireless printers on the network and a Terrastation NAS box… problem solved!

So far it has been doing its job. The signal seems a bit stronger too and does not interfere with other wireless devices. Here are some pics.

Creating a CakePHP environment using MAMP and OS X

This will show you how to create a CakePHP environment in MAMP on OS X. Here list of softwares used and their version.

  • OS X Leopard or Snow Leopard
  • MAMP version 1.91 (using PHP5.2.x)
  • CakePHP 1.2.8

You shouldn’t have to use MAMP 1.9.1. I have it working on version 1.8.x. You will need to change Apache’s port from 8888 to 80. Make sure there aren’t any other web servers running on the same port. Leave MySQL running on port 8889. We will be creating a /Applications/MAMP/conf/apache/sites file that will store your virtual sites. It isn’t necessary but it’s easier to manage new sites on a separate file. You will need to edit the /Applications/MAMP/conf/apache/httpd.conf file by adding the following lines of code.

# virtual hosts file
Include /Applications/MAMP/conf/apache/sites

This will tell Apache to check the new sites file for additional configurations. So now, whenever you need to add or create a new site, you will edit the sites file and add the following code.

<VirtualHost *:80>
DocumentRoot /Users/username/Sites/projectname
ServerName projectname.local
</VirtualHost>

The value of DocumentRoot can be different. I just chose to put it in that folder. Now you will need to edit your /etc/hosts file by adding the following code.

127.0.0.1          projectname.local

Restart your MAMP server. Now unzip the CakePHP files into the projectname folder. You should now be able to view your new CakePHP site by directing your browser to http://projectname.local. This page will tell you that you need to change the default Security.Salt value. All you need to do is change at least one character and you will meet the requirement. You can also use Terminal to generate your own.

echo -n ‘foobar’ | openssl sha1

This will give you a 40 character string. You can use a mixture of upper and lower case on the letters. Copy and paste this value from Terminal to give a new Security.Salt value.

The next warning is your database. Rename the database file and edit it. Provide your database server information. Because MySQL in MAMP is using port 8889, you will have to edit the array and add the following.

‘port’ => ’8889′

There are notes in this file to help you further with additional array elements.

To use Terminal with the cake command, you will have to edit you ~/.bash_login file and create aliases. Here is the code to add to your .bash_login file.

# php
alias php5=”/Applications/MAMP/bin/php5.2/bin/php”

# cake for this project
alias cake=”php5 /Users/username/Sites/projectname/cake/console/cake.php”

To apply

. ~/.bash_login

You should be able to run

cake help

If you get a permission denied error, give it executable access with this.

chmod +x /Applications/MAMP/bin/php5.2/bin/php

That’s it. You can now start baking in a development environment. I know I have skipped a few steps but I’m assuming you know the basic commands and configurations. If not, please feel free to comment and ask questions. I’m still new with the MVC framework and CakePHP so go easy on questions regarding those. I am learning, slowly… haha!

Deleting ._ files in Windows

At work we use iMacs for workstations but Windows for servers. There are some nuisance when sending files from OS X to Windows. Filename lengths, network connections, hidden files – just to name a few.

In OS X, there are hidden files that start with ._ which become visible when viewed in Windows. It’s usually not a problem. It becomes a problem when you are working with Joomla. If you download and unzip Joomla, then transfer the files to a Windows machine, you will get a ._ for each file and folder. This bad because in the Joomla system, there is an XML file for each components, modules, plugins, themes, etc that describes it. There is also a list of files in that XML file. You will probably get errors in the Joomla admin interface because of those ._ files.

Here’s the command to get rid of them in Windows. Open up your command prompt and enter the following command…

del /A:H /S /Q [location] ._*

The del command means delete. The A switch selects files based on an attribute. The H means hidden attribute. The S switch is used to search subdirectories within the [location]. The Q switch is quite mode and is optional. [location] is obvious so replace this with the path of where you want to do the deleting. Finally, the ._* means files that start with ._ and the * is a wildcard.

Make sure you check to make sure there are no files that begin with ._ that you need.