Skip to content

Instantly share code, notes, and snippets.

View eloj's full-sized avatar

Eddy L O Jansson eloj

View GitHub Profile
@eloj
eloj / amigahand-simple.svg
Created September 12, 2021 20:51
Amiga Kickstart 1.2/1.3 hand in SVG format by @el0j. Missing some black fills.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eloj
eloj / roll-ability.py
Created July 20, 2021 20:21
Roll for D20/D&D 5ed ability scores (python)
#!/usr/bin/env python3
#
# Roll for D20/D&D 5ed ability scores.
# Using procedure in Player's Handbook for D&D 5ed, p13.
# "Roll four 6-sided dice and record the total of the highest three"
#
import random
total = 0
for i in range(6):
@eloj
eloj / unalignsignal.c
Created May 5, 2021 08:27
Using IA32/AMD64 Alignment Check-bit to error on unaligned access
/*
Code not originally by me.
OS must allow changing the status bit (linux does so far)
*/
#include <stdlib.h>
int main(int argc, char **argv)
{
int *iptr;
char *cptr;
@eloj
eloj / mixlr-dl
Created August 14, 2020 18:45
mixlr download script (req. ffmpeg)
#/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <broadcast id>"
echo ""
echo "You can get the broadcast id from the player element on the showreel page, e.g http://mixlr.com/jeff-gerstmann/showreel/"
exit 1
fi
ffmpeg -i "http://mixlr.com/broadcasts/$1/playlist.m3u8" -acodec copy $1.mp3

Keybase proof

I hereby claim:

  • I am eloj on github.
  • I am eddy (https://keybase.io/eddy) on keybase.
  • I have a public key whose fingerprint is 4C4E 5438 B919 A2F4 BDE1 7CAE 614D 2646 8CF6 5091

To claim this, I am signing this object: