Skip to content

Instantly share code, notes, and snippets.

View lethalbit's full-sized avatar
😼
ニャー

Aki lethalbit

😼
ニャー
View GitHub Profile
@lethalbit
lethalbit / PKGBUILD
Last active January 20, 2024 09:26
Parallel Xyce™ w/ static Trilinos
pkgname=('xyce')
trilinos_ver=15.0.0
xyce_ver=7.8.0
pkgver="${xyce_ver}"
pkgrel=1
pkgdesc='The Xyce™ Parallel Electronic Simulator'
arch=('x86_64')
license=('GPL3')
depends=('python' 'lapack' 'boost' 'netcdf' 'libmatio' 'libx11' 'hdf5-openmpi' 'openmpi')
makedepends=('gcc-fortran' 'perl' 'blas' 'cmake' 'bc' 'python-numpy' 'suitesparse' 'flex' 'bison')
@lethalbit
lethalbit / Makefile
Last active June 22, 2023 03:37
r0rplz: Read/write "ring 0" CPU registers from userspace via `/dev` nodes
obj-m += r0rplz.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
install:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@lethalbit
lethalbit / rust-dist.py
Last active May 6, 2023 12:09
A terribly janky script that downloads rust packages and makes supposedly portable dists out of them
#!/bin/python
import json
import tarfile
import shutil
from os import environ
from sys import exit, version_info
from typing import Final
/* ==UserStyle==
@name elixir.bootlin.com - 12/25/2021, 3:06:16 AM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A non-blindding userstyle for bootlin elixir
@author Aki
==/UserStyle== */
@-moz-document domain("elixir.bootlin.com") {
body {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lethalbit
lethalbit / pride.py
Last active August 11, 2023 20:57
New and improved 24-bit ANSI pride flags for your terminal
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
flags = {
'trans': [
('091', '206', '250'),
('254', '169', '184'),
('255', '255', '255'),
('254', '169', '184'),
('091', '206', '250'),
@lethalbit
lethalbit / flag.sh
Created February 11, 2021 17:02
24-bit color pride flags for your terminal
#!/bin/bash
print_trans() {
printf "\x1b[38;2;091;206;250m\x1b[48;2;091;206;250m██████████████████\x1b[0m\n"
printf "\x1b[38;2;254;169;184m\x1b[48;2;254;169;184m██████████████████\x1b[0m\n"
printf "\x1b[38;2;255;255;255m\x1b[48;2;255;255;255m██████████████████\x1b[0m\n"
printf "\x1b[38;2;254;169;184m\x1b[48;2;254;169;184m██████████████████\x1b[0m\n"
printf "\x1b[38;2;091;206;250m\x1b[48;2;091;206;250m██████████████████\x1b[0m\n"
}
print_lesbian() {

Keybase proof

I hereby claim:

  • I am lethalbit on github.
  • I am lethalbit (https://keybase.io/lethalbit) on keybase.
  • I have a public key whose fingerprint is 9A9A 5485 C11B 8D4B 3C8C 06AB F9D8 AFFE E90C FB9E

To claim this, I am signing this object:

#!/bin/python3
from os import path
from urllib.request import urlretrieve
classes = ['Lu', 'Ll', 'Lt', 'Lm', 'Lo']
entr = None
if not path.isfile('UnicodeData.txt'):
urlretrieve('https://www.unicode.org/Public/UNIDATA/UnicodeData.txt', 'UnicodeData.txt')
@lethalbit
lethalbit / .sh
Created June 11, 2016 03:21
Quick in-shell assemble / get opcodes
basm() { tmpf=$(mktemp -u);as - -o $tmpf; [[ $? == 0 ]] && objdump -d $tmpf && rm $tmpf || return 1; }