Wednesday, 27. July 12011
p3k dots

Finally, the Media Architecture Compendium (iPad-only) has appeared in the iTunes AppStore! Whoohoo!

Monday, 25. July 12011
p3k dots

“How to work as a Graphic Designer without sleeping with Adobe.”

Open source graphic design.

the color of ...

Monday, 11. July 12011
p3k dots

Burg Wildenstein bei Leibertingen. Kupferstich von Matthäus Merian aus dem Jahr 1643.

Tuesday, 5. July 12011
p3k dots

TLDR: switch off Internet Sharing when running the H2 database server.

Yesterday, I got a strange error when trying to run an instance of the H2 database server:

java.net.ConnectException: Cannot allocate memory
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
	at java.net.Socket.connect(Socket.java:529)
	at org.h2.util.NetUtils.createSocket(NetUtils.java:110)
	at org.h2.util.NetUtils.createSocket(NetUtils.java:91)
	at org.h2.util.NetUtils.createLoopbackSocket(NetUtils.java:49)
	at org.h2.server.web.WebServer.isRunning(WebServer.java:354)
	at org.h2.tools.Server.isRunning(Server.java:415)
	at org.h2.tools.Server.start(Server.java:374)
	at org.h2.tools.Server.runTool(Server.java:215)
	at org.h2.tools.Server.main(Server.java:115)
The Web Console server could not be started. Possible cause: another server is already running at http://192.168.2.1:8082
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Exception opening port "H2 Console Server (http://192.168.2.1:8082)" (port may be in use), cause: "timeout" [90061-157]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
	at org.h2.message.DbException.get(DbException.java:167)
	at org.h2.tools.Server.start(Server.java:377)
	at org.h2.tools.Server.runTool(Server.java:215)
	at org.h2.tools.Server.main(Server.java:115)

Of course, there was and is no other server already running at that port. The “Cannot allocate memory” message was too disturbing, anyway.

I even got the very same error when trying to netcat the port:

$ nc -vz 192.168.2.1 8082 nc: connect to 192.168.2.1 port 8082 (tcp) failed: Cannot allocate memory

Searching for fixes only revealed one resource pointing to a possible fix. Unfortunately, that did not help – and reinstalling OS X was not an option at that point.

Even worse, I got the same pointers when asking for help in the H2 forum.

Almost desperately, I looked at the IP address again and finally noticed that it is not the usual one, only similar.

A look at the Sharing Preferences revealed that I got Internet Sharing running so I disabled it and instantly everything was working again!

(Still, the error message remains a mystery to me, though...)

Monday, 4. July 12011
p3k dots

niklaus zettel aka nick bottom.

Not moore of the same, but different.

Mooer’s Law.

Saturday, 2. July 12011
p3k dots

How to link an iCal event to an arbitrary message in Mail app.

Sometimes I want an iCal event to link to an e-mail message in Mac OS X’s Mail application, but not infrequently the message text does not contain a date for easily creating an iCal event. (You know, when the dashed box appears around a date hovered by the mouse cursor...)

So here is what I do to add a link to such a message, anyway:

  1. First, display the message in Mail.app
  2. Choose the Long Headers command from the View/Message submenu
  3. Search for the Message-Id header, then select and copy its value
  4. Create or edit the desired iCal event
  5. In the url field enter message: followed by the copied Message-Id value
  6. Benefit!

As an example, this is what the Message Id header looks like in Mail.app:

Message-Id: <B00B1E51.9711018@p3k.org>

And this is the text that would be entered in the iCal event’s url field: message:<B00B1E51.9711018@p3k.org>

Sunday, 26. June 12011
p3k dots

How to retrieve an album cover in high resolution via iTunes.

First, locate the desired album in iTunes and copy the iTunes URL with the “Copy Link” command from the context menu – e.g. by right-clicking on the cover image:

Paste and open the URL in your browser – it should look something like this:

itunes.apple.com

Now right-click again on the cover – this time in your browser – and select the “Open Image in New Tab” (or an equivalent) command.

It should take you to a URL like the following, showing the small cover image:

a2.mzstatic.com.170x170-75.jpg

Now change the URL in the address bar where it says “170x170” (bold) to “600x600” and press enter – voilà!

a2.mzstatic.com.600x600-75.jpg

It’s possible that iTunes is providing even bigger resolutions, I just was really lucky because “600x600” was my first second guess.

Update: Of course, the whole process can be cut short with a little help of programming!

Thursday, 23. June 12011
p3k dots

RFC: All URL shorteners should provide a common API for returning the full URL of a shortened one.

Oops, actually they already do: when a shortened URL is requested the URL shorteners send back the redirect location with a 301 status code:

$ curl -I http://t.co/Dxl6g40
HTTP/1.1 301 Moved Permanently
Date: Thu, 23 Jun 2011 12:46:39 GMT
Server: hi
Location: http://duckduckgo.com
Cache-Control: private,max-age=300
Expires: Thu, 23 Jun 2011 12:51:39 GMT
Connection: close
Content-Type: text/html; charset=UTF-8

So what services (ie. everyone but Twitter) could do to get rid of shortened URLs is issue a request and replace the URL with the new location in case the resource has moved.

Of course, this way also URLs which are not shortened but simply have moved somewhere out of various other reasons would get replaced. Still wondering if this was a disadvantage...