Skip to content

Archive for

6
Aug

It’s Time for a New Espresso Machine

Since a few years I am trying to replace our Pasquino Espresso machine because from time to time its acting weird and the come is not very consistent. It just might be that the grinder is not up to snuff or that it’s age (12 years) is taking its toll.

Based on my experiences of the past few years I have to admit I underestimated the importance of the grinder. Even though I don’t have a blade or cheap burr grinder mine does not produce the consistent results I need to make consistent espresso. So this time I am going to buy a grinder that fits the espresso machine. After looking around on the internet quite some time I narrowed my search down to the Caedo E37 grinder because it doesn’t have a dossier (less waste), it looks sturdy enough to produce consistent results and it is damn easy to clean so that my espresso doesn’t get bad because of old ground.

For the Espresso machine I am probably going with the Expbar Brutus IV because it looks sturdy and powerful enough for the espresso I desire.

Finally just to point it out I don’t judge the quality of an espresso shot by its crema (foam of the shot) but by its viscosity. An Italian espresso shot has an oil like consistency rather than the water like ones you get at Starbucks. The only place where I get shots like that around my neighborhood is Peet’s Coffee Shop.

– Andy

6
Aug

AgileBits’ KnoX Sucks, Don’t Buy It

A while ago I heard about Know from AgileBits and it seemed to be a good idea where I could encrypt a directory so that it could only be mounted by Knox and one could read it only through Knox. This meant that I could place my sensitive data into that directory and nobody could read them w/o having the password. Because Knox is made by the same company (AgileBits) than 1Password I naturally expected that I could place the password for Knox inside 1Password and I would only need my 1Password master password to open it. Unfortunately AgileBits was unable just to do that. So I paid $35 bucks for nothing. The only place where it would be useful is when I have a directory with sensitive data that is use rarely. If I need to remember the password in order to automatically open the encrypted folder on startup then the idea of Knox is gone.

Now with the Full Disk Encryption of Mac OS X Lion any incentive for AgileBits is gone too making the App obsolete in most cases. The only place where I would to have it is for the rarely used but highly sensitive data like credit reports etc. That said it might be a better solution to use an additional disk (external or internal) and use Full Disk Encryption on it. This way the encryption is tightly integrated into Mac OS X Lion with no fuss. Therefore Knox because the first casualty migrating to Lion. Too bad – too sad. If it weren’t for 1Password I would never use or buy any application from AgileBits.

– Andy

6
Aug

Using Embedded Lion Server PostgreSQL Database

One of the new features of Mac OS X Lion Server is that Apple replaced MySQL with PostgreSQL as internal database server. The drawback is that it is not easy accessible by default. Here I want to show you what to do and how you can manage it.

Attention: if you want to use the PostgreSQL server from EnterpriseDB then I would strongly recommend to make a backup of your server because if it fails the uninstallation might corrupt your embedded PostgreSQL server. Yesterday, August 4th 2011, I installed Enterprise DB’s server and because it did not start I uninstall it but then my embedded server was corrupted as well. Now this might be just an issue with the startup script but nevertheless I lost the DB. It seems that the installation from Enterprise DB is not compatible with Lion and so I wouldn’t use until they provide one that is. Their own recommendation is to use the embedded server instead.

When you installed the Lion Server then you can use ps -ef in order to see if PostgreSQL is running:

bash-3.2# ps -ef | grep post
216   468     1   0  8:33AM ??         0:00.13 /usr/bin/postgres -D /var/pgsql -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t  -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770

You can get some more information about the service with that:

sudo serveradmin list
...
pcastlibrary
postgres
radius
...

and some more details:

sudo serveradmin fullstatus postgres
postgres:dataDirHasBeenInitialized = yes
postgres:PG_VERSION = "9.0.4"
postgres:dataDir = "/var/pgsql"
postgres:postgresIsResponding = yes
postgres:dataDirIsDirectory = yes
postgres:PGserverVersion = 90004
postgres:dataDirExists = yes
postgres:setStateVersion = 1
postgres:state = "RUNNING"

