Skip to content

Instantly share code, notes, and snippets.

@ltlollo
ltlollo / MastdodonBackspaceFix.js
Created February 20, 2024 10:15
Mastdodon Backspace Fix
// ==UserScript==
// @name Mastodon Backspace Fix
// @namespace http://tampermonkey.net/
// @version 2024-02-20
// @description Fixes the (double) backspace issue when the browser is configured with a backspace-to-go-back behaviour like browser.backspace_action=0 on Firefox
// @author ltlollo
// @match https://mastodon.gamedev.place/*
// @match https://mastodon.world/*
// @match https://mastodon.social/*
// @match https://mstdn.social/*
@ltlollo
ltlollo / stemmer.c
Last active November 24, 2021 11:11
porter stemmer version 1
#include <sys/mman.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <immintrin.h>
@ltlollo
ltlollo / sin-cos-approximations-gist.adoc
Created October 19, 2021 21:28 — forked from publik-void/sin-cos-approximations-gist.adoc
Fast MiniMax Polynomial Approximations of Sine and Cosine

Fast MiniMax Polynomial Approximations of Sine and Cosine

#include <unistd.h>
#include <fcntl.h>
#include <sys/sendfile.h>
#include <sys/mman.h>
#include <stdint.h>
#include <err.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
@ltlollo
ltlollo / mh.go
Last active February 12, 2023 21:44
emergency file share server
package main
import (
"fmt"
"log"
"net/http"
"io/ioutil"
"bytes"
"bufio"
"os"
@ltlollo
ltlollo / vktri.c
Created April 26, 2020 21:00
extract without shaders and texture of a c hello vulkan triangle
// This is free and unencumbered software released into the public domain.
// For more information, see LICENSE.
#if defined(__linux__)
# define VK_USE_PLATFORM_XCB_KHR
#elif defined(_WIN32)
# define VK_USE_PLATFORM_WIN32_KHR
# define main(...) WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
#else
# error "Unknown Platform"
@ltlollo
ltlollo / instr.c
Last active January 31, 2020 23:22
some binary instrumentation
// This is free and unencumbered software released into the public domain.
// For more information, see LICENSE
#include <assert.h>
#include <err.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

Keybase proof

I hereby claim:

  • I am ltlollo on github.
  • I am ltlollo (https://keybase.io/ltlollo) on keybase.
  • I have a public key ASDqgZNabWvHe_ilCCzAZ2RY-kIo6OO9YM5_8C-8nze5ywo

To claim this, I am signing this object:

@ltlollo
ltlollo / crbot.go
Last active November 11, 2019 06:27
package main
import (
"os"
"log"
"fmt"
"io"
"io/ioutil"
"bufio"
"strings"