OSX QuickLook any plain text file with any extension

Posted by Matt Bryson on 11-Sep-2015 10:40:50

OSX quick look is great, but it only supports a limited number of text files.

Read More

Topics: OSX

Vagrant up on existing server can not connect to mongo db : { [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }

Posted by Matt Bryson on 26-Aug-2015 16:37:33

We often get an issue with our MEAN vagrant dev environments where a previously working server will fail to connect to the mongo db the next time a developer does vagrant up

Read More

Topics: MongoDB, Linux, Vagrant, Bash

Support for Korean / Chinese / Japanese characters in PhantomJS

Posted by Matt Bryson on 22-Jun-2015 12:52:26

We use PhantomJS to auto generate images of user generated content. All was fine, until we entered the Asian markets.
It was not the usual black squares issue that you can get with Phantom, it just had spaces where the Korean characters should have been.

The font itself was loading fine, as Latin characters were in the correct type face.

After following lots of posts about installing font support packs on linux, and non of them working, I finally got it running on Centos with groupinstall for yum

sudo yum groupinstall "Korean Support" "Chinese Support" "Japanese Support"
Read More

Topics: PhantomJS, AWS, yum, CentOS, EB (Elastic Beanstalk), Linux

How to move the iTerm2 terminal cursor word by word

Posted by Matt Bryson on 14-Jun-2015 22:37:12

Out the box iTerm2 and oh-my-zsh make using the terminal a whole lot easier, but there is one thing that has always annoyed me - not being to move the cursor to the prev / next words whilst entering long commands, until now...

Read More

Topics: Terminal, oh-my-zsh, iTerm2

CSS failing to apply from S3 hosted files (uploaded with transmit)

Posted by Matt Bryson on 26-May-2015 12:14:33

Had a very odd issue with CSS files being loaded, but the css not being applied (and any @imports not loading either).

Read More

Topics: CSS, AWS, S3

How to get Git SHA in an Elastic Beanstalk App (and set other dynamic env vars at deployment)

Posted by Matt Bryson on 18-May-2015 08:57:28

As part of our deployment process, we include the short git SHA as a build number against our SemVer version number.

We wanted this available in our application UI to help identify running versions. Easy I thought, Beanstalk sets this as the Version Label when deploying, so we should be able to access that from the environment vars in PHP.

Unfortunately not, this is one of the many EB values you cant easily get to. After a lot of failed attempts, here is how we managed it as a one-liner in the .ebextensions

Read More

Topics: PHP, EC2, AWS, Deployment, EB (Elastic Beanstalk), Apache

Compiling phantomJS 2.0 for AWS EC2 linux image

Posted by Matt Bryson on 17-Apr-2015 11:30:08

Back in Feb I wrote about how to compile phantomJS 2.0.0 for linux, using centOS as the build machine. However, the resulting bin files are not portable across all linux distros, hence why the official binaries aren't out yet.

If you need to run phantomJS on one of the AWS machine images, here is how we compiled it on AWS.

Read More

Topics: PhantomJS, EC2, AWS, CentOS, Linux, Bash

boot2docker error : index.docker.io/v1/repositories/ dial tcp: lookup index.docker.io no answer from server

Posted by Matt Bryson on 17-Mar-2015 11:14:00

Had this little annoying error with docker the other day.

Read More

Topics: Deployment, Docker

Compiling phantomJs 2.0 binaries on Linux

Posted by Matt Bryson on 08-Feb-2015 16:56:26

We were upgrading our automated screen shot process of our core product, moving it over to phantomJS 2.0 as it uses a much newer QT WebKit engine, that produces far more accurate results.

However, there is currently no download for the linux build, so we decided to build it ourselves. After quite a few failed attempts, (using various bash scripts and trying the deploy vm that is in the repo), this is how we finally got it working If you want to cut to the chase, you can grab the 64bit bin file here...

Read More

Topics: PhantomJS, Linux

Enable fast user switching in chrome

Posted by Matt Bryson on 22-Jan-2015 13:39:00

The new updates to chrome have added a nicer looking user / avatar menu, but have added a few more clicks when changing user profiles.

If like us you use this to manage different profiles, rather than users - such as work, home, or even profiles per project, then it becomes very cumbersome having to make these extra clicks.

However, you can enable this...

Read More

Topics: Chrome