Skip to content

Instantly share code, notes, and snippets.

View bmarwell's full-sized avatar

Benjamin Marwell bmarwell

View GitHub Profile
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"
@bmarwell
bmarwell / Minecraft Log Lexer for Python Pygments
Created October 16, 2014 11:04
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'.
from pygments.lexer import RegexLexer, bygroups
from pygments.token import *
__all__ = [ 'LogLexer' ]
class LogLexer(RegexLexer):
"""
Lexer for (minecraft) Log files.
"""
@bmarwell
bmarwell / .netrc
Last active December 20, 2019 23:08 — forked from gbrks/btrfs-scrub
btrfs scrub: script and systemd timers to run weekly and send mails using gmail via curl + netrc
machine smtp.gmail.com
login user@gmail.com
password my-app-password
@bmarwell
bmarwell / isorename.sh
Created April 28, 2018 09:50
Rename JPG image files to a standardized iso format
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
NOOP=${1:-}
COUNTER=0
if [ "$NOOP" == "-n" ]; then
echo "Simulation mode. -n given."
fi
@bmarwell
bmarwell / chunking.yml
Last active May 20, 2019 08:44
zchunk splitter proposal
yaml:
extensions:
- ".yaml"
- ".yml"
split:
type: string-before
separators:
- "\0-"
- "\0[a-zA-Z]"
min_chunk_size: 10240
@bmarwell
bmarwell / palettes.adoc
Last active April 27, 2020 10:14
Zelda3/ALttP item palettes
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 / openj9-freebsd.patch
Created August 11, 2022 19:33
openj9 build patch
diff --git a/closed/autoconf/custom-hook.m4 b/closed/autoconf/custom-hook.m4
index 774049757..95abbf7dc 100644
--- a/closed/autoconf/custom-hook.m4
+++ b/closed/autoconf/custom-hook.m4
@@ -457,8 +457,11 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
elif test "x$OPENJDK_BUILD_OS" = xmacosx ; then
OPENJ9_PLATFORM_CODE=oa64
OPENJ9_BUILD_OS=osx
+ elif test "x$OPENJDK_BUILD_OS" = xbsd ; then
+ OPENJ9_PLATFORM_CODE=ba64