Skip to content

Instantly share code, notes, and snippets.

View sin-ack's full-sized avatar
⚠️
values of β will give rise to dom!

Synchronization Acknowledgement sin-ack

⚠️
values of β will give rise to dom!
View GitHub Profile
@sin-ack
sin-ack / README.md
Last active July 11, 2026 23:50
Make Twitter anonymous

How to install

  1. Install something that supports UserCSS, e.g. Stylus.
  2. Click the "Raw" button next to xchan.user.css below.
  3. Click "Install style" (or whatever it's called in your extension).

It will auto-update if I change the style here.

Report bugs as comments.

@sin-ack
sin-ack / zig_compiler_simulator.py
Last active July 30, 2022 01:11
Zig Compiler Simulator 2022
import random
import sys
import time
import pathlib
import re
AST_LOWERING_TOTAL = 600
AST_LOWERING_INCREMENT = 50
SEMA_TOTAL = 45000
SEMA_INCREMENT_MIN = 350
@sin-ack
sin-ack / the_variant_of_python.py
Created July 19, 2022 12:39
How to make mypy sweat
_TranslatedM = TypeVar("_TranslatedM", bound="TranslatedModel", covariant=True)
class TranslationModelBase(Generic[_TranslatedM], Model):
"""Base class for translation models."""
language = models.ForeignKey["Language", "Language"](
to="Language", on_delete=models.CASCADE, verbose_name=_("Language")
)
parent: "models.ForeignKey[_TranslatedM, _TranslatedM]"
@sin-ack
sin-ack / font.cpp
Last active March 11, 2021 15:22
Very over-engineered font rendering for OpenGL
bool
Font::render_batch(
glm::mat4 const &projection, std::vector<FontSpec> const &strings,
Program *shader) {
// Load VAO and VBO
glBindVertexArray(s_vao);
glBindBuffer(GL_ARRAY_BUFFER, s_vbo);
// Use the shader program specified.
if (shader == nullptr) {