A while ago I got a new macbook, and installed firefox again. But I quickly ran into the issue where if you press escape, it closes the fullscreen. Which to me is an insane default, as I might press escape to try and close a modal for example.
Sep 4, 2024
Learn how to enable mysql query log, and where to find the results
Sep 4, 2024
This week I noticed a test was flaky, and was occasionally failing in CI. So I wanted to re-run my script until it failed. I had no clue how to do this, so after a bit of trying, I got the following script. This keeps running vendor/bin/phpunit until it fails. You can save it as run.sh and then just run sh ./run.sh in your terminal, and it will keep running.
Aug 5, 2024
This week I wanted to change all the .js files to .ts recursively in a folder. To change all .js files in the assets folder. With a bit of bash, using a for loop and mv I got the following command to rename all my .js to .ts files.
Aug 5, 2024
Get a rough idea of how many rows your table has, without using count, and doing a full table scan.
Jul 3, 2024
Learn how to back up files (and set them back) with a simple bash function, and do so right from the CLI
Jul 3, 2024
Use splice, toSpliced or filter to remove elements from an array.
Jun 20, 2024
Use 'includes', 'find' or 'some' to check if an array contains an element
Jun 20, 2024
Set a step to allow failure or even a single part of the script
Jun 20, 2024
Learn the difference between for .. in and for .. of in javascript, and make better loops.
Jun 9, 2024