This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).

Latest Entries

Credit cards
Credit cards photo by NY - http://nyphotographic.com/

Fed up with searching for documentation of test payment cards for specific payment gateways the other day I decided to start compiling a cheatsheet of them. It can be frustrating trying to figure out what card numbers can be used for testing especially considering the many poorly documented payment gateways out there. So I created the Test Payment Cards cheatsheet repository.

The TinyMCE link dialog.

If you’re using the link plugin for TinyMCE to add links to content and want to get rid of the target attribute options then the trick is to set target_list to false in the editor’s configuration.

I recently found myself needing to change the user-group for file permissions depending on the connection being deployed to via Rocketeer. Rather than completely override the permissions callback defined in remote.php for the specific context I wanted to be able to define the user-group as a configuration option that could be overridden contextually. It turns out this is pretty simple to achieve.

Featured Entries

A Beginners Guide to Package Manager Bower and Using Gulp to Manage Components

Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.

Calculate a Person's Age in PHP (Accounting for Leap Years)

I've seen a lot of code out there for calculating a person's age that makes the mistake of ignore leap years. If you ignore leap years then the age will be out by a day or more on or around the person's birthday which isn't what you want.

Latest Tweets

Follow Me