Skip to content

Instantly share code, notes, and snippets.

View ttomdewit's full-sized avatar

Tom de Wit ttomdewit

View GitHub Profile
@Ocramius
Ocramius / handling-optional-input-fields-with-type-safe-abstractions.md
Last active January 22, 2025 09:32
Handling optional input parameters in PHP with `vimeo/psalm` and `azjezz/psl`

Handling optional input parameters in PHP with vimeo/psalm and azjezz/psl

I had an interesting use-case with a customer for which I provide consulting services: they needed multiple fields to be marked as "optional".

Example: updating a user

We will take a CRUD-ish example, for the sake of simplicity.

For example, in the following scenario, does a null $description mean "remove the description",

@thealanberman
thealanberman / mac_recommendations.md
Last active May 25, 2025 16:18
My Mac Recommendations

macOS Recommendations

General Utilities

  • Raycast — Spotlight replacement, somewhat like Alfred, but free and more customizable
  • AltTab — an improved window switcher with some decent customizability
  • Rectangle — a free option for window snapping/arrangement stuff.
  • Shifty — a macOS "night shift" slider
  • Better Touch Tool — not free, but worth every penny. Pretty awesome window snapping/arrangement capabilties (like Rectangle) but MOAR), and lets you create shortcuts for keyboard/mouse/touchpad/touchbar/etc.
  • Keka — compression utility that handles 7zip, rar, and some other archive formats that don't work natively in macOS.
  • NameChanger — batch file-renamer with a handy intuitive UI
---
stages:
- testing
- qa
phpstan:
image:
name: hyperized/phpstan:latest
entrypoint: [""]
stage: testing