Skip to content

Instantly share code, notes, and snippets.

View BenLubar's full-sized avatar

Ben Lubar BenLubar

View GitHub Profile
@BenLubar
BenLubar / asrd-manri.go
Last active August 21, 2024 16:23
script to convert zbalermorna font manri to AS:RD's precomposed ligature version
// other changes are done within fontforge:
//
// 1. auto-hint
// 2. change em-height from 1000 to 1024 (scaling outlines)
// 3. clean up citonga by making it just be lines and corners
// 4. export to TTF
package main
import (
package main
import (
"bufio"
"bytes"
"encoding/binary"
"io"
"os"
)
@BenLubar
BenLubar / base.go
Created July 10, 2021 15:07
to be clear, none of these compile, and not just because of the syntax errors
package main
import "git.lubar.me/ben/spy-cards/card"
func main() {
var def card.Def
def.ID = card.Delilah
def.Effects = []*card.EffectDef{
{
Conversation Flow ([ and ] represent 0 or more repetitions):
c->s handshake_request
s->c handshake_reply
[
c->s request
[
s->c text
]
s->c (result OR fail)
local dfplex = Proto("dfplex", "Dwarf Fortress Multiplexer")
local cmds = {
[0x6e] = "update",
[0x6f] = "sendKey",
[0x73] = "connect",
[0x75] = "resize",
[0x76] = "requestTurn"
}
local colors = {

I wish Ghidra could understand these constructs (or alternatively, I knew how to tell Ghidra to override these incorrectly decompiled statements)

Multi-field assignments

Simple example:

struct
{
 int16_t x;
int32_t add_to_vector(building *item,vector<building *> *vec)
{
int32_t size;
int32_t current_index;
int32_t current_index_00;
building **new_start;
building **new_start_00;
size_t old_size;
size_t old_size_00;
@BenLubar
BenLubar / LICENSE
Last active June 23, 2019 14:47
JSLint license with IBM exception
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://gist.githubusercontent.com/BenLubar/55938e0334a6ddac3aa286aafb7277da/raw/actor.json",
"name": "Test Actor",
"type": "Service"
}