Skip to content

Instantly share code, notes, and snippets.

View aparatext's full-sized avatar

aparatext

  • Sol-III
  • 22:23 (UTC +02:00)
View GitHub Profile
@ahoka
ahoka / forth.scm
Last active November 20, 2024 13:28
(use-modules (srfi srfi-1))
(define (push-number maybenum)
(lambda (stack)
(let ([number (string->number maybenum)])
(when (not number) (raise (cons 'undefined-word maybenum)))
(cons number stack))))
(define (read-forth dict prog)
(let loop ([procs '()] [prog prog])
@henriquegogo
henriquegogo / kamby.scm
Last active November 20, 2024 13:32
Kamby Language in Scheme. Usage: $ scheme kamby.scm < sample.ka
(define (tokenize script-text)
(let ((tkns (list "")) (in-str? #f))
(define (append-str! str)
(set-car! tkns (string-append (car tkns) str)))
(define (add-tkn! . strs)
(if (string=? (car tkns) "") (set! tkns (cdr tkns)))
(set! tkns (append (reverse strs) tkns)))
@chowder
chowder / README.md
Last active March 12, 2026 14:03
Exporting Microsoft Authenticator TOTP secrets

Background

Workplaces may enforce TOTP 2FA to be enabled Office 365 accounts, which require the Microsoft Authenticator app to be installed.

Regular TOTP applications (such as Aegis, Authy, or LastPass) cannot be used as Microsoft uses a proprietary scheme called phonefactor. Furthermore, the application requires Google Services Framework (GSF) to be installed (likely to provide device notifications), and will refuse to work when it is not present on the device.

Forunately, after the registration is complete, the underlying mechanism the app uses to generate TOTP codes is regular otpauth, and its secrets can be exported with a little bit of effort.

Extracting the keys

@Aizistral
Aizistral / AbsoluteStateOfChatReporting.md
Last active February 1, 2026 14:19
The Absolute State of Chat Reporting

The Absolute State of Chat Reporting

Originally introduced in 1.19.1, chat reporting has undergone many changes in Mojang's attempts to eliminate the exploits and make the system functional. The purpose of this paper is to document the current technical state of chat reporting on an ongoing basis, and to provide a reference for the community to use when discussing the system. To that end I will try to keep it as unbiased as possible.

The Basics

Chat reporting heavily relies on cryptographic commitments and signatures to ensure that reported chat messages are not tampered with. The basic idea is that all players sign their chat messages with their private key, and then send the signature along with the message to the server.

Chat signing keypair is not generated by the client as one could expect; instead, it is issued by Mojang's services and is tied to the player's account. This means that the keypair is shared between all clients that the player uses, and the player can't change it. The keypair is f

@icecreammatt
icecreammatt / vimium_colemak
Last active May 12, 2025 22:17 — forked from benyarb/vimium_colemak
Vimium Colemak Keybindings
# Custom key mappings
map e scrollDown
map E nextTab
#map L scrollPageUp
unmap n
map n scrollLeft
map u scrollUp
@queeup
queeup / Nix_package_manager_on_Fedora_Silverblue.md
Last active March 13, 2026 01:57
Nix package manager install (single user) on Fedora Silverblue

Nix package manager on Fedora Silverblue

Warning

Disable composefs or enable root.transient before install and use nix on Fedora Silverblue 42. Do not mix both. Use just one method. I prefer enabling root.transient.

  • With composefs disabled

    sudo sed -i 's/,ro//' /etc/fstab
    
    sudo rpm-ostree kargs --append='ostree.prepare-root.composefs=0' --reboot
@iam-py-test
iam-py-test / data.min.json.ubo.txt
Last active September 15, 2023 21:40
A version of ClearURLs for uBlock Origin (forked)
! Title: ClearURLs for uBo
! Homepage: https://gist.github.com/iam-py-test/1db25658541945170eaaf191b399fac0
! Note: This was forked from https://gist.github.com/rusty-snake/5cd83a87d680ecbd03e79a1a06758207, which is based off of https://github.com/ClearURLs/Rules. I - iam-py-test - have made some modifications as to keep it up-to-date with the source and to fix bugs
$removeparam=/^p[fd]_rd_[a-z]*=/,domain=amazon.*
$removeparam=qid,domain=amazon.*
$removeparam=/^srs?=/,domain=amazon.*
$removeparam=/^__mk_[a-z]{1\,3}_[a-z]{1\,3}=/,domain=amazon.*
$removeparam=spIA,domain=amazon.*
$removeparam=ms3_c,domain=amazon.*
@TheFehr
TheFehr / .env
Last active October 3, 2021 07:33
Librephotos & Nextcloud - Duplication
# This file contains all the things you need to change to set up your Libre Photos.
# There are a few items that must be set for it to work such as the location of your photos.
# After the mandatory entry's there are some optional ones that you may set.
# Start of mandatory changes.
# Location of your photos.
myPhotos=./librephotos/pictures
# Comma delimited list of patterns to ignore (e.g. "@eaDir,#recycle" for synology devices)
@vgk77
vgk77 / how_to_disable_local_cors_in_firefox.txt
Last active August 12, 2024 14:26
Disable #firefox same origin policy
https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs
about:config -> security.fileuri.strict_origin_policy -> false
const Gtk = imports.gi.Gtk;
const Gdk = imports.gi.Gdk;
const Lang = imports.lang;
const Webkit = imports.gi.WebKit;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Json = imports.gi.Json;
const Clutter = imports.gi.Clutter;