Skip to content

Instantly share code, notes, and snippets.

@NotAFile
NotAFile / convert_config.py
Created November 27, 2019 17:02
Piqueserver Config converter
import pkgutil
import piqueserver.scripts
import json
import toml
import sys
def time_unit(dic, key, unit="min"):
if dic is not None and key in dic:
dic[key] = "{}{}".format(int(dic[key]), unit)

Keybase proof

I hereby claim:

  • I am notafile on github.
  • I am notafile (https://keybase.io/notafile) on keybase.
  • I have a public key whose fingerprint is 034E DAFD FA37 026C 9E0F 460F F75A 88B3 0EB4 D88E

To claim this, I am signing this object:

@NotAFile
NotAFile / read_font_file.py
Created February 1, 2018 23:59
Quick and dirty reader for HMZK font files
import fileinput
import sys
import struct
MAIN_SECTION_OFFSET = 0x10
def bin_picture(num):
fmt = "{:016b}".format(num)
fmt = fmt.replace("0", ".")
fmt = fmt.replace("1", "#")
/*
Copyright (c) 2013 yvt
This file is part of OpenSpades.
OpenSpades is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.