Tuesday, January 15, 2013

The server “imap.gmail.com” cannot be contacted on port 993

Apple mail started giving me this error: the server “imap.gmail.com” cannot be contacted on port 993

Fixed it by going into preferences > accounts and chaning imap.gmail.com to imap.googlemail.com

Monday, January 14, 2013

Google Maps with Bootstrap squashes markers

When using Google Maps with the excellent Bootstrap styles the markers on your map will appear squashed or thinner than they should be.  This is because Bootstrap includes a css style that sets all images to 100% max-width.

To fix this add this style:

.myMap img {
    max-width: none !important;
}

Saturday, December 1, 2012

Google Plugin for Eclipse OutOfMemoryError

There is some kind of memory leak in the Google Plugin for Eclipse.  I always use GWT and GAE so not sure what the culprit is but adding this to the launch configuration "VM Arguments" helps:

-XX:MaxPermSize=512m

Thursday, November 22, 2012

Eclipse not prompting to choose workspace

I upgraded to Juno (Eclipse 4.2) and every time I would re-start, the default workspace was opened even though I set it to work from a different location.

I had checked "prompt for workspace on startup" but it had no effect.

The solution was to run eclipse -clean from the command line.  Open the Terminal app and navigate inside the eclipse package contents to where the actual executable is:
cd Eclipse.app/Contents/MacOS/
./eclipse -clean 

 That sorted it!

Thursday, February 16, 2012

Completely delete pending messages from Skype on Mac OSX

When you send messages on Skype they are only delivered when you are both connected to the Skype network.  If you send a message while either you or your friend is offline you see that it is pending and will be delivered next time you both connect.  

If you send a message and then change your mind you can right click on the message and choose to remove it.  You friend will be sent a notification that you removed a message which is a bit annoying because then they will wonder what you are hiding!

To delete messages permanently and without the notification you need to hack Skype's database which uses Sqlite:

First shut down Skype because it locks the database.

in Terminal

> sqlite3 Library/Application\ Support/Skype/YOUR_USER_NAME/main.db
sqlite> select * from messages

Now find the id of the start of your conversation.  The id is the first column in the results.

sqlite> delete from messages where id > 2904;

This will delete all messages after your conversation.  If you want to be more specific then you may be able to delete individual messages.

Wednesday, February 1, 2012

Eclipse on Mac - Delete key not working

On a Mac laptop the delete key is a backwards delete, not a forwards delete, and so it does not work out-of-the-box with Eclipse.  To fix this just go to Preferences > General > Keys and find Delete.  Remove the binding and then select the delete key again from the drop down to the right.  That should do it!

Saturday, September 17, 2011

Google breadcrumbs - itemscope must be first attribute

I want nice breadcrumbs to show on my Google search results as defined here:

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=185417

My web framework must use well formed XML templates so instead of the itemscope attribute (a boolean attribute which is not valid xml) I used itemscope="itemscope"

The handy Rich Snippets Testing Tool showed that my breadcrumbs were not being picked up.  After a frustrating process of elimination I realised that the itemscope attribute must be the first attribute in the element or Google will not recognise it.  Thats not very XML friendly but probably a good performance optimisation.