Skip to content

Instantly share code, notes, and snippets.

Avatar
🔗
Working on the maven-jlink-plugin in my free time

Benjamin Marwell bmarwell

🔗
Working on the maven-jlink-plugin in my free time
View GitHub Profile
@bmarwell
bmarwell / palettes.adoc
Last active Apr 27, 2020
Zelda3/ALttP item palettes
View palettes.adoc
Palette Name Palette Graphic ID Chest ID Overworld

Green

80360913 5e72e180 8880 11ea 935f fa97933b6b29

0x04

0x08

Blue

80360915 5f0b7800 8880 11ea 88da 3350c7323f46

0x02

0x04

@bmarwell
bmarwell / chunking.yml
Last active May 20, 2019
zchunk splitter proposal
View chunking.yml
yaml:
extensions:
- ".yaml"
- ".yml"
split:
type: string-before
separators:
- "\0-"
- "\0[a-zA-Z]"
min_chunk_size: 10240
@bmarwell
bmarwell / isorename.sh
Created Apr 28, 2018
Rename JPG image files to a standardized iso format
View isorename.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
NOOP=${1:-}
COUNTER=0
if [ "$NOOP" == "-n" ]; then
echo "Simulation mode. -n given."
fi
@bmarwell
bmarwell / .netrc
Last active Dec 20, 2019 — forked from gbrks/btrfs-scrub
btrfs scrub: script and systemd timers to run weekly and send mails using gmail via curl + netrc
View .netrc
machine smtp.gmail.com
login user@gmail.com
password my-app-password
@bmarwell
bmarwell / Minecraft Log Lexer for Python Pygments
Created Oct 16, 2014
Use like this: 'zcat /opt/mcserver/bin/spigot/logs/2014-10-15-1.log.gz | tail -n 200 | pygmentize -l log' or just 'pygmentize /opt/mcserver/bin/spigot/logs/latest.log'.
View Minecraft Log Lexer for Python Pygments
from pygments.lexer import RegexLexer, bygroups
from pygments.token import *
__all__ = [ 'LogLexer' ]
class LogLexer(RegexLexer):
"""
Lexer for (minecraft) Log files.
"""
View one line check for certificate digest algorithm
CF=mktemp; openssl s_client -showcerts -connect host:port </dev/null > "$CF" 2>/dev/null; openssl x509 -in "$CF" -text -noout | grep "Signature Algorithm" | uniq; rm "$CF"