Skip to content

Instantly share code, notes, and snippets.

View mamiu's full-sized avatar
🏄‍♂️
Gone kitesurfing

Paul Miu mamiu

🏄‍♂️
Gone kitesurfing
  • Gold Coast, Australia
View GitHub Profile
@mamiu
mamiu / launch-pma.sh
Created August 26, 2021 03:27
This script will launch a PhpMyAdmin container in a kubernetes cluster and connect it to a wordpress installation (that was setup with the bitnami wordpress helm chart https://github.com/bitnami/charts/tree/master/bitnami/wordpress).
#!/usr/bin/env bash
# helper variables to make text bold
bold_start=$(tput bold)
bold_end=$(tput sgr0)
while [ $# -gt 0 ]; do
case "$1" in
-c|--context)
CONTEXT="$2"
@mamiu
mamiu / macos_bootable_usb_stick_guide.md
Last active October 11, 2021 09:54
Create bootable USB stick from an ISO image on macOS

Create bootable USB stick from an ISO image on macOS

If you want to create a bootable USB stick for Windows (Windows 10/11 installation media) have a look at this guide.

  1. Download the desired ISO file

  2. Open a terminal application (like the Apple Terminal or iTerm)

  3. Convert the .iso image to a .dmg file (UDIF image) using the convert option of hdiutil:

@mamiu
mamiu / worker.js
Created August 21, 2023 10:43
Cloudflare Worker Script for MTA-STS
const mode = 'testing';
// const mode = 'enforce';
const max_age = 604800; // 1 week
addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event.request));
});
const handleRequest = async (request) => {
const url = new URL(request.url);