Skip to content

Instantly share code, notes, and snippets.

View eloj's full-sized avatar

Eddy Jansson eloj

View GitHub Profile
@eloj
eloj / Gigabyte-M32U-edid.txt
Created December 8, 2024 13:27
Gigabyte M32U EDID
00 ff ff ff ff ff ff 00 1c 54 04 32 6e 0b 00 00
08 22 01 04 b5 46 27 78 3b e1 b5 ad 50 45 a0 25
0d 50 54 bf cf 00 81 40 81 80 95 00 71 4f 81 c0
b3 00 d1 c0 01 01 4d d0 00 a0 f0 70 3e 80 30 20
35 00 b9 88 21 00 00 1a 00 00 00 ff 00 32 34 30
38 31 42 30 30 32 39 32 36 0a 00 00 00 fd 00 30
90 ff ff 86 01 0a 20 20 20 20 20 20 00 00 00 fc
00 47 69 67 61 62 79 74 65 20 4d 33 32 55 02 b3
02 03 3c f1 56 01 03 04 13 1f 12 02 11 90 0f 0e
@eloj
eloj / AcerXF270HU-edid.txt
Created December 8, 2024 13:22
Acer XF270HU EDID
00 ff ff ff ff ff ff 00 04 72 49 05 41 5d 00 74
28 1b 01 04 b5 3c 22 78 3f 0c 95 ab 55 4c a0 24
0d 50 54 bf ef 80 71 4f 81 40 81 80 81 c0 81 00
95 00 b3 00 d1 c0 56 5e 00 a0 a0 a0 29 50 30 20
35 00 55 50 21 00 00 1a 00 00 00 fd 00 28 90 de
de 3c 01 0a 20 20 20 20 20 20 00 00 00 fc 00 58
46 32 37 30 48 55 0a 20 20 20 20 20 00 00 00 ff
00 54 37 38 45 45 30 30 34 38 35 32 31 0a 01 52
02 03 18 f1 4b 01 02 03 04 05 90 11 12 13 14 1f
@eloj
eloj / cpuid-brand.c
Created November 15, 2024 21:33
Retrieve the CPU brand using CPUID (GCC/clang/MSVC)
/*
Retrieve the CPU brand using CPUID.
<@el0j@mastodon.gamedev.place>
*/
#include <stdio.h>
#include <string.h>
#if defined(__x86_64__) || defined(_M_X64)
#define IS_X86_64 1
#else
@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.
Loading
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: