Skip to content

Instantly share code, notes, and snippets.

View Ancurio's full-sized avatar

Amaryllis Kulla Ancurio

View GitHub Profile
@Ancurio
Ancurio / main.adb
Created December 1, 2023 15:11
Advent of Code 2023 Day 01
with Text_IO; use Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Strings.Unbounded;
with Ada.Characters.Handling;
procedure main is
package SU renames Ada.Strings.Unbounded;
package CH renames Ada.Characters.Handling;
InputFile : File_Type;
Fname : constant String := "input.txt";
@Ancurio
Ancurio / purge_t2bot_ghosts.md
Created September 30, 2023 14:27
Purging t2bot.io ghost users

I recently migrated away from t2bot.io's discord<->matrix bridging (to a self-hosted one), which after figuring out all the nice synapse and systemd related pecularities left me with one last cleanup of all the @_discord_ID:t2bot.io ghosts haunting my previously bridged matrix rooms.

In order to automate the process I wrote two scripts that I want to share; the main one is purge_t2bot_ghosts.sh which you provide with a room ID (the internal ones starting with a ! and looking like a random-generated password), and an access token with admin priviledges; also note that due to the _synapse API these scripts are using, they must be executed on localhost (this might be rewritten to be used from anywhere, idk). You can optionally specify a delay in seconds between kicks to not trigger the built-in rate limit, but I've found 4 seconds (the default) to be exactly right.

Tip: Do this before setting up any replacement bridges to avoid status spams on the Discord site.

purge_t2bot_ghosts.sh (requires jq):

@Ancurio
Ancurio / drohbrief.MD
Last active October 29, 2021 11:07
Offener Drohbrief an die Stadt Köln

Liebe Verwaltung der Stadt Köln!

Mein Name ist Amaryllis, ich bin 30 und gemeldet in Rondorf, aber passe seit etwa zwei Jahren auf eine Wohnung in Zollstock auf. Ich möchte Ihnen gerne folgendes Plätzchen in Raderthal vorstellen:

Kartenansicht
Foto 1
Foto 2
Foto 3
Foto 4
Foto 5

diff --git a/src/graphics.cpp b/src/graphics.cpp
index 7d3a4da..8782c56 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -340,7 +340,7 @@ struct FPSLimiter
private:
void delayTicks(uint64_t ticks)
{
-#ifdef HAVE_NANOSLEEP
+#if defined(HAVE_NANOSLEEP) && !defined(_WIN32)
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 01e80c7..300bebb 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -34,6 +34,7 @@
#include "etc-internal.h"
#include "binding.h"
#include "perftimer.h"
+#include "debugwriter.h"
#include <SDL.h>
#include <SDL_opengl.h>
typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
struct
{
PFNGLCLEARCOLORPROC ClearColor;
diff --git a/src/debuglogger.cpp b/src/debuglogger.cpp
index 4301bdd..768f05e 100644
--- a/src/debuglogger.cpp
+++ b/src/debuglogger.cpp
@@ -25,6 +25,10 @@
#include <glew.h>
#include <iostream>
+#ifndef APIENTRY
+#define APIENTRY
@Ancurio
Ancurio / print_dec.patch
Created May 19, 2014 20:14
Print available asset decoders in mkxp
diff --git a/src/debugwriter.h b/src/debugwriter.h
index 27244d1..c7b10ed 100644
--- a/src/debugwriter.h
+++ b/src/debugwriter.h
@@ -24,6 +24,7 @@
#include <iostream>
#include <sstream>
+#include <vector>
@Ancurio
Ancurio / gist:7401946
Created November 10, 2013 18:32
mkxp issue #4
[tikilou@utopia ToTheMoon.amd64]$ ./ToTheMoon.amd64
GL Vendor : ATI Technologies Inc.
GL Renderer : AMD Radeon HD 7800 Series
GL Version : 4.3.12614 Compatibility Profile/Debug Context 12.104
GLSL Version : 4.30
--- Compiling SimpleShader
From: simple.vert simple.frag
--- Compiling SimpleColorShader
From: simpleColor.vert simpleColor.frag
--- Compiling SimpleAlphaShader
@Ancurio
Ancurio / gist:5980534
Last active December 19, 2015 15:59
Steam hardware profile
Processor Information:
Vendor: GenuineIntel
Speed: 2534 Mhz
2 logical processors
2 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported