Skip to content

Instantly share code, notes, and snippets.

View katrinafyi's full-sized avatar
🚲

Kait Lam katrinafyi

🚲
  • Australia
  • 08:25 (UTC +10:00)
View GitHub Profile
#!/usr/bin/env python3
# vim: ts=2:sw=2:expandtab:autoindent
"""
format_anything.py implements pretty-printing of any expression
with parentheses.
"""
import io
import re
From 1c0d426700fe52da7e46bc17a111e103ded0f91b Mon Sep 17 00:00:00 2001
From: rina <k@rina.fyi>
Date: Mon, 15 Jul 2024 16:32:32 +1000
Subject: [PATCH] ci: discover histogram parts dynamically
untested
---
.github/workflows/run-examples.yml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
theory Scratch
imports CTT.CTT
begin
lemma
assumes "X type" "⋀x. x:X ⟹ P(x) type" "Q type"
assumes "g : ∑x:X. (P(x) ⟶ Q)"
shows "h : (∏x:X. P(x)) ⟶ Q"
using assms
sorry
@katrinafyi
katrinafyi / OWAComposeUrls.md
Last active February 7, 2024 00:43 — forked from miwebguy/OWAComposeUrls.md
URLs for linking to specific tasks in Outlook Web Access (deeplinks)

Outlook Web Access Compose Urls

blogs.msdn.microsoft.com/carloshm/2016/01/16/how-to-compose-a-new-message-or-event-and-populate-fields-in-office365/

Compose New Message (Mail): (updated 2021)

https://outlook.office.com/mail/deeplink/compose

Compose Mail Parameters

From b07887d9ce7a73f251221565a526d8dc6439b673 Mon Sep 17 00:00:00 2001
From: Kait Lam <k@rina.fyi>
Date: Sat, 17 Jun 2023 12:22:55 +1000
Subject: [PATCH 1/5] update rutorrent to v4.1.6-hotfix
---
pkgs/applications/networking/p2p/rutorrent/default.nix | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkgs/applications/networking/p2p/rutorrent/default.nix b/pkgs/applications/networking/p2p/rutorrent/default.nix
From d6bac7610789c172ccc2e59169f2892f8adff901 Mon Sep 17 00:00:00 2001
From: rina <k@rina.fyi>
Date: Fri, 13 Oct 2023 18:48:01 +1000
Subject: [PATCH] support environment variables in properties.
---
lib/properties.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/properties.ts b/lib/properties.ts
@katrinafyi
katrinafyi / discon.bat
Created October 7, 2023 12:28
disconnects a RDP session and connects it back to the local computer.
:: https://superuser.com/questions/355935/how-can-i-restore-a-remote-desktop-session-to-the-local-console
for /f %%i in ('qwinsta ^| findstr /C:">rdp-tcp#"') do set RDP_SESSION=%%i
:: Strip the >
set RDP_SESSION=%RDP_SESSION:>=%
tscon %RDP_SESSION% /dest:console
@katrinafyi
katrinafyi / graal-notes.md
Last active October 19, 2023 06:12
all options for Graal native-image.

compile to javac

pushd ~/progs/graal/compiler/; javac ./src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/ArrayBoundsCheckEliminationTestCases.java -d .; popd

build native image and dump graphs

mx native-image --no-fallback -cp ../compiler/./mxbuild/jdk17/jdk.internal.vm.compiler.test/bin/ org.graalvm.compiler.core.test.ArrayBoundsCheckEliminationTestCases -H:Dump= -H:MethodFilter='ArrayBoundsCheckEliminationTestCases.*' -H:NumberOfThreads=4 -H:-ReduceDCE -H:-AOTInline -H:-AOTTrivialInline -H:PrintGraph=File
From d5b64b718f2a14669f2a95dbbf3b456528f7084a Mon Sep 17 00:00:00 2001
From: Kait Lam <k@rina.fyi>
Date: Sat, 2 Sep 2023 10:14:29 +1000
Subject: [PATCH] emit names for capstone intrinsics.
---
src/capstone2llvmir/capstone2llvmir_impl.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/capstone2llvmir/capstone2llvmir_impl.cpp b/src/capstone2llvmir/capstone2llvmir_impl.cpp
@katrinafyi
katrinafyi / docker.md
Created September 13, 2023 13:37
Temporary persistent Docker containers for experimentation.

temporary docker

Sometimes, you need a fresh system to check your newly-minted README. A virtual machine would be perfect but it's way too much for this. Instead, we can use Docker in its purest form: as a sandbox virtual machine to test our work.

We create a new docker container with a recognisable name.

docker run -td --name ubby -v $HOME:/mnt ubuntu