-
General plugins I use in Neovim
I define a “general plugin” as a plugin that I use regardless of the filetype I’m editing. These will add extra functionality for enhancing my Neovim experience. I use Which-key for displaying keybindings as I type them. For example if I press my <leader> key and wait a few milliseconds, it will display all keybindings…
-
Passive plugins I use in Neovim
These plugins I use in Neovim are ones I consider “passive”. That is, they just sit there doing their thing in the background to enhance my development experience. Generally they wont offer extra keybindings or commands I will use day to day. You can view all the plugins I use in my plugins.lua file in…
-
How I use Neovim
I try to use Neovim for as much development-related work as possible. This page serves as a point of reference for me, and other people interested, for what I use and how I use it. Feedback is welcome and would love to know how you use Neovim too! My complete Neovim configuration files can be…
-
Inventory app — saving inventory items.
This is the absolute bare bones minimum implementation for my inventory keeping: saving items to my inventory list. Super simple, but meant only as an example of how I’d work when working on an API. Here are the changes made to my Inventory Manager. Those changes include the test and logic for the initial index…
🏷️ PHP
-
Connecting to a VPN in Arch Linux with nmcli
nmcli is the command line tool for interacting with NetworkManager. For work I sometimes need to connect to a vpn using an .ovpn (openvpn) file. This method should work for other vpn types (I’ve only used openvpn) Installing the tools All three of the required programs are available via the official Arch repositories. Importing the…
-
Installing and setting up github cli
What is the github cli The Github CLI tool is the official Github terminal tool for interacting with your github account, as well as any open source projects hosted on Github. I’ve only just begun looking into it but am already trying to make it part of my personal development flow. Installation You can see…
-
Adding Laravel Jetstream to a fresh Laravel project
I only have this post here as there was a couple of extra steps I made after regular installation, which I wanted to keep a note of. Here are the changes made to my Inventory Manager. Follow the Jetstream Installation guide Firstly I just follow the official installation guide. When it came to running the…
-
How I organize my Neovim configuration
The entry point for my Neovim Configuration is the init.lua file. Init.lua My entrypoint file simply requires three other files: The user.plugins file is where I’m using Packer to require plugins for my configuration. I will be writing other posts around some of the plugins I use soon. The user.options file is where I set…
-
Starting a new Laravel 9 project
Whenever I start a new Laravel project, whether that’s a little side-project idea or just having a play, I try to follow the same process. I recently read Steve’s post here on starting your first Laravel 9 Application, so thought I would write down my own setup. Whereas Steve’s guide walks you through the beginnings…
-
Given, When, Then — how I approach Test-driven development in Laravel
Laravel is an incredible PHP framework and the best starting point for pretty much any web-based application (if writing it in PHP, that is). Along with it’s many amazing features, comes a beautiful framework from which to test what you are building. For the longest time I cowered at the idea of writing automated tests…
-
PHP Psalm warning for RouteServiceProvider configureRateLimiting method
When running psalm in a Laravel project, I get the following error by default: This is the default implementation for configureRateLimiting in the RouteServiceProvider class in Laravel: I change it to the following to get psalm to pass (I’ve added named parameters and the static keyword before the callback function):
🏷️ PHP
-
Sprinklings of Docker for local development
When I search for docker-related topics online, it almost seems to me that there are two trains of thought for the most part: I believe either of these is a valid approach — whatever feels right to you. Of course it does also depend on how your company / team works. But I’d like to…
🏷️ Docker
-
PHP’s __call magic method and named arguments
Whilst working on a little library recently, I discovered some interesting behavior with PHP’s __call magic method. Specifically around using named arguments in methods that are caught by the __call method. Given the following class: Calling a non-existing method without named parameters would result in the arguments being given to __call as an indexed array:…
🏷️ PHP
-
What is the PHP __call magic method?
Consider this PHP class: We could call the bar method as follows: However, in PHP, we have the ability to call methods that don’t actually exist on a class. They can instead be caught by a “magic method” named __call, which you can define on your class. So if you instantiated the BazClass above and…
🏷️ PHP
-
Preview Laravel’s migrations with the pretend flag
Here is the command to preview your Laravel migrations without running them: Laravel’s migrations give us the power to easily version control our database schema creations and updates. In a recent task at work, I needed to find out why a particular migration was failing. This is when I discovered the simple but super-useful flag…
-
Giving a flatpak program access to home directory on Linux
List out all of your installed Flatpaks and copy the “Application ID” for the Flatpak you want to give home directory access to. Let’s assume we want to give the program “Insomnia” access to our home directory when it is used. The second column is the Application ID. The application ID for Insomnia is rest.insomnia.Insomnia.…
🏷️ Linux