Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
geoffyuen / gutenberg-sample-content.html
Created June 8, 2024 13:46 — forked from mailenkno/gutenberg-sample-content.html
WordPress Gutenberg Sample Content
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} -->
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
@avoidik
avoidik / README.md
Last active October 7, 2025 19:07
Run Windows 11 IoT ARM on Mac M1 or similar

How to run Windows on Mac

We're going to run Windows 11 IoT (ARM) on Mac M1 (ARM) using the native binary translation, thanks to up-to-date version of qemu which has native hardware support.

Prerequisites

Install qemu and required tools (coreutils - we need truncate/gtruncate, dd/gdd CLI tools, samba - to share files between host and guest VM).

$ brew install qemu coreutils samba
@p-mng
p-mng / README.md
Last active October 24, 2025 21:02
Uninstall Rosetta 2 on macOS

Uninstall Rosetta 2 on macOS

1. Disable SIP (System Integrity Protection)

  1. Boot into recovery
  2. Open a terminal (Utilities > Terminal)
  3. Disable SIP using csrutil disable
  4. Reboot into macOS

2. Uninstall Rosetta

@localzet
localzet / mime.sh
Created January 16, 2024 17:15
mime.type generator
#!/bin/bash
MIME_TYPES=$(wget -qO- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types | sed '/^#/d')
echo "types {" > ./mime.types;
echo "$MIME_TYPES" | while read -r line
do
TYPE=$(echo $line | awk '{print $1}')
EXTENSIONS=$(echo $line | cut -d' ' -f2-)
for EXT in $EXTENSIONS
@localzet
localzet / set_real_ip.sh
Last active October 22, 2024 20:55
Автоматически добавляет set_real_ip_from в Nginx для определения реального IP клиента, используя Cloudflare, Google Cloud и AWS
#!/bin/bash
# Получить последние IP-адреса Cloudflare
IPS_IPV4_CLOUDFLARE=$(curl https://www.cloudflare.com/ips-v4)
IPS_IPV6_CLOUDFLARE=$(curl https://www.cloudflare.com/ips-v6)
# Получить последние IP-адреса Google Cloud
IPS_IPV4_GOOGLECLOUD=$(curl https://www.gstatic.com/ipranges/cloud.json | jq -r '.prefixes[] | select(.ipv4Prefix) | .ipv4Prefix')
IPS_IPV6_GOOGLECLOUD=$(curl https://www.gstatic.com/ipranges/cloud.json | jq -r '.prefixes[] | select(.ipv6Prefix) | .ipv6Prefix')
@sidmulajkar
sidmulajkar / enable-ech-in-browsers.md
Last active September 22, 2025 16:03
enable-ech-sni-in-chromium-browsers-like-brave-chrome-firefox
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@steven-michaud
steven-michaud / ThirdPartyKexts.md
Last active October 19, 2025 12:25
Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to

@ayyybe
ayyybe / _.md
Last active July 5, 2025 08:29
wsl2 + docker desktop tomfoolery

Update WSL (to use "store version" features) without the Microsoft Store:

  1. Download the latest WSL app package release: https://github.com/microsoft/WSL/releases
  2. wsl --shutdown
  3. Add-AppxPackage Microsoft.WSL_1.2.5.0_x64_ARM64.msixbundle

Optionally, reboot before and/or after installing the package if features aren't working properly (not required for --mount, maybe required for WSLg)


Attach bare vhdx disk (useful for formatting to ext4)

@melMass
melMass / osx.md
Last active December 18, 2024 15:25
OSX cheatsheet

Boot

Boot in recovery

sudo nvram "recovery-boot-mode=unused" && sudo reboot recovery

Boot in Internet Recovery

  • Shift +Option + Cmd + R equivalent:
    sudo nvram internet-recovery-mode=RecoveryModeNetwork