Wipe a fusion drive

Posted: 2015-01-01 | osx | fusion | diskutil | mac


So - my iMac was misbehaving recently and diskutil stated that the disk needed repair.

This is not usually so big an issue - boot to recovery - start diskutil and repair.

However - this time it stated that it couldn't repair the disk even from a recovery boot.


Since this has been upgraded a couple of times - I thought I'd make a nice clean start. Created a complete running backup on a USB disk with SuperDuper, create a bootable USB disk with Diskmaker X (yes - I know you can do it by hand but this makes it a lot simpler) and then wipe the disk completely.

So - backup made - boot to USB disk. Start disk utility - and get the message that it can't partition the fusion disk (create a new clean partition).

What to do?

Googling led me to the following info. It appears that a fusion drive is based on the concepts of a logical volume system similar to lvm - but managed with diskutil.

Read full article

Replace ssmtp with postfix null client

Posted: 2014-10-21 | mail | gmail | ssmtp | postfix

I've been using ssmtp to provide outgoing mail to two machines. This provides a simple way to send mail out using gmail without having to have a running mail server. It had the restriction that you had to log in to gmail to use it.

Recently for one of those machines this stopped working with a login failure. The same configuration worked on different machines as long as the machine's IP address was different. This suggests that it is in fact being blocked and could be due to sending more than...

Read full article

sSMTP and Gmail - authentication suddenly failing

Posted: 2014-09-30 | mail | gmail | google | smtp | ssmtp

I've been running sSMTP as my mailer daemon for a long time using my google apps domain as mail server.

The config for this was pretty simple - /etc/ssmtp/ssmtp.conf:

``` root=me@my.domain.tld





AuthUser=notifications@domain.tld AuthPass=users-gmail-password AuthMethod=LOGIN


This has been working fine.

Recently I noticed mail was not getting through. I now...

Read full article

Chrome - prevent custom print dialog on OSX

Posted: 2014-07-27 | chrome | mac | osx

I dislike Chrome's custom print dialog - I always end up clicking the use system print dialog button.

This kills Chrome's custom print dialog

defaults write com.google.Chrome DisablePrintPreview -boolean true

I'm guessing (haven't tried) that you can reset with one of

defaults write com.google.Chrome DisablePrintPreview -boolean false


defaults delete com.google.Chrome DisablePrintPreview
Read full article

Adobe - unable to open raw files

Posted: 2014-06-23 | adobe | lightroom | photoshop | bridge

Some chat with @AdobeCare - see this update to the post. Still not solved though

This is an issue I've been having since my previous iMac and Lightroom4/Photoshop CS5.

Photoshop simply can't open raw files.


I've had this on my old iMac with Lightroom 4 and Photoshop CS5.

I currently have this on my current iMac with Lightroom 4 and Lightroom 5 with Photoshop CS6, Photoshop CC and now Photoshop CC 2014.

I also have it on my macbook pro with Lightroom 5, Photoshop CC and Photoshop...

Read full article

Puppet 3.6.1 - deprecation: environments

Posted: 2014-05-26 | puppet | debian

This weekend I updated puppet (master and agent) from 3.6.0 to 3.6.1 (this is on debian using the apt.puppetlabs.com repository).

This filled my logs with the following error:

puppet-master[26558]: no 'environments' in {:current_environment=>*root*, :root_environment=>*root*} at top of [[0, nil, nil]]

So - something in a point release broke.

Some digging leads to directory environments. Here we can learn that directory environments:

  • override config file environments
  • can be enabled in some...
Read full article

Postgresql sort 'WHERE id IN' by original id list order

Posted: 2014-05-02 | postgresql | rails

I've been testing elasticsearch in a rails project recently - and stumbled on an issue with sorting.

You see - elasticsearch returns the search results either sorted by score or by the sort order you ask for. Then you need to convert the search results to records - so a simple

~~~ ruby ModelType.where(id: ids) ~~~

However - on postgresql - this returns the records in database order (seems to be insert order).

You could try sorting post fetch:

~~~ ruby index = ModelType.where(id: ids).toa...

Read full article

Site specific chrome launcher's on OSX

Posted: 2014-04-02 | chrome | osx

I was looking for a chrome based site specific browser (SSB) for mac. This is similar to http://fluidapp.com/ but chrome based.

I ended up using the shell script makeapp.sh - I used the version from this gist - which I've also linked locally: makeapp.sh

You simply run the script - give it a name (no spaces), a URL and an icon and it will create an app in /Applications.

It seems to create a profile per app too - so I can e.g. have two different yammer app's that login to different accounts....

Read full article

Setting system path for command line on Mac OSX

Posted: 2014-01-28 | mac | osx | homebrew

There's plenty of information out there on how to set up the PATH variable for your local shell for OSX - it uses the same method as people are used to on linux - settings in your shell config files.

But what if you want/need to set the paths at the system level? How is that handled?

Well - to start with - let's take a look in /etc/profile. Here you can see that it's calling /usr/libexec/path_helper.

More information on that can be found on the path_helper manpage

So - paths are being read...

Read full article

Deploy from github to heroku via travis-ci

Posted: 2014-01-20 | maven | java | travis-ci | heroku | continuous integration | continuous deployment | github

A small test of using travis-ci to build a github project and auto deploy it to heroku.

Step 1 - A webapp

Create your webapp. For this I created a simple hello world webapp (1 jsp) with a dummy test (just to give travis-ci something to do).

Commit on github for this step

Step 2 - CI

Let's add that to travis.

  • Head to Travis and log in with github oauth.
  • Click on your logged in account name and choose Accounts
  • Hit the sync now button if the last sync isn't recent enough
  • Find your project...
Read full article