fullybaked | davebaker

I'm a developer living in the UK and when I'm not spending time with my wife and our 2 wonderful little boys, I love hacking around with code

I'm passionate about technology, web development, gaming and fencing

10 April 2015

Using Twig in Yii2

I was recently working on a project where the initial mockups were all built using Twig and a light weight Silex backend, but the actual application was built in Yii2. Rather than rebuild all the UI as Yii2 views, I looked into utilising the Twig elements I already had. It was a lot easier than I hoped/imagined to integrate Twig into Yii2 and I didn't loose out on any of Yii2's powerful view features.

This is a basic introduction into how I got going using Twig in Yii2

26 November 2014

Setting up a local DNS server on OSX

I do a lot of development, and pretty much run everything locally using vagrant. For basic stuff http://localhost:3000 is fine, but what happens when I need lots of subdomains or multiple VM's running... here's my journey to setting up a local DNS server to handle it all.

6 November 2014

Tip: Ruby string interpolation with hashes

I've been doing a lot of data clean up recently and writing quick Ruby tools that parse array's of data hashes to produce SQL statements that can be run on databases. I quite like this version of Ruby's string interpolation so thought I'd share it here in case you've not come across it

11 April 2014

Chroot SSH FTP Users to home directory

Today I had to set up a secure dropbox for some of our customers to deliver files to us via FTP over SSH. This if far more secure that any normal FTP as it takes place over an SSH tunnel. However we didn't want to just dish out SSH user accounts to anyone, so here's how I locked down the server so users could only upload/download files to their home directory

17 February 2014

Connect ActiveRecord via SSH Tunnel

I recently had to write a little Ruby tool to correct some data on an application I've been working on. While I was able to build the tool locally easily enough, the live data resided on a server without Ruby, so I had to connect to the database via an SSH tunnel. Heres how to do it.

18 December 2013

Install Hubot on Centos 6.4 64bit

Hubot from Github is a great tool for both fun and automation. We trialled it along side our HipChat trial by installing it onto a free Heroku instance. To give us more flexibility when we went live we moved it to a Digital Ocean droplet along side our testing environments. Here's how it went

12 December 2013

Sharing data with CakePHP & Rails

During a migration project where a legacy application in CakePHP was being converted into Rails, one of the main issues was supporting the existing database. The similarities on database structure between the two frameworks make this transition relatively painless, but there are a few things to watch out for. In this post I cover the ones I came across.

11 November 2013

Truncating a list of files in CentOS

Just a quick note today, I had to truncate a massive list of log files and here is a quick and dirty way to do it. Typical warnings apply when using commands from the internet. Please know what you're typing into your command line.

5 November 2013

Birth of PHP Dorset User Group

The newly founded PHP Dorset user group had its "0th" meet up on Monday 4th November

1 November 2013

ZSH, Vim, Ruby and rbenv

Getting these to play nice together was proving difficult after my recent upgrade to Mavericks. Luckily I came across the solution via Tim Pope on Github