Image for post
Image for post

Take two things that we love: WhatsApp messages and Laravel framework. Mix them together. What do you get? Fun with phones!

This tutorial shows you how to create a Laravel application that sends and responds to WhatsApp messages.

You will need:

  • A PHP development platform (Laravel 8 requires PHP 7.3 or later)
  • WhatsApp on your phone

Vonage API Account

To complete this tutorial, you will need a Vonage API account. If you don’t have one already, you can sign up today and start building with free credit.

Once you have an account, you can find your API Key and API Secret at the top of the Vonage API Dashboard. …


Image for post
Image for post

I haven’t used a pointing device in over a decade, and I get a lot of questions about how I navigate the web using only the keyboard. The short answer is: Vimium and funnily enough, it’s a productivity tool rather than an accessibility tool. Curious? Let me show you around!

Vimium is available as a plugin/extension for both Chrome and Firefox. Basically, you install it, and then press f.


Image for post
Image for post

I work a lot with JSON APIs in my Go projects, so almost every struct has some field tags on it to translate AccountID into account_id and that sort of thing. Then one day I needed to load data from config using mapstructure and it took a few attempts with the search engine to find the syntax I needed, so it's here for next time I need it (or in case you need it too).

Combining JSON and Mapstructure

An example truly is worth a thousand words! (This one is from the code that drives the [neopixel shelf](https://lornajane.net/posts/2020/neopixel-shelf)):

type LEDColour struct {
Red uint8 `mapstructure:"red" json:"red"`
Green uint8 `mapstructure:"green" json:"green"`
Blue uint8 `mapstructure:"blue" json:"blue"`
White uint8 `mapstructure:"white" json:"white"`…

Image for post
Image for post

’Tis the season of many pull requests, so today I thought I’d share a tip for avoiding common pull request mistakes that arise from having an out of date master branch.
Becoming a repeat contributor of a project is one of the best things that can happen to anyone taking part in Hacktoberfest — but there are some things to look out for when you’re making a pull request that isn’t the first on a freshly forked repo. Today I’ll share my tips for making sure that every pull request is as good as the first one!

Vonage is thrilled to be a Hacktoberfest 2020 partner. We’re no strangers to open source, with our libraries, code snippets, and demos all on GitHub. To fully immerse yourself in the festivities, be sure to check out our Hacktoberfest page for details on all that we have planned! …


Image for post
Image for post
ESP8266 and a Neopixel strip

I’ve been using a microchip on my neopixel shelf project but I kind of set it up, changed one thing, and didn’t look at it again until this week. I’d like to have my neopixels do something more interesting than one solid colour or another, so I needed to remind myself of what this thing is and how I do it. These are my notes, for my Ubuntu platform, but you’re more than welcome to them!

Start with Firmware

The first thing you need is some firmware to base things on. I used a NodeMCU build; there are a few ways to obtain one of these but I used the charming donation-driven site https://nodemcu-build.com. You pick your options, supply an email address, and wait. The link to your custom build will show up in a few minutes. The chip doesn’t have a lot of resources, so the custom build means you can pick and choose what to include. …


Image for post
Image for post

Having API descriptions in your workflow is a game-changer, but how do you get from nothing to a functioning spec in the first place? I recently made a very simple spec for a very simple API, and thought it might make a good example for anyone looking to create a spec for the first time. OpenAPI specs are very verbose so this very tiny API makes quite a manageable example!

For the impatient: if you just want to look at an example without any additional context, there’s a spec here https://github.com/lornajane/flask-planets-and-webhooks/blob/master/openapi.yaml

About the API

I’ve been using a very trivial API example project in a few of my recent talks on API-adjacent topics, with just a couple of endpoints. There’s a blog post about the Planets API but in short you can get a list of either one planet or many, with requests…


I’m using Postman more lately and showing off the Environments feature really often. I really like this feature for giving easy ways to handle values I use frequently, but it seems to be a bit of a hidden gem, so I thought I’d write about when I find it useful, in case you do too!

Environments are essentially a collection of variables. Most of mine contain:
* API credentials, either a token or a username/password
* Base URLs so I can change which platform I’m targetting

The controls for Environments are in the top left, no down a little, that’s it! …


Image for post
Image for post
image credit: https://www.flickr.com/photos/joerg73/6341065175/

As a Developer Advocate for an API company, I spend a lot of time talking about APIs and webhooks and HTTP in general. Recently I’ve been focussing on HTTP tools, but I really wanted a very simple example API that I could use that would return JSON but really let me focus on the tools, not the API. So I created a “Planets and Webhooks” API with a couple of GET endpoints to return JSON data, and another endpoint to receive and log incoming webhook data.

Planets Flask App

The project is on GitHub: https://github.com/lornajane/flask-planets-and-webhooks so you can also grab it yourself to use when testing out any of the HTTP tools or getting to know webhooks that I covered in my talk (this probably makes more sense if you’ve seen one of my HTTP talks/streams, but hopefully still can be useful by itself). …


Webcam’s eye view, showing top of laptop, pinboard and shelf behind desk
Webcam’s eye view, showing top of laptop, pinboard and shelf behind desk

In these days of video calling in place of any other social contact, I’ve seen a lot of excellent video backgrounds. Perhaps I’m old-fashioned but I went the traditional route, and set up my computer close to a wall (so you can’t see the mess in the room) and added a nice pinboard behind me. I looked a bit flat against the wall though, so I did what anyone else would do … and built a handmade wooden shelf with neopixels in it!

According to Instagram, I published pictures there in April, but I realised when streaming (about controlling my LEDs while streaming, obviously!) that I had never written the blog post about this project. …

About

Lorna Mitchell

Polyglot programmer, technology addict, open source fanatic and incurable blogger (see http://lornajane.net)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store