Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
sudo apt update
sudo apt install libpam-google-authenticator
# google-authenticator
google-authenticator -t -d -f -r 3 -R 30 -w 3
sudo cp /etc/pam.d/sshd{,.pre-mfa-bak}
sudo cp /etc/ssh/sshd_config{,.pre-mfa-bak}
@phunanon
phunanon / Q&A log.txt
Created February 27, 2025 10:38
HMRC Business expenses for the self-employed Thu, Feb 27, 2025 9:45 AM - 10:45 AM GMT
09:49 AM: question: As a massage therapist I am aware I can claim for cleaning my uniform and towels at home. Where can I find this information specific to my occupation and what I can claim for each wash?
09:49 AM: answer: If you wear a uniform to perform your duties, you may claim a flat rate expense for laundry costs, pelase refer to the following guide to check if you are eligible: https://www.gov.uk/guidance/job-expenses-for-uniforms-work-clothing-and-tools
09:49 AM: question: My husband and I jointly own a residential property let and a furnished holiday let which does not meet the criteria for the special FHL tax situation which ends this April. Other than the income from these properties, we are retired. My husband is a pensioner. I will be a pensioner next year but do have some income from dividends.Do we count as self employed for what is covered in this seminar?
09:49 AM: answer: Rental property income is not generally dealt with under self employment, the inocme is declared in the property sectio
@phunanon
phunanon / AmericanConquestWindows11.md
Created February 7, 2025 18:07
Instructions on how to get American Conquest (2002) working on Windows 11 via a virtual machine.
@phunanon
phunanon / extract-dvsa-json-data.ix
Created November 24, 2024 22:06
For educational purposes, obviously.
(-> 'ls topics/*.json'
exec
(split '\n')
(map read)
(filter val)
(map from-json)
(map #(% 'questions'))
flatten
(flat-map extract-questions)
to-json
function formatObj(obj: object) {
const lines: [number, string][] = [];
function fmt(obj: any, depth: number) {
if (Array.isArray(obj)) {
if (!obj.length) {
lines.push([depth, 'none']);
}
for (const x of obj) {
fmt(x, depth);
}
Chika v2:
- Manifesto: an OS that is performant, lean, multi-process, non-realtime, Arduino & Linux compatible, with a dynamically compiled dynamically typed language
- Yes to heartbeats
- Yes to binds
- Yes to bursting
- Yes to Arduino + Linux
- Yes to no floating point
- No to hard persistent storage dependency
- No to exeForm (and call them expressions rather than forms)
- like Insitux, just count the number of arguments
@phunanon
phunanon / pdf-ball-drop
Created June 14, 2024 03:23
Because I'm sick of having to watch Mikha do it by hand! Uses ball-drop technique.
// ==UserScript==
// @name PDF column extractor
// @description extracts PDF pages for Mikha
// @namespace http://tampermonkey.net/
// @version 2024-06-13
// @author Patrick Bowen
// @match https://mozilla.github.io/pdf.js/web/viewer.html
// @grant none
// ==/UserScript==
@phunanon
phunanon / single-dep-builder.ix
Created December 7, 2023 12:32
Builds HTML files with %dep.html% substitution
(import "phunanon/fs")
(import "phunanon/dotenv") ──────
(-> (dotenv) :www (var www))
(-> (ls "*.html")
(var names)
(juxt _ (map (comp read trim)))
(... kv-dict)
(var files))
@phunanon
phunanon / hello.bf
Created September 7, 2023 18:35
"Hello, world!" in Brainfuck
+++++++[>++++++++++<-]>++.
<++++[>+++++++<-]>+.
+++++++..
+++.
>++++[>+++++++++++<-]>.
------------.
[-]
<<[>+>+<<-]>++++++++.>.
+++.
------.
@phunanon
phunanon / Insitux in Deadline.md
Last active July 6, 2023 05:24
Community-led documentation for using Insitux in the Roblox game Deadline