So far so good. Now if we try to connect to the DB using telnet:

telnet localhost 5432

we see that there is no socket listening which means that PGAdmin cannot be used to administer the server nor can it be used by a JDBC driver. If you look above in the process description you will see an option called listen_addresses which is empty. Maybe if we could set our server address there we might be able to connect.

Initially I found the original PostgreSQL server configuration file under /var/pgsql/postgresql.conf but that did not do the trick. Knowing a little bit about Mac internals I started to look for a file inside /System/Library with the name postgres in it. So I found the file: /System/Library/LaunchDaemons/org.postgresql.postgres.plist. This file has an array of properties including the listen addresses:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Disabled</key>
	<true/>
	<key>GroupName</key>
	<string>_postgres</string>
	<key>Label</key>
	<string>org.postgresql.postgres</string>
	<key>OnDemand</key>
	<false/>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/postgres</string>
		<string>-D</string>
		<string>/var/pgsql</string>
		<string>-c</string>
		<string>listen_addresses=</string>
		<string>-c</string>
		<string>log_connections=on</string>
		<string>-c</string>
		<string>log_directory=/Library/Logs</string>
		<string>-c</string>
		<string>log_filename=PostgreSQL.log</string>
		<string>-c</string>
		<string>log_lock_waits=on</string>
		<string>-c</string>
		<string>log_statement=ddl</string>
		<string>-c</string>
		<string>log_line_prefix=%t </string>
		<string>-c</string>
		<string>logging_collector=on</string>
		<string>-c</string>
		<string>unix_socket_directory=/var/pgsql_socket</string>
		<string>-c</string>
		<string>unix_socket_group=_postgres</string>
		<string>-c</string>
		<string>unix_socket_permissions=0770</string>
	</array>
	<key>UserName</key>
	<string>_postgres</string>
</dict>
</plist>

Adding our IP address there:

listen_addresses=127.0.0.1

saving the file and restarting the server:

sudo serveradmin stop postgres
sudo serveradmin start postgres

did the trick. Now I could download and install PGAdmin and connect to the server using the user _postgres and my password (the original administrator):

PGAdmin with Local PostgreSQL.png

Cheers – Andy Schaefer

5
Aug

Missing Spaces in Mac OS X Lion

Since Lion came out I slowly moving over to it and for now my Laptop and my Development box (Mac Pro) are slowly migrating over. I like the full screen mode which I currently use with MarsEdit to write this blog entry. But I definitely miss Spaces. I know they weren’t perfect and sometimes one could loose a pop-up dialog between spaces but it helped a lot to work efficiently. Unfortunately not all Apps are support full screen mode and even the ones that do I cannot directly jump to the desired App. For example I use IntelliJ to develop Java application but that does not support full screen mode. Yes, I could move that to another desktop and blow it up to the maximum size which is similar to what I had before but that still does not solve the issue of the direct jump to my App.

So let’s have a look how this worked in Snow Leopard. I had all my developers on Space 4, my terminal on 5 and email on 6. With a simple ctrl-4 I was on the Space with my developer tools, with ctrl-5 I saw the terminals and when an email arrived ctrl-6 just moved me there. Now these shortcuts are gone. For mouse oriented users that might now be a big deal but for me this is annoying. I want to take my fingers of the keyboard as little as possible. Gestures are great but slow when typing is involved.

Don’t get me wrong, I don’t want Mission Control to go but I want to have a way to define a shortcut that automatically brings me to the full screen view or the desktop where the App is.

But there are other issues with it. For example MarsEdit supports full screen mode (with an annoying different shortcut) but it doesn’t do it well. Now MarsEdit has a Main Window where it displays the registered Blogs and the current posts. This main window does not go in full screen mode. Only the post editor can go in full screen mode. This means that when I select the MarsEdit in the context switch (Command-Tab) it either goes to the post editor or if I am in the desktop that has the main window it brings up the main window. Now I cannot use Command-Esc to go to the post editor but have to use the mouse instead or jump away from the desktop.

– Andy