Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
@Alistair1231
Alistair1231 / Greasemonkey.js
Last active December 5, 2025 17:28 — forked from btzdnl/Greasemonkey.js
Greasemonkey API stubs with JSDoc, for WebStorm etc
/**
* Created by azu. (modified by Alistair1231)
* Date: 10/11/28
* Updated by fuzzykiller (2015/08/28), Alistair1231 (2025/01/02)
* License: MIT License
*/
/**
* An object containing Greasemonkey's API when using the modern GM object approach
*/
@Alistair1231
Alistair1231 / Greasemonkey.js
Created December 5, 2025 17:28 — forked from btzdnl/Greasemonkey.js
Greasemonkey API stubs with JSDoc, for WebStorm etc
/**
* Created by azu.
* Date: 10/11/28
* Updated by fuzzykiller (2015/08/28)
* License: MIT License
*/
/**
* An object that exposes various information about Greasemonkey and the running User Script.
*/
@Alistair1231
Alistair1231 / greasemonkey.js
Created December 5, 2025 17:26
Greasemonkey API stubs with JSDoc, for WebStorm etc
/**
* Created by azu. (modified by Alistair1231)
* Date: 10/11/28
* Updated by fuzzykiller (2015/08/28), Alistair1231 (2025/01/02)
* License: MIT License
*/
/**
* An object containing Greasemonkey's API when using the modern GM object approach
*/
@Alistair1231
Alistair1231 / convert-pdf.fish
Created November 26, 2025 20:56
Black and White printing color correction
#!/usr/bin/env fish
# install imagemagick and ghostscript
for i in fridrich_oll.pdf fridrich_pll.pdf;convert -density 300 $i -modulate 100,30,100 temp_%04d.png;convert temp_*.png $i.1.pdf;rm temp_*.png;end
@Alistair1231
Alistair1231 / nvidia-open-arch.sh
Last active November 14, 2025 16:09
Nvidia-open driver on arch linux with dracut
#!/usr/bin/env bash
# read thoroughly: https://wiki.archlinux.org/title/NVIDIA
# also of note https://wiki.archlinux.org/title/Dracut
# Install Drivers and dependencies (including dracut becuase i prefer it)
sudo pacman -S nvidia-open-dkms linux linux-lts linux-headers linux-lts-headers nvidia-utils dkms dracut
# with dracut we don't also want mkinitcpio
sudo pacman -R mkinitcpio
# we want to exclude the nouveau driver and force loading of the nvidia ones into our initramfs
#Requires AutoHotkey 2.0
#SingleInstance Force
#HotIf WinActive("ahk_exe ShooterGame.exe")
$+WheelUp:: {
Send "{WheelUp}"
}
$+WheelDown:: {
Send "{WheelDown}"
}
@Alistair1231
Alistair1231 / nginx.conf
Last active July 25, 2025 06:12
Nginx Proxy Manager Basic Auth for XHR/Ajax "Custom Nginx Configuration"
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header Authorization $http_authorization;
proxy_pass http://$server:$port;
}
@Alistair1231
Alistair1231 / Dockerfile
Last active April 3, 2025 18:55
arch linux distrobox with systemd
FROM archlinux:latest
ARG USER
# make sure pacman works, also install basic packages: sudo, dbus, systemd
RUN curl -s "https://archlinux.org/mirrorlist/?country=DE&country=AT&country=CH&protocol=https&use_mirror_status=on&sort=rate" | sed -e 's/^#Server/Server/' -e '/^#/d' | tee /etc/pacman.d/mirrorlist && \
curl -L https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static -o /tmp/pacman-static && chmod +x /tmp/pacman-static && pacman-key --init && pacman-key --populate archlinux && \
/tmp/pacman-static -Sy archlinux-keyring pacman-contrib sudo dbus systemd --noconfirm && \
curl -s "https://archlinux.org/mirrorlist/?country=DE&country=AT&country=CH&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - | tee /etc/pacman.d/mirrorlist && \
pacman -Syu --noconfirm
@Alistair1231
Alistair1231 / Dockerfile
Last active January 28, 2025 12:53
latexrun customizations
# for new image tags check: https://gitlab.com/islandoftex/images/texlive/container_registry/573747
FROM registry.gitlab.com/islandoftex/images/texlive:TL2024-2025-01-26-full-doc
# create a non-root user
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN apt-get update && \
apt-get install -y man sudo openssh-client neovim inkscape zsh tmux && \

Table comparison

image

Tabularray

tabularray
% \usepackage{color}