PHPNews

Make a POST Request from PHP With Guzzle

I work extensively with APIs and a variety of serverside scripting languages, and best practice does change over time. Many of the most popular posts on this blog are 10 years old, because apparently I was interesting in 2008. Two in particular from around that time relate to making POST requests from PHP ... and …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday September 18, 2018


Muffet: quick and easy link checking

In my not-so-new job I work on Nexmo's developer portal and that means a lot of documents, a lot of links, just a lot to keep track of! One thing I worry about is changing something and breaking links from somewhere else, so I wanted to be able to check for existing links, broken links, and to include internal links …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday September 5, 2018


Support for Speakers

I've been a conference speaker for 10 years; I've given many talks, been to many events, organised a few events, and now have Opinions (TM) about conference speaking. This tweet showed up in my feed when someone tweeted at me to thank me for my support in their talks. Advice for conf speakers: When someone you …

Continue reading »

Written by Lorna Jane - - Aggregated on Sunday August 26, 2018


Vim settings for working with YAML

Having managed to avoid YAML until quite recently, my vim installation wasn't well set up at all for working with it. It needs more config settings than plugins, so I thought I'd write down what I found helpful. I'm using it quite a lot now I'm working with OAS (used to be Swagger) API definitions. Let's start with …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday August 15, 2018


Using Config Files with Ngrok

I'm a huge fan of Ngrok , a tool to create a secure tunnel to your laptop. It is brilliant for testing, well, anything running locally really. Someone asked me about my setup recently and I'm using a couple of config files to keep things quick and consistent, so I thought I'd share here what I shared with them. You …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday August 13, 2018


Kitchen Island Project

We built our first "big" project (well, since the play kitchen a few years ago) since moving to this house nearly a year ago: a new kitchen island! I used to blog a lot about the house and crafts and things, then I got better known for code things and got stagefright and stopped ... but I love this stuff and I'll …

Continue reading »

Written by Lorna Jane - - Aggregated on Saturday July 14, 2018


Presenting from PDF

I've been using PDF as a file format for presentations for the last ~8 years and I LOVE it. The clue is in the name: Portable Document Format: it's an open standard, and works everywhere. You can embed your fonts, images, whatever ... if you end up presenting it from another machine for some reason, everything is …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday July 9, 2018


Bind Services to OpenWhisk Packages

When working with serverless actions, often we'll still need to access some sort of service, whether it's object storage, a database, or whatever. Here's a quick overview of how this works for IBM Cloud Functions (plus some gotchas ....) For this example, I'll be connecting my NodeJS example code to a PostgreSQL …

Continue reading »

Written by Lorna Jane - - Aggregated on Thursday May 31, 2018


Relative Links with IBM Cloud API Gateway

I work quite a bit with serverless tech, particularly on IBM Cloud since I work there. At the moment I'm building a microservice using web actions . When a user creates data with a POST request, I want to redirect them to the URL of the new thing they created - but for that I need to know the URL that it was …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday May 22, 2018


React to Database Changes with OpenWhisk Actions

One of the best features of CouchDB is its change feed which allows us to get a feed of the changes happening on our database. It's also possible to have a serverless function (examples are for IBM Cloud Functions but should also work for Apache OpenWhisk ) that fires in response to activity on that change feed. …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday April 23, 2018


Handle Webhooks with Serverless PHP

Did you know you can serverless with PHP? OK, so serverless is clearly not a verb, but since I love serverless tech and have also loved PHP for longer than I'm going to admit (the dates of the earliest posts on this blog might serve as a clue), using these technologies together is definitely my idea of a good time. …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday February 20, 2018


What does a Developer Advocate do?

I'm a Developer Advocate (you might also hear job titles like Developer Relations, Developer Evangelist) and I'm constantly asked what that means. What do I do? The answer is different for every one of these jobs but there are some common themes. After 18 months of practice at answering this question, I think I'm …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday January 30, 2018


Script for Migrating Related Posts in Wordpress

I couldn't find the script I needed to migrate my existing related-post data to a new plugin so I fiddled about and wrote a rather hacky one. I thought I'd share it in case someone else needed it! Time for a new plugin This blog has nearly a thousand posts, and apparently 800+ pieces of related-post data. I find …

Continue reading »

Written by Lorna Jane - - Aggregated on Monday January 29, 2018


Copying CouchDB Data Between Laptops

I'm a regular and happy user of Apache CouchDB , so much so in fact that I'm writing a library to talk to it from PHP. While working on tweaking a feature, I realised that the laptop I use for development didn't have the right/enough data on it to test this particular thing - but that I had a suitable database on …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday January 2, 2018


Slack Enterprise Grid and BotKit

I have the pleasure of using Slack Enterprise Grid on a daily basis as IBM has adopted it internally, I work there, and there are far too many of us to use a single slack instance. The main downside of Slack Enterprise Grid (apart from having about 15 slack organisations running in your client all the time) is that …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday December 6, 2017


Login and Switch Spaces With Bluemix CLI

After answering a bunch of questions about the Bluemix CLI tool for IBM Cloud, I thought I'd share my personal cheatsheet in case it helps anyone looking for examples! Background: This relates to the Bluemix CLI for IBM Cloud (which was once called Bluemix, hence the tool name). IBM Cloud is a pretty powerful …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday November 28, 2017


Testing API calls in PHP with Guzzle Mocks

I'm working on a CouchDB library for PHP, and so I needed to write some tests for it. CouchDB has an HTTP API so I'm basically making web requests and while I could certainly set up a test database and run full-on integration tests, there are a few limitations with that approach. Firstly: it means I'm testing the …

Continue reading »

Written by Lorna Jane - - Aggregated on Tuesday November 21, 2017


Live Demo: Risks and Rewards

I'm not a huge fan of the live demo in conference talks - it's really hard to do well so I see a very large number of bad ones. Also, it's super hard work to include them in my own talks in a meaningful way because they are so difficult to pull off. I could write a very long list of reasons not to ever live demo …

Continue reading »

Written by Lorna Jane - - Aggregated on Friday November 17, 2017


Connecting PHP to MySQL on Bluemix

Most of the PHP I write runs on Bluemix - it's IBM self-service cloud, and since I work there, they pay for my accounts :) There are a bunch of databases you can use there, mostly open source offerings, and of course with PHP I like to use MySQL. Someone asked me for my connection code since it's a bit tricky to …

Continue reading »

Written by Lorna Jane - - Aggregated on Wednesday August 23, 2017