Blogging with WordPress and TextMate

July 31, 2007

Since I lost a large post last week, I decided to at least use a real editor for my posts. Since TextMate has the lovely blogging bundle as shown by Allan Odgaard in a nifty screencast I gave that a try. However it was not plug and play™ as I hoped.

Here are my experiences:

Read the rest of this entry »

Code snippets in WordPress with TextMate

July 30, 2007

When you want to display code snippets in WordPress you are faced with WordPress going smart on you. Even in [Code] view it will not let you enter code between <code></code> without stripping spaces and what have you. It would be nice if the visual editor did something with code.

There is a WordPress plugin Preserve code formatting However when your blog is hosted by that plugin is of no use.

I’ve heard of people posting code through an image. That seemed a bit bothersome to me. So I played around a bit and the following trick works for me:

Type or copy the code in TextMate and use Create HTML From Selection (With Line Numbers). This will create a completely unreadable (in my eyes) piece of HTML. Paste that (use the code view of WordPress) and voila. Spaces, tabs, <, > are all preserved. As can be seen in the following snippet

    1 <ServiceUsage>
    2     <OperationUsage>
    3         <ServiceName>AmazonS3</ServiceName>
    4         <OperationName>StandardStorage</OperationName>
    5         <UsageType>TimedStorage-ByteHrs</UsageType>
    6         <Resource>476de2a71aa5a476f84d48e4d61c980-default</Resource>
    7         <StartTime>07/01/07 00:00:00</StartTime>
    8         <EndTime>07/02/07 00:00:00</EndTime>
    9         <UsageValue>220303585632</UsageValue>
   10     </OperationUsage>
   11 </ServiceUsage> 

Only the <pre class=”textmate-source”> line will be converted to <pre>. I do not know why. The first “interceptor” you will be able to use for your CSS needs is :<span class=”text text_xml”>

I added the following line to CSS:

.text {
font:1.1em 'Courier New', Courier, Fixed;

Oh and do not use the integrated WordPress editor. That can really hurt if you overwrite your text per accident and the automatic save kicks in 😦

I lost my S3 blog because of that. So first I’m going to experiment with TextMate blogging facilities…

iGTD and OmniFocus again

July 11, 2007

I read in the MacSparky Blog about a nifty Applescript script. It transfers my iGTD stuff to OmniFocus.

It did not transfer everything. It had some issues. However I was able to play a bit with OmniFocus with some real data, which was nice.

Somehow I missed my due dates in the main window. However you can clearly see Merlin Mann’s influence in the un-distract-ifying way of life. It is there, you just have to enable it. If you look at the date in the Action you wonder how to change it. Hovering over it and a small calendar icon appears. Also a project does not seem to have a date. However hovering over it it is there.

But I’m not sure. Un-distract-ifying is all nice and dandy. But do I need it, if I decided to activate my OmniFocus window on my Mac? I already decide to have a look at is. So it may distract me. Actually hiding is more distracting to me. Perhaps I get used to it. For now I’m still leaning towards iGTD.

And OmniFocus needs a QuickSilver plugin. I don’t want another hot key, which does not add anything. I know you can immediately assign a project and context to it, but I don’t want that, since the inbox is fine by me. I can review it later.

to be continued…

Getting Things Done…at last

July 3, 2007

Too many things are asking for attention in my head. When I go to bed my head is still buzzing with things to do or finish, which does not help falling asleep…

In the past I used the Task application on my Palm to scribble things I had to do. However lately I stopped doing that, especially at work, because most of the time I’m behind my MacBook, where I used Stickies. Using Palm Desktop & Palm Hotsync on my old XP box did not help the integrated experience either ….

After reading Merlin Mann’s 43folders about Getting Things Done I decided to investe some time in it.

I bought the audiobook Getting Things Done by Dave Allen and listened to it while driving to work. It sounded sensible, so I decided to see if I could have an integrated experience where stuff is not floating and rotting all over the place. Virtual stickies, real stickies, Task Application, mail, paper, MY HEAD, MY HEAD.

I decided to have a go at GTD. I’m an Omni fanboy, but OmniFocus is not yet released so I used iGTD as a GTD tool. BTW OmniFocus has to be a lot better than iGTD for me to buy it…

iSync, HotSync, BlueTooth

First I installed Palm Desktop on my Mac and configured iSync to synchronize over BlueTooth then enabled Palm OS syncing in iSync. This will install the iSync Conduit in Palm HotSync. With this you cannot only Sync your Palm with your MacBook to the Palm Desktop calendar application, Palm Desktop task application etc. It also syncs with Mac’s iCal and the Mac Adressbook application. Sweet!! So no need to use the Palm Desktop applications anymore (perhaps for installing new Palm applications). Just use iCal and AddressBook. It syncs 2-way. And if you select in iSync “Put events created on Palm into:” to @inbox it will make the integration with iGTD smoother. However to be able to do this iGTD should be installed already.

If I now HotSync my Palm it syncs the Calendar and Tasks with my Mac (over BlueTooth) and vice versa of course. That’s nice.

iCal, iGTD, Mail and MailTags

I installed MailTags to Apple Mail since this will enable the iGTD integration. After enabling the mail integration in iGTD, whenever I receive a mail which needs my attention later I press F6 and it ends up in iGTD (and then iCal and Palm whenever I sync).

When entering a task in iGTD it will be synchronized with iCal and vice versa.

Hitting F6 when in a browser will create a task in iGTD with the current URL.

Hitting Apple-Space to enter QuickSilver, doing the dot maneuver to enter Text Mode. Scribble something, do the TAB and add it to the iGTD inbox.

Perhaps it sounds a bit overwhelming (or not), but it feels very natural once you start using it.

From my Palm, my Apple mail, just free format (QuickSilver or F7 Quick Enter), my browser or iGTD itself: with a few keystrokes I got it stored in iGTD and it syncs across the applications (Palm, iCal and iGTD)

However I set the iGTD syncing to “sync when losing focus” otherwise I would need an extra manual iGTD sync.

In practice

So when:

  • I’m asked to give my Divemaster number and insurance number in the swimming pool, I scribble a task on my Palm…. and forget about it
  • I receive a mail, which I should review later and act upon I press F6 inside Apple Mail…and forget about it.
  • I receive a IM message saying I should look at S3browse. I briefly look at it, decide to give it the attention it needs later, press F6 in my browser….and forget about it.
  • Suddenly think that I should really check the ATG Cactus patch. Hit Apple-Space to select QuickSilver, do some neat key presses and …forget about it…

A simple Sync on my Palm and everything is Synced and I can review it later.

Sweet Mac integration.

Let’s see if I get more things done…. Less insomnia would be nice too.

Parallels 3.0

June 8, 2007

Parallels have just released version 3.0 for Mac OS X

We now have Parallel Tools voor Linux distro’s as well. The mouse now works just as smooth as it did with Windows. Great!

And the Parallels Snapshot manager seems nifty too.


But the fact that SmartSelect feature takes over the file extensions from Mac native MS Office documents to is really dumb. You can reset it in the info panel of Finder of course, but I shouldn’t have to do that, that’s bad practice.

Fedora with Parallels 3.0

Fixing ACC “Preview site using profile” on Mac OS X

April 11, 2007

The Preview Site Using Profile functionality from the ACC does not work out of the box on Mac OS X. This is functionality which is really nice to have so you can preview the JSP page with a specific profile.

Because we are using the Linux installer on Mac OS X, I was unsure how the browser was started when you pressed preview. I did a global grep and noticed the containing the script to start the browser. This contains code to either startup Mozilla or Netscape. This will not work of course. So we need to change this. However before this can be done another step is needed.

Firefox new instance

Starting Firefox from the command line will not work if Firefox is already started. If somebody knows a way to open an already started Firefox with an URL I would really like to know.

Unknown to most people, but you can start Firefox for a second time with another Firefox profile.

To create a Firefox profile I did the folowing:

ls <firefox path>/

./firefox -Profilemanager
And created a new firefox profile. I named mine atg.


Then I altered the and added the following line

/<firefox path>/ -p atg ${1}

And behold: It just works™

MySQL preference pane

April 5, 2007

When using the MySQL preference pane to start and stop MySQL on my Mac, I was not quickly able to find which script was actually run. This was not configurable. Find and grep did not help me.

It seems that the prefpane goes to /usr/local/mysql/support-files/mysql.server and does a start and stop

Since I use a couple of MySQL versions, setting your symbolic link becomes really important.