Gilbert Pellegrom

Gilbert Pellegrom

Software Engineer and Web Developer from Scotland

Path Copy 2 Created with Sketch.

Category: Development

Setting up Xdebug on Homestead 4.0 (PHP 7)

Posted on

As Xdebug has been removed from the default Homestead box you now need to install it manually to be able to use it. Once you have vagrant ssh-ed to your Homestead VM the first thing you need to do it download the latest compatible version of Xdebug (2.4.0RC3 at the time of writing) and build…

Setting up Laravel 5 for Travis CI

Posted on

Continuous integration testing is awesome and if you build software with a team you really should have it up and running. Travis CI is a free (for public repos) service which connects to your GitHub repositories and automatically runs your tests whenever someone pushes to your repo (all configurable of course). This means you can…

WordPress Dependency Management

Posted on

Recently I’ve been thinking a lot about WordPress and Composer (see my recent series on using WordPress with Git & Composer over on Delicious Brains) and how WordPress might implement dependency management at the core level. As more and more plugin developers start making use of Composer to manage their plugin dependencies this is going…

Up and Running with Grunt Part 3: Automating Grunt Tasks

Posted on

In this tutorial we look at automating Grunt tasks (so you don’t have to re-run grunt all the time) using the “watch” task.

Up and Running with Grunt Part 2: Creating a Gruntfile

Posted on

In this tutorial we look at setting up and Gruntfile and installing a SASS package to compile our style.scss file.

Up and Running with Grunt Part 1: Installing Grunt

Posted on

For a while now I’ve been wanting to be better at “sharing everything I know”. I’ve also been wanting to start doing video tutorial series. So today I’m launching the Build The Web YouTube channel (as a partner to the Build The Web Newsletter) which combines these two goals. I decided to start with something…

Testing defines in PHPUnit

Posted on

This one tripped me up recently. Say you are wanting to test a bit of code using PHPunit that relies on a defined constant. You don’t want the define() to affect your other tests, you only want it to apply for this specific test. Something like this: class MyTest extends PHPUnit_Framework_TestCase { public function testExample()…

My Mac OS X Bash Profile

Posted on

For a while now I’ve been beefing up my .bash_profile script with useful aliases. If you don’t know what .bash_profile is then read this great article which explains what it is and contains loads of useful info for getting started. I figured it might be helpful to share my .bash_profile to give others some inspiration, and to get…

Structuring Sass for Web Apps & Larger Projects

Posted on

I’ve been using Sass (specifically Scss) as my preprocesser of choice for some time now and it’s invaluable for taming your CSS when building larger projects (such as web apps). On a smaller project you can get away with maybe a couple of .scss files, however once your codebase grows things can get messy fast. But…

PHP concepts to learn before diving into Laravel 5

Posted on

Laravel is an awesome framework for PHP and I have been using the upcoming version 5 (currently in alpha) for some time now. Being a big, powerful framework Laravel has always suffered from a steep learning curve, and the update from 4 to 5 is no different. So to help remedy the steep climb that…