Skip to content

Instantly share code, notes, and snippets.

View michaelbutler's full-sized avatar
💥
Reticulating splines...

Michael Butler michaelbutler

💥
Reticulating splines...
View GitHub Profile
@michaelbutler
michaelbutler / php_confusables.php
Created December 15, 2021 22:05
Handle confusable strings in PHP
<?php
$confusables = [
'a' => '(@|⍺|a|𝐚|𝑎|𝒂|𝒶|𝓪|𝔞|𝕒|𝖆|𝖺|𝗮|𝘢|𝙖|𝚊|ɑ|α|𝛂|𝛼|𝜶|𝝰|𝞪|а|A|𝐀|𝐴|𝑨|𝒜|𝓐|𝔄|𝔸|𝕬|𝖠|𝗔|𝘈|𝘼|𝙰|Α|𝚨|𝛢|𝜜|𝝖|𝞐|А|Ꭺ|ᗅ|ꓮ|𖽀|𐊠)',
'b' => '(𝐛|𝑏|𝒃|𝒷|𝓫|𝔟|𝕓|𝖇|𝖻|𝗯|𝘣|𝙗|𝚋|Ƅ|Ь|Ꮟ|ᑲ|ᖯ|B|ℬ|𝐁|𝐵|𝑩|𝓑|𝔅|𝔹|𝕭|𝖡|𝗕|𝘉|𝘽|𝙱|Ꞵ|Β|𝚩|𝛣|𝜝|𝝗|𝞑|В|Ᏼ|ᗷ|ꓐ|𐊂|𐊡|𐌁)',
'c' => '(c|ⅽ|𝐜|𝑐|𝒄|𝒸|𝓬|𝔠|𝕔|𝖈|𝖼|𝗰|𝘤|𝙘|𝚌|ᴄ|ϲ|ⲥ|с|ꮯ|𐐽|🝌|𑣲|𑣩|C|Ⅽ|ℂ|ℭ|𝐂|𝐶|𝑪|𝒞|𝓒|𝕮|𝖢|𝗖|𝘊|𝘾|𝙲|Ϲ|Ⲥ|С|Ꮯ|ꓚ|𐊢|𐌂|𐐕|𐔜)',
'd' => '(ⅾ|ⅆ|𝐝|𝑑|𝒅|𝒹|𝓭|𝔡|𝕕|𝖉|𝖽|𝗱|𝘥|𝙙|𝚍|ԁ|Ꮷ|ᑯ|ꓒ|Ⅾ|ⅅ|𝐃|𝐷|𝑫|𝒟|𝓓|𝔇|𝔻|𝕯|𝖣|𝗗|𝘋|𝘿|𝙳|Ꭰ|ᗞ|ᗪ|ꓓ)',
'e' => '(℮|e|ℯ|ⅇ|𝐞|𝑒|𝒆|𝓮|𝔢|𝕖|𝖊|𝖾|𝗲|𝘦|𝙚|𝚎|ꬲ|е|ҽ|⋿|E|ℰ|𝐄|𝐸|𝑬|𝓔|𝔈|𝔼|𝕰|𝖤|𝗘|𝘌|𝙀|𝙴|Ε|𝚬|𝛦|𝜠|𝝚|𝞔|Е|ⴹ|Ꭼ|ꓰ|𑢦|𑢮|𐊆)',
'f' => '(𝐟|𝑓|𝒇|𝒻|𝓯|𝔣|𝕗|𝖋|𝖿|𝗳|𝘧|𝙛|𝚏|ꬵ|ꞙ|ſ|ẝ|ք|𝈓|ℱ|𝐅|𝐹|𝑭|𝓕|𝔉|𝔽|𝕱|𝖥|𝗙|𝘍|𝙁|𝙵|Ꞙ|Ϝ|𝟊|ᖴ|ꓝ|𑣂|𑢢|𐊇|𐊥|𐔥)',
'g' => '(g|ℊ|𝐠|𝑔|𝒈|𝓰|𝔤|𝕘|𝖌|𝗀|𝗴|𝘨|𝙜|𝚐|ɡ|ᶃ|ƍ|ց|𝐆|𝐺|𝑮|𝒢|𝓖|𝔊|𝔾|𝕲|𝖦|𝗚|𝘎|𝙂|𝙶|Ԍ|Ꮐ|Ᏻ|ꓖ)',
@michaelbutler
michaelbutler / Install_PHP_on_Arch_Manjaro.md
Last active July 19, 2024 07:28
Install multiple PHP versions on Arch / Manjaro Linux

Install Any PHP on Arch / Manjaro

Through the AUR it is possible to install older and newer PHP versions, simultaneously on the same system. I often had trouble installing using pacman and pamac so here's what I did:

mkdir -p $HOME/bin
mkdir ~/src
cd ~/src
git clone https://aur.archlinux.org/php81.git
cd php81
@michaelbutler
michaelbutler / konsole-splits.md
Last active January 31, 2025 11:19
Auto open and split multiple Konsole tabs in KDE using a simple script

How to script and configure Konsole Splits and Tabs Automatically

Screenshot_20220617_144315

Find yourself repeatedly opening new tabs and splitting consoles every time you restart your machine? I made a shell script (and a json file) to set up Konsole exactly how I want it just by running a single command (also linked with a Desktop shortcut).

How To

First create a file called tab.layout.json and store it in $HOME.

@michaelbutler
michaelbutler / README.md
Last active June 10, 2023 22:53
Copying and Backing up Google Photos to BackBlaze

Copying and Backing up Google Photos to BackBlaze

BackBlaze offers data backup to the cloud for just a few cents per gigabyte. So, when I had almost reached my 100 GB limit on Google Photos (Google One), I decided to tranfer it all to a local 4 TB hard drive and then put a second backup into the cloud for long term storage.

The process was not that easy, so if you have any better advice please let me know. Here is what I did:

Getting the Photos to Local Machine

I had about 65 GB of photos and videos on Google Photos I wanted to download, spanning thousands of files and multiple years. It would take far too long to do it in the browser so I went to Google Takeout in hopes it would be faster.

@michaelbutler
michaelbutler / Zelda_Cemu_on_Linux_Steam_Controller.md
Last active May 28, 2025 06:51
Running Zelda Breath of the Wild in CEMU on Linux with Full Steam Controller Support Including Gyro Controls

Running Zelda: Breath of the Wild in CEMU on Linux with Full Steam Controller Support Including Gyro Controls

This guide instructs you how to:

  1. Install latest version of Wine
  2. Install gamescope
  3. Create a new wine prefix
  4. Install and setup DXVK in that wine prefix
  5. Install the Windows version of CEMU in that prefix (*)
  6. Configure CEMU first outside of Steam
@michaelbutler
michaelbutler / PS3_ApexLegends_MichaelB.xml
Created October 25, 2022 23:39
GIMX Apex Legends over Remote Play PS4/PS5
<?xml version="1.0" encoding="UTF-8"?>
<root>
<controller id="1" dpi="8000" type="Sixaxis">
<configuration id="1">
<trigger type="mouse" id="0" name="" button_id="BUTTON_X3" switch_back="yes" delay="0"/>
<mouse_options_list>
<mouse name="" id="0" mode="Aiming" buffer_size="1" filter="0.00"/>
</mouse_options_list>
<intensity_list/>
<button_map>
@michaelbutler
michaelbutler / PS3_DoomEternal_MichaelB.xml
Created October 25, 2022 23:40
GIMX Apex Legends over Remote Play PS4/PS5
<?xml version="1.0" encoding="UTF-8"?>
<root>
<controller id="1" dpi="12000" type="Sixaxis">
<configuration id="1">
<trigger type="" id="" name="" button_id="" switch_back="no" delay="0"/>
<mouse_options_list>
<mouse name="" id="0" mode="Aiming" buffer_size="1" filter="0.00"/>
</mouse_options_list>
<intensity_list/>
<button_map>
@michaelbutler
michaelbutler / GIMX_on_PS5.md
Last active October 26, 2022 15:32
Using GIMX (similar to Xim Apex) on PlayStation 5 PS5 with Remote Play

How to use a Keyboard and Mouse on PS5 Games

In this guide we go over all the components you need to play on a PlayStation 5 console, nearly ANY game, with a Keyboard and Mouse. In my experience with my PlayStation on wired ethernet and my Phone on 5 Ghz WiFi I saw almost no lag (later I'll explain why this technique effectively cuts any latency in half versus using Remote Play normally). You probably already have all these parts at home, except the GIMX adapter and maybe the OTG USB Hub.

Screenshot_20221025_212215 Click to enlarge

Required Components Summary