Skip to content

Instantly share code, notes, and snippets.

@willnode
willnode / restart.sh
Created January 4, 2024 10:44
DOM Cloud's restart script
#!/bin/bash
while [ `passenger-config list-instances --json | jq length` -ne 1 ]; do
echo "Waiting until NGINX done reloading..."
sleep 1
done
sudo -n -- passenger-config reopen-logs &> /dev/null || true
passenger-config restart-app ~ --ignore-app-not-running
@willnode
willnode / index.html
Created November 16, 2023 22:07
DOM Cloud's default index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Welcome!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
text-align: center;
font-family: "Segoe UI", Roboto, sans-serif;

Install XCode via terminal

sudo xcodebuild -runFirstLaunch
@willnode
willnode / forward-domain-nginx.conf
Created May 26, 2023 14:39
Example of NGINX implementation for forwarddomain.net
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
@willnode
willnode / redox_m1.md
Last active October 18, 2025 11:11
Build Redox OS in MacOS Apple Silicon

This is a way to compile Redox OS in MacOS Apple Silicon using Podman.

This gist follows the book but specifics to MacOS Apple Silicon for easy and fastest installation. For native bootstrap follow another gist (WIP)

Clone

cd ~/Document
git clone https://gitlab.redox-os.org/redox-os/redox
cd redox
@willnode
willnode / 8to9.md
Last active April 8, 2025 22:13
Upgrade from Rocky Linux 8 to 9

Main article: https://computingforgeeks.com/upgrade-to-rocky-linux-9-from-rocky-linux-8/

There are some adjustment that I need to aware with. For instance I have to disable many old modules also upgrading my REMI and postgres data.

Using PHP from builtin rocky linux repo turns out have a devastating consequences... It's much better to move away from it and use remi repo.

dnf update -y 
REPO_URL="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r"
@willnode
willnode / docker.md
Last active April 14, 2023 03:52
Installing Docker in Mac with sudo manually
sudo nano /Library/LaunchDaemons/com.docker.vmnetd.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
@willnode
willnode / fix-win-security.ps1
Last active September 30, 2021 04:40
Fix Windows Security Missing in Windows 11
$manifest = (Get-AppxPackage Microsoft.SecHealthUI -AllUsers).InstallLocation + '\AppxManifest.xml';
Add-AppxPackage -DisableDevelopmentMode -Register $manifest;
@willnode
willnode / unicode-to-latex.json
Created September 19, 2021 18:35
Unicode to latex referencing https://github.com/JuliaLang/julia/blob/846492960fdbc9e3806e8bb8336cad4d559fa733/stdlib/REPL/src/latex_symbols.jl but with all unicode.xml combined and all possible latex included.
{
" ": ["\\space"],
"#": ["\\#"],
"$": ["\\textdollar"],
"%": ["\\%"],
"&": ["\\&"],
"'": ["\\textquotesingle"],
"*": ["\\ast"],
"‚": [","],
"−": ["-"],
@willnode
willnode / indonesian_geocodes.sql
Created September 19, 2021 12:27
Indonesian Geographical codes (until the village). Source unknown (I forgotten) probably from 2018 data AFAIK.
This file has been truncated, but you can view the full file.
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.13-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.1.0.6116
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;