·

Webdevelopment

Making the internet a more beautiful place day by day since 2006.

Regexes for quickly mocking stuff

This is a small collection of regular expressions to find pieces of code and replace them with PHPUnit mocks. It’s useful for copy/pasting existing pieces of code (a constructor signature for example) and transforming them into usefull code for mocking in PHPUnit, without having to type everything out. Disclaimer: some small code formatting might be read further ...

Tiny Deploy : a tiny tool for deploying your project

Want to deploy your website (or any given project that needs to be on server X)? Want to perform some tasks before or after the transfer? Want to exclude some files as well? Meet Tiny Deploy: A small shell script I wrote to do just that! Grab it while it’s hot!read further ...

A small SCSS function to help you with your colors

When I am templating a website, I use colors. A lot of those colors have different shades. For example, the color red can also come in dark- or in light red. Usually I solved this by creating different variables like this: Later on, I changed to sass maps and a corresponding function: Today I read further ...

Faster SCSS authoring by moving from LiveReload to BrowserSync!

So I’ve been using LiveReload for a while now in my projects, but recently a colleague showed me another nifty tool: BrowserSync. And I have to say: today my workflow and productivity increased. A lot.read further ...

Floating point numbers in PHP and your system locale

So the other day I had a strange issue with a certain part on a Magento webshop that I was working on: The checkout wasn’t working. It turned out that there was a parsing error in the JavaScript that stopped the execution of the rest of the script: Needless to say, in the snippet above it’s clear what’s read further ...

How my online identity got stolen

I’ve been blogging for a while now, so sometimes I get questions in my mailbox from people looking for some help. I never mind helping someone, and if the question is good, I even write an article about it. So when I got an e-mail a couple of weeks ago of someone looking for some help, I wasn’t read further ...

Quick Tip : Correctly set the headers of your maintenance page

When you’re deploying updates or migrating entire sites, you probably used a maintenance screen before: a simple screen telling the visitor that there is some major stuff going on on the server and that the site will be back online in a few moments. It’s important that you don’t lose any precious SEO-value of your read further ...

How to write unit tests for your websites’ JavaScript with Mocha

As some of you might know, I’ve already written a lot of posts about unit testing in PHP. But what about your JavaScript? That might require testing too. Especially when it comes to critical functions that involve complex operations. One road you could take to do this is use a headless browser and a testing read further ...

How to install PHP Mess Detector for PhpStorm on OSX

Recently I’ve been upgrading the way I write code. I’ve been programming for a while now, but there’s always room for improvement. Lucky for us developers, there are numerous tools for us we can use to aid us in our development. Things like unit testing and coding standards are great of course. But there’s also read further ...

1 2 3 6