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

mailhub=smtp.gmail.com:587

rewriteDomain=domain.tld

hostname=server.domain.tld

FromLineOverride=YES

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

UseTLS=YES UseSTARTTLS=YES ```

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

or

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.

Machines

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

Puppet service config for ejabberd

Posted: 2013-12-13 | puppet | ejabberd

I have an issue getting a working puppet service config for ejabberd on debian.

The init.d script supports the following options:

~~~ shell Usage: /etc/init.d/ejabberd {start|stop|restart|force-reload|live} ~~~

So - it has restart but not status. That means setting hasstatus to false and giving it a status command.

OK - let's fall back to a ps based status - we want to look for the ejabberd process (beam).

~~~ shell ps -ef | grep beam ~~~

We're not interested in the grep processes

~~~ shell...

Read full article