Tag Archives: mac

IE Test VM’s for Virtual Box

Always a useful resource.

There is a list of VM’s with several versions of IE’s if you are under OSX (might work with Linux as well – haven’t tested).

Very useful if you, for some strange reason, IE doesn’t work with your Javascript, CSS, design, etc.



Speed up your MAC boot

This is a quick translation from a full post that was done in pt-br – http://br-mac.org/2012/08/acelere-o-boot-do-mac-com-3-dicas-simples

These are 3 quick tips so you can improve your boot speed on your MAC:

1. Remove any external drives that you have (usb and flash drives) – They take a while to load up
2. Check your startup load items on System Preferences -> Accounts -> Login Items: remove all of the ones that you really don’t need to start right away (like Skype)
3. On System Preferences -> Appearance Change -> Number of recent items: remove all or diminish as much as you can on these. The speed of the boot can slow down with larger numbers and specifically after a crash (or battery dying).

Aside of these tips, aslo consider:

1. Max RAM
2. Use a SSD (it can improve up to 30 secs on boot time)

This should take care of most of your speed issues with a MAC

Steve Jobs

I have to confess that I have been reluctant in writing about Steve Jobs. He have just passed away and how could I write about a man with so great brilliance and that brought to the tech world the innovation word.

For many he was more than an idol, for me he was the inventor of WAD (works as designed). Even knowing that this little flaw on the launch of iPhone 4 was probably a heavy weight for such a perfectionism man, it showed that he had at least some humor within.

Today’s morning the world knew that a the former CEO of Apple has passed away; Today’s morning I learned that I would not be able anymore to see one of the persons that I have looked for giving a speech on a tech conference.

Today we have lost not only a man, but also a bit of creativity, perfectionism and innovation. Hopefully the space that now has been created can be filled by more creativity, perfectionism and innovation.

Farewell Steve Jobs.

Mac OSX Installer Crash

Looks like some developers forgot to attend the math class:


Error aside, this was generated because the cable that communicates with the HD was messed-up. Still pretty funny to see the installer counting negative numbers. That is something that I have never seen a windows installer do.

Macbook Pro wont power-up troubleshooting

So you were working with your almost brand new Macbook Pro and suddenly you see the battery getting lower and lower and the charger not charging it. It is not the end of the world, but is an annoying situation to go through.

I have learned some things today, after my charger went sky high, and I’m sharing here all the info learned.


  • Battery wont charge
  • Light on the charger is off

Possible issues:

  • Battery is bad
  • Charger is bad
  • Motherboard is dead

Troubleshooting (do this before you run out of battery):

  1. Try changing to another plug
  2. Try changing the extension cord to the normal plug or vice-versa
  3. If both above didn’t work (don’t be surprised), follow the next steps
  4. Go to the Apple Menu and hit about this Mac
    1. Take note of the version
    2. Click on the version label; it will show the macbook serial number: take note
  5. Shut down the Mac (power off)
  6. After it is powered off, hold left control + left shift + left option
  7. When the 3 keys above are pressed down, hold the power button for 1 second (it will not power on the Mac – it is supposed to be like this)
  8. Release all and Power on the Mac
  9. Time to check if it is the battery
    1. Go to the Apple Menu and About this Mac
    2. Click on More Options
    3. Locate the power option and check for:
      1. Full charge capacity
      2. Cycle count
      3. Condition

Take note on the 3 last items. If the condition is normal and the Full Charge Capacity is high, this means that the battery is ok, so the problem is really the charger (good news, worst case scenario, cheap fix).

Handling things with Apple goes from one to one, but in my case calling Apple Support and confirming all of this above got me a free brand new charger (newer model too).

Just a note for all folks out there that, like me, don’t have a Apple Care and the Warranty is about to expire: get one! It is cheaper than getting some new parts.

Note: If your Macbook Pro get’s to 180F -> it is normal. Your Mac will shut down whenever the temperature get’s too hot. Meanwhile you can get a cooler or burn your leg 🙂

Hackbook Pro

Weekend Fun 😉

Solved: Apache Config and VHosts on Mac OSX 10.5

Mac is a great resource and it already comes with it’s own Apache and PHP installation inside. In the last 24 hours I have been on a fight with Apache on Mac to get it correctly configured so I have came with some highlights that will be useful to all.

  1. Download TextWrangler – It will allow you to see hidden folders and files (open hidden) making the changes on the httpd.conf and vhosts.conf much more easier
  2. All Apache config files are under /private/etc/apache2 unless you have compiled your own version of Apache and in that case you should run a command “which httpd” to show you some clues
  3. The Applications/Utilities/Console is your friend. It will surely help identifying why Apache is not working.
  4. Use the System Preferences / Sharing / Web Sharing to start and stop Apache server.
  5. By default Apache httpd.conf on Mac has everything set to “Deny from all” (line 177 about) so set it to “Allow from all” and the permissions issues should get set
  6. Make sure that :staff is the group set with read and write permissions to the Sites folder or the folder where the document root for your site is set (you can do this with getInfo on finder)
  7. Use Apache Error log as much as you can to get things set and as a note I haven’t been able to set a custom error log for my sites, so this was one of the things breaking my configs.

Next steps, getting PHP set. Will be more posts.

Have fun.

My 1st impressions of a MAC

I have been always working with Windows and recently I have changed to Linux so it would be possible to boost my Desktop performance without much investment.

Working with Xubuntu for the past months has been wonderful, but now a major performance was need for necessary work. Talking with colleagues and friends, I have choosen a MacBook Pro, a extremly light weight notebook with a lot of power for the size.

Going to the Apple Store was fun. I had come to a store employee and told him that I needed a MacBook Pro that could hold a couple of Virtual Machines running at time and one of them was Linux. He got spooked, but actually helped a ton on choosing the correct one.

Easy setup, beautiful opening and yes, it is impressive. The first steps where easy, installing Skype, MSN Messenger Live, configuring email, installing the Eclipse PDT, VPN and installing VirtualBox, my main reason for using a Mac. I got pretty part of the setup of my environment done until I got stuck into some small problems.

Getting Apache working, configuring the httpd.conf and setting up some other development stuff. It took time, but most is done, now is just fine tunning.

There are some tricks that are usefull on a Mac and those I have learned today. Don’t get me wrong, I’m a confessed newbie on Mac’s, even knowing that I have already used Linux for a long time (believe me, it’s very similar, including commands, but is not the same).

The best trick: Use sudo nano to edit files that you wouldn’t normally do with a text editor because you don’t have permissions or the system don’t have permissions to it.

A very useful trick: Hit command + space to open the Spotlight. A mix of finder with run that allows you to execute command that is being searched and open documents.

There is much to learn with a Mac. Feels like that I’m on a Linux that was transformed into a “good guy” that can play cool games. Well, maybe we can change it back to a “bad boy” (Linux) and still play cool games 😉

So far, working with it has been wonderful, let’s see how it goes when I push it to the limit…

Context menu disable with JQuery

I have found a ton of tutorials teaching how to disable the context menu on browsers and in all of them I have found one flaw:

Does not work with Opera

It’s an anoying situation that got me thinking and searching for a solution through most part of the day and with no luck.

The function is simple:

$(document).bind(“contextmenu”, function(e)
return false;

and it works with (tested):

and it does not work with (tested)

After a lot of research I have found why it does not work with Opera:

Opera (9.5) has an option to allow scripts to detect right-clicks, but it is disabled by default. Furthermore, Opera still doesn’t allow JavaScript to disable the browser’s default context menu which causes a usability conflict.

You can try to disable by disabling the mousedown event filtering only for Opera, but I do suggest a lot testing on this.

To complete just an extra note: this function does not bind the documents inside an iframe, so in this case you should complete the function by disabling the context menu in the iframe document as well.

Multi-plataform development notes

If you have a Windows box to develop web applications and then, for production and quality, uses Unix / Linux box you should know that there are some little things that you should take care of. No need to mention the fact that on Unix / Linux everything is case sensitive and on not on Windows (even knowing that Apache threats everything as case sensitive on Windows) is the number one thing that can break if you are migrating from Windows to Unix / Linux, but there are some functions that might work differently and break if you don’t take a more chirurgical look.

For a smart and small example take a look on the mkdir function from php. All you need to do is enter the path, writing mode (chmode) and if is recursive. On a Windows box if you enter something like mkdir($path,’0777’,true) or mkdir($path,0700,true) it will create the folders in the path but will as well set them as writable, even if you said not to, but on Unix and Linux that would not work.

Take a look on the first function, mkdir ( $path , ‘0777’ , true );

If you set your script to create the folder path like this in a UNIX box, it will be created, but the permissions will be wrong. The second argument for the function is an integer and not a string, therefore the permissions would not be created correctly and if you tried to upload a file to the directory, it would fail on permission denied. On a Windows box this is totally bypassed.

Another thing to consider is the way that Windows creates the path. If you use something like c:\path\to\root it will fail on a UNIX or Linux box. To avoid this you need simply change the back slash for the forward slash (c:/path/to/root). This will work on both platforms’.

Small cares like this can make your life way easier while developing in PHP.

Have fun.

%d bloggers like this: