Blog


  1. Including Code Samples With rst2pdf


    Every document I create these days is written in rst (ReStructuredText) and transformed into something useful using rst2pdf. This includes worksheets, reports, handouts and slide decks. Along the way I've learned a few tricks, and I try to write them down so I can look up how to do something. If this helps you too, then great :)

    Read more

  2. Compiling PHP Extensions


    There are lots of reasons why you might like to compile your own PHP extensions. For me those reasons are usually:

    • The extension isn't available on pecl (e.g. uprofiler)

    • The extension is on pecl, but you need the newest version or a branch with a particular feature or fix in it, perhaps for testing

    • You are fixing an extension yourself (yay, we need more people like you!)

    Related: If you followed my previous post on compiling PHP, be aware that in the ``php/bin/`` folder there is a pecl binary that will install extensions correctly for whichever version of PHP it belongs to, so you may not need to read the rest of this post. However if you do, the paths follow on from the examples in that post.

    I haven't seen a really approachable guide anywhere, we tend to speak of extensions in hushed tones, and actually it isn't particularly tricky so here is my quick how-to guide.

    Read more

  3. Running Multiple Versions of PHP


    When I advise people about upgrading their PHP version, I say things like "just run your test suite with the new version" "just grab the new version and try your site with the built-in webserver". A couple of people recently have asked for more detail on how to actually achieve these things so here's a quick primer on getting new PHP without touching anything to do with your existing PHP installation.

    Read more

  4. Adding Npm to a PHP Travis Project


    Like most PHP developers, I'm polyglot. My PHP project builds with phing, but uses a bunch of npm tools along the way to minify assets and those types of things. When I introduced TravisCI into my project, I was instantly confused by the requirement to specify the technology I was using ... all of them, surely?

    In need of wisdom and advice, I turned to the best source I know:

    How do people use @travisci with multiple languages? Project uses PHP and nodejs tools but I can't seem to configure both. Any links/advice?

    —Lorna Mitchell (@lornajane) May 7, 2014

    Read more

  5. New PHP Videos on OReilly.com


    I am delighted to announce that I have new video titles available! I'm delighted for two reasons: selfishly, because these things take a lot of prep and I am pleased they are done; but also because I think it is very good news that a key industry player such as O'Reilly recognises PHP's place in the world and works hard to publish new content in this area.

    There are two videos available: PHP Web Servicesimage1 and Intermediate PHPimage2 (subtitle: a bunch of things Lorna thinks will make developers' lives and applications better!), you can click through (disclaimer: affiliate links!) to get more information and a detailed chapter outline for each course. I hope that either or both of them will be useful to you.

    Read more

  6. My ffmpeg Cookbook


    I have been doing more screencasting lately, so I thought I'd share some recipes here, for my own future use and in case anyone else wants to use them. I capture my videos using Kazam on Ubuntu, usually by resizing my second monitor to 800x600 and then capturing that. Kinda eye-bleeding to record but looks good in playback and also works well either in tiny web view or on a big screen. I also screencapture my android device and for that I use Screen Recorder.

    Edit: I mostly used OBS for video from around 2019.

    Read more

  7. Using Phing with Travis CI


    We've started using Travis CI on one of my projects to run some build processes to check that everything looks good before we merge/deploy code. One thing I ran into quite quickly was that I wanted to install phing in order to use the build scripts we already have …

    Read more

  8. Quickly add Amazon Cloudfront as a CDN


    Right now I'm working on an application which is experiencing lots of interest - and therefore lots of load! We needed to look at ways of trying to bring down the pressure on the servers, and decided to use a CDN (Content Delivery Network) for our image files. It was surprisingly painless to implement once I got into it so here it is in case it's helpful.

    Read more

  9. View Only Headers with Curl


    When working with curl, it can give lots of excellent and detailed information, but sometimes it is too much! Today I'm fiddling with the caching headers on a client's application, so I'm only interested in seeing the headers and not the body of the response. Making a HEAD request changes …

    Read more

  10. Video: Git Remotes and Tracking Branches


    Here's a little demo video that I put together to explain pushing/pulling with multiple remotes and how tracking branches make this easier. It's one of the chapters from my "Git Adventures" talk, but it didn't make it in to the talk in Amsterdam last week since we chose a …

    Read more

  11. Understanding Tracking Branches in Git


    Here's a topic that took me a while to understand in git, and now (I think!) I do, I thought I'd write it all down while I can remember!

    Some branches in git (such as your origin/master branch) will usually track the remote branch that they are related to. But what if you want to create a relationship between local and remote branches? Or stop them from tracking? Here's some pointers

    Read more

  12. Running Pull Request Builds with Jenkins


    The joind.in projects are set up so that the build process runs on pull requests when they are opened, which is great! It means that contributors don't have to wait for one of the maintainers to look at it, only to reject the contribution on something that could be picked up automatically. I've had a few questions about the setup so I thought I'd share how it works.

    Read more

20 of 92