Skip to content

Instantly share code, notes, and snippets.

View rvanlaar's full-sized avatar

Roland van Laar rvanlaar

View GitHub Profile
@rvanlaar
rvanlaar / qtvr.hexpat
Last active August 12, 2023 21:19
QTVR.hexpat
#pragma endian big
#include <std/core.pat>
#include <std/fxpt.pat>
#include <std/io.pat>
#include <std/math.pat>
#include <std/mem.pat>
#include <std/string.pat>
#include <std/time.pat>
//#pragma debug
#pragma endian big
#include <std/core.pat>
#include <std/fxpt.pat>
#include <std/io.pat>
#include <std/math.pat>
#include <std/mem.pat>
#include <std/string.pat>
#include <std/time.pat>
@rvanlaar
rvanlaar / parse_qt.py
Created April 8, 2023 21:05
QT mrcrowbar
#!/usr/bin/env python3
"""MrCrowbar file for Quicktime movies
Specifiation is from: QuickTime File Format Specification
https://multimedia.cx/mirror/qtff-2007-09-04.pdf
All links in this file with #//apple... point to the relevant part in this document.
"""
@rvanlaar
rvanlaar / package.json
Created July 1, 2020 10:06
react storybook tutorial
{
"name": "taskbox",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
@rvanlaar
rvanlaar / mktag.py
Created June 22, 2020 13:05
Calculate Header TAGS
#!/usr/bin/env python3
import argparse
import operator
from functools import reduce
def mktag(tag: str) -> int:
letters = [i for i in tag]
letters.reverse()
@rvanlaar
rvanlaar / get_transip_jwt.sh
Last active April 30, 2022 00:10
Get TransIP JWT
#!/usr/bin/env bash
#
# Get a TRANSIP JWT to use for authenticated API requests
# https://api.transip.nl/rest/docs.html#header-authentication
#
# necessary commandline tools:
# jq
# curl
#
# Setting it up:
@rvanlaar
rvanlaar / hfscopy.py
Created May 30, 2020 17:40
Copies hfs files from a 'mounted' disk.
# Mount iso: hmount path/to/file.iso
# Do: hls -aqRF1 > files.txt
# and run: python hfscopy.py
# explanation
# -a Show all files
# -q print '?' instead of escaped chars
# -R descend into all directories
# -F enable file type flag, dir: executable:*
# -1 output 1 item per line
@rvanlaar
rvanlaar / .profile
Last active May 4, 2020 20:47
Scripts to use the correct nixGL paths
function use_nvidia_drivers() {
export LD_LIBRARY_PATH=/nix/store/xl3cr8kwlpi0j7il0zx4cb6sw05wx40g-libglvnd-1.2.0/lib:/nix/store/lhfyarm78k3lswp6xcvp51s9x4j6baq0-nvidia-440.64/lib:/nix/store/k8x3i9r3lyx4sv0wls45akvkk23bflg7-nvidia-440.64-lib32/lib:/nix/store/aw33ya4m2qmfjhvrxlvlw9gl28ixviya-libglvnd-1.2.0/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
}
function use_intel_drivers() {
export LIBGL_DRIVERS_PATH=/nix/store/vjcmnq73yj45bksaivwkzpzdc1vzf6yd-mesa-20.0.2-drivers/lib/dri:/nix/store/bdyq8k5kyp2lgva9vr03f04b18ys1vbg-mesa-20.0.2-drivers/lib/dri
export LD_LIBRARY_PATH=/nix/store/vjcmnq73yj45bksaivwkzpzdc1vzf6yd-mesa-20.0.2-drivers/lib:/nix/store/bdyq8k5kyp2lgva9vr03f04b18ys1vbg-mesa-20.0.2-drivers/lib:$LD_LIBRARY_PATH
}
if [ -f "$HOME/bin/is_egpu_connected.sh" ]; then
@rvanlaar
rvanlaar / backtrace.txt
Created December 21, 2019 11:45
scummvm backtrace
#0 0x00007ffff6cb63eb in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6c95899 in __GI_abort () at abort.c:79
#2 0x00007ffff6d0038e in __libc_message
(action=action@entry=do_abort, fmt=fmt@entry=0x7ffff6e293a5 "%s\n")
at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff6d084dc in malloc_printerr
(str=str@entry=0x7ffff6e274b6 "corrupted size vs. prev_size") at malloc.c:5332
#4 0x00007ffff6d08b4b in unlink_chunk
(p=p@entry=0x555558be6710, av=0x7ffff6e5ab80 <main_arena>) at malloc.c:1454
@rvanlaar
rvanlaar / Director.md
Last active November 23, 2019 15:24
Ongoing documentation about the SCUMMVM director engine.

Goals

The wanted outcome is to be able to play safecracker and traitor's gate via https://scummvm.org . To achieve this, there are a few goals:

  • get other people on board
  • Document current knowledge about the format so that other can pick it up quickly.
  • Get a feeling for how Director works and the internal file layout works
  • Figure out what does and doesn't work in the engine