Myself in 1991, with a bit of 92 and 93. Soundtrack from 1994.
Hamilton, Burlington, Oakville, Guelph, Kenogami (Timiskaming).
L’ Ordre secret
Tous les frères ont un esprit identique.
Sa force réside dans son ensemble.
La doctrine du sacrifice personnel.
Aimer son peuple d’un amour véritable,
l’aimer objectivement sans intérêt personnel,
sans aveuglement, est une voie raisonnée et pratique.
Nous travaillons pour la cause,
pas pour les éloges.
Nous cherchons une action efficace.
La fraternité chez nous est une force unifiante et non assimilatrice.
Elle ne tue pas la personnalité mais seulement l’individualisme.
Cherche le bien général.
The Kenny G of PHP
Nickname idea: The Kenny G of PHP
Free as in beer idea: The FAANG acronym could use another A for Automattic: FAAANG!
Or maybe: FWAANG! for WordPress? Sounds less predatorial.
Shie Kasai
Shie Kasai has launched a new blog!
I’m a fan! (and her husband)
The blog used to run on sux0r, software I wrote and hosted myself, but it was getting too old and becoming difficult to maintain. Archived it. Now she’s on WordPress.
Razer Keyboard and macOS
I bought myself a Razer Cynosa V2 keyboard. At work I use macOS. Here’s how I tweaked it to make it usable.
Step 1
System Preferences, Keyboard, Modifier Keys…
Swap: Option & Command.
Step 2
This GitHub project: https://github.com/1kc/razer-macos
Le chat
I’m sharing this animation my 12 year old made for her big elementary school graduation ceremony. I am very proud of her. (In Québec, highschool starts in grade 7. Bonne chance pour la prochaine étape!)
Install Upgraded GNU Bash on a Macbook Pro
When you get a new Macbook Pro with M1 chip you get an old version of Bash.
Bash isn’t old. It’s still being maintained. It has millions of Linux and Windows users. Here’s how to put the newest version of Bash back inside your MacOS box.
Prerequisite: Install Homebrew. (Install iTerm2 for good measure.)
Install Bash and the bare minimum of things things you would expect it to have:
brew install bash bash-completion lesspipe
Verify that it’s installed:
which -a bash
Add it to your /etc/shells
file:
sudo nano /etc/shells
Change your default shell to the new Bash:
chsh -s /opt/homebrew/bin/bash
Create a .profile
and .bashrc
that resembles what you would see in Ubuntu 22.04’s /etc/skel
folder:
From here, create your .bash_aliases
and make all the other adjustments you’ve been doing since 1989… Bash not dead!
A Book of Generative Poetry
reiterations is an electronic-book containing 24 sonnets. Depending on the e-book reader that is used, each time reiterations is opened, or each time a page in the book is turned, a JavaScript software integrated into the book recomposes the book’s 24 sonnets. In this way, the book automatically generates a new and unique reading experience with each reading. Each time the poems are generated the previous versions are lost and cannot be retrieved. The number of unique sonnets produced by the software is inhumanly vast.
(I have a software credit on this project.)
Ubuntu 22.04 LTS Inside Windows 11
Running Ubuntu 22.04 LTS on Windows 11 is a breeze.
First, install Windows Terminal and Ubuntu from the Microsoft store. Next, in Ubuntu, setup your .bash_aliases
hacks and sudo apt installs. Finally, windows_98_tada.wav
If you’re like me, a developer who wants Ubuntu not Windows to be the main environment when working, create a /etc/wsl.conf
file with:
[automount] options = "metadata,umask=022,fmask=111,case=off"
This makes file permissions in /mnt/c
behave like how you would expect in Linux. More info.
After this change all files in /mnt/c/Program Files/
and /mnt/c/Program Files (x86)/
requires the WSL terminal to be started as administrator to be able to modify permissions (aka chmod +x
) and it is not currently possible to change permissions in /mnt/c/Windows/
To make Git in Windows more compatible with your workflow (not Git in Ubuntu leave it alone) add this to your .gitconfig
[core] autocrlf = false fileMode = false
More in depth info available here.
PHP and Go, Together at Last!
This blog post is about Spiral Framework and Roadrunner Server. I’ll briefly talk about what they are, then show how to compile a custom Roadrunner server, start developing with Spiral, using Docker.
Explain Like I’m 5 PHP Developers
Roadrunner works by creating a HTTP server with Golang’s excellent net/http package, and using Goridge as a bridge to pass PSR7 Request and Responses between PHP and Go. The PHP application is then a long-running, already bootstrapped PSR7-capable application that received the already parsed PSR7 request, dispatches it, and collects the response to give back into Go. [1]
Roadrunner offloads unnecessary operations from PHP to a more optimized server, and effectively swaps out the classic setup of Nginx+FPM with a PHP/Golang application that boosts flexibility and performance. [2]
Roadrunner can serve static files without the presence of Nginx, therefore, simplifying the creation of Docker containers. [3]
You can extend your PHP application by including Go libraries, [4], writing Go HTTP middleware, [5], or tweaking and extending the Roadrunner server. [6]
Spiral is a PHP Framework with a customized Roadrunner server. The main difference is that, when you use Spiral’s version of Roadrunner, it comes with more out-of-the-box solutions for PHP developers, Ie.
- Spiral: spiral/framework/blob/master/main.go
- Roadrunner: spiral/roadrunner/blob/master/cmd/rr/main.go
It’s possible to download the server pre-compiled, but that takes away our power of writing Go code. In this tutorial we start from scratch.
Let’s Go!
The instructions are for Mac, and assume you already have Docker Desktop installed, but the same concepts should work for Linux, and probably Windows.
Step 1
Create a directory for your project.
(If you want, replace hello-spiral with some other name.)
mkdir ~/hello-spiral
Step 2
Create a subdirectory called ./server/ and copy these files into it:
- https://github.com/spiral/framework/blob/master/main.go
- https://github.com/spiral/framework/blob/master/go.mod
Example:
cd ~/hello-spiral mkdir server cd server wget https://raw.githubusercontent.com/spiral/framework/master/main.go wget https://raw.githubusercontent.com/spiral/framework/master/go.mod
Step 3
Download this Dockerfile into the root dir of ~/hello-spiral
The first stage compiles the app server, the second stage installs the Spiral skeleton app.
Step 4
Your file tree should look like this:
Build a new Docker image:
cd ~/hello-spiral docker build -t hello-spiral .
Step 5
Run the new Docker image:
docker run -it -p 8080:8080 -p 2112:2112 hello-spiral
Step 6
Go to http://localhost:8080 and verify that it works.
Tada! It runs, but how do we develop?
Step 7
Let’s copy all the PHP files that were successfully installed in the container to our host, then mount them.
While the container is still running from Step 5, in another shell, do:
cd ~/hello-spiral docker ps
This command will output your container ID:
Use your ID in the next command (replace 1f057ae4e473 with your own id):
docker cp 1f057ae4e473:/var/www/app/. src
In the shell tab that is still running the server, stop the server (ctrl-c), then restart with a slight variation of the command from Step 5:
docker run -it -p 8080:8080 -p 2112:2112 -v "$(pwd)"/src:/var/www/app:cached hello-spiral
Keep Going!
Your local PHP files are now mounted in ~/hello-spiral/src, start developing! Change your Dockerfile:
# Setup Spiral # RUN composer create-project spiral/app . --no-scripts # Or comment above, uncomment below, and copy Spiral COPY ./src/ .
If you make changes in ~/hello-spiral/server, rebuild!