Skip to content

Instantly share code, notes, and snippets.

View 0xdeadbeer's full-sized avatar
🔬
Avoiding rapid decay into disorder and chaos

Kevin J. 0xdeadbeer

🔬
Avoiding rapid decay into disorder and chaos
View GitHub Profile
@0xdeadbeer
0xdeadbeer / packages
Created April 7, 2024 18:51
Pacman packages for compiling keepassxreboot/keepassxc
cmake
make
gcc
asciidoctor
botan
qt5-base
qt5-svg
qt5-translations
qt5-tools
minizip
@0xdeadbeer
0xdeadbeer / client.c
Created February 19, 2024 21:02
Example OpenSSL Server + Client code to exchange data
#include <stdlib.h>
#include <unistd.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#define HOST_ADDR "localhost:4433"
#define MSG_SIZE 512
int main(void) {
@0xdeadbeer
0xdeadbeer / indexofes-minimal.tree
Created February 4, 2024 19:50
[MINIMAL] Tree of index-of.es website snapshot (Feb 15/16 2022) - 0xdeadbeer
$ tree -L 2 -d
.
├── Android
├── Art-Gallery
│   ├── A
│   ├── B
│   ├── C
│   ├── D
│   ├── E
@0xdeadbeer
0xdeadbeer / indexofes.tree
Created February 4, 2024 19:48
[FULL] Tree of index-of.es website snapshot (Feb 15/16 2022) - 0xdeadbeer
$ tree -d
.
├── Android
├── Art-Gallery
│   ├── A
│   │   ├── aachen
│   │   ├── aagaard
│   │   ├── abadia
│   │   ├── abaquesn
@0xdeadbeer
0xdeadbeer / build.sh
Created January 21, 2024 11:24
Simple sh build script
#!/usr/bin/sh
CC=gcc
CFLAGS=
LDFLAGS=
SRC=./src
ODIR=./build
mkdir -p $ODIR
find $SRC -type f -name "*.c" | parallel -j 4 gcc $CFLAGS {} -o $ODIR/{/.} $LDFLAGS
@0xdeadbeer
0xdeadbeer / 300-japanese-words.csv
Created January 8, 2024 16:06
300 Anki exported + awk-ed CSV flashcards.
word reading pipe_separated_definitions
おに ogre | demon | onispirit of a deceased personogre-like person (i.e. fierce, relentless, merciless, etc.)it (in a game of tag, hide-and-seek, etc.)very | extremely | super-Oni
相打ち あいうち simultaneously striking one another (in kendo, etc.)draw | tie
矢印 やじるし arrow (symbol)(romantic) interest (for a certain person) | direction (of one's attention, etc.)
致命傷 ちめいしょう fatal wound
細胞 さいぼう cellcell (in an organization, esp. a communist party)
眼球 がんきゅう eyeball
報い むくい reward | recompense | returnpunishment | retribution
借金 しゃっきん debt | loan | liabilities | borrowing money
鍛錬 たんれん tempering (metal) | annealing | forgingtoughening | disciplining | training
@0xdeadbeer
0xdeadbeer / water.glsl
Created December 4, 2023 17:20
Water effect with GLSL
#version 300 es
precision highp float;
precision highp sampler2D;
in vec2 uv;
out vec4 out_color;
uniform vec2 u_resolution;
uniform float u_time;
@0xdeadbeer
0xdeadbeer / Makefile
Created November 12, 2023 11:37
Example Makefile
CC=gcc
CFLAGS=
LDFLAGS=
TARGET=project
SDIR=src
ODIR=build
SRC=$(shell find $(SDIR) -type f -name *.c)
OBJ=$(SRC:.c=.o)
@0xdeadbeer
0xdeadbeer / anki-english-vocabulary.sh
Created June 29, 2023 20:53
Simple and efficient way to add vocabulary to Anki through AnkiConnect (using dmenu for input)
#!/usr/bin/sh
# CONSTANTS
deck_name="deck name"
card_type_name="card type name"
anki_server="http://localhost:8765/"
front_part=$(dmenu -p "Word: " < /dev/null)
front_part_escaped=$(printf '%s\n' "$front_part" | sed 's/"/\\"/g')
# if either of them is empty, exit
@0xdeadbeer
0xdeadbeer / vfs-mount.sh
Created April 26, 2023 16:08
Mount VirtioFS on Linux
#!/bin/sh
# scripted by: @0xdeadbeer
# parameters: ./vfs-mount.sh [mount_tag] [mount_path]
mount -t virtiofs $1 $2