Skip to content

Instantly share code, notes, and snippets.

@wincentbalin
wincentbalin / .dockerignore
Created March 17, 2018 15:30
Attempt to compile static binaries for qt-box-editor
README.md
compile_qt-box-editor.sh
qt-box-editor-win32.zip
@wincentbalin
wincentbalin / qt-box-editor-compile.sh
Last active March 20, 2018 05:39
Attempt to compile static binaries for qt-box-editor using MXE
#!/bin/sh
#
# Compile qt-box-editor for win32
# Set amount of MXE parallel compiling jobs
if [ "$JOBS" = "" ]
then
JOBS=1
export JOBS
fi
@wincentbalin
wincentbalin / compile-gcr-tools.sh
Last active May 13, 2018 20:49
How to compile gcrtraining tools for win32
# Install pre-requisites (pango is needed for xheights)
sudo apt install build-essential libpango1.0-dev
# Clone gcrtraining repository
git clone https://ancientgreekocr.org/grctraining.git
# Compile LibUTF
cd grctraining/tools/libutf
make CFLAGS="-ansi -pedantic -O2 -Wall -Wextra"
cd ..
import re
def clean_html(html):
"""
Remove HTML markup from the given string.
:param html: the HTML string to be cleaned
:type html: str
:rtype: str
@wincentbalin
wincentbalin / KeyHistory.ahk
Created July 7, 2018 14:24
KeyHistory in AutoHotKey
#Persistent
#InstallKeybdhook
KeyHistory
@wincentbalin
wincentbalin / rewrap.py
Created August 1, 2018 20:28
Text file rewrapping script
#!/usr/bin/env python3
"""Rewrap lines without breaking words"""
import sys
import argparse
import textwrap
argparser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
argparser.add_argument('infile', type=argparse.FileType('r', encoding='UTF-8'))
@wincentbalin
wincentbalin / audiobuttons.html
Last active September 17, 2018 21:20
Simple browser-based sampler
<!DOCTYPE html>
<html>
<head>
<title>Audio buttons</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
html,
body
{
@wincentbalin
wincentbalin / abc2svg.html
Last active October 31, 2018 15:19
Convert ABC to SVG
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>abc2svg test</title>
<style>
#output {
position: absolute;
top: 0;
right: 0
@wincentbalin
wincentbalin / make_me.sh
Created January 14, 2019 21:07
Mode switcher for USB armory
#!/bin/sh
#
# Function switcher for USB armory
if [ $# -eq 0 -o $# -eq 1 -a \( "$1" != "stick" -a "$1" != "stick-win" -a "$1" != "stick-mac" -a "$1" != "host" \) ]
then
echo "Usage: $0 stick|stick-win|stick-mac|host"
exit 1
fi
--- export/batch_tester/batch_tester.cc.orig 2016-02-09 12:38:34.000000000 +0000
+++ export/batch_tester/batch_tester.cc 2019-04-27 20:04:32.358891300 +0000
@@ -37,11 +37,11 @@
using thrax::GrmManager;
using thrax::InputBuffer;
using thrax::OpenOrDie;
-using thrax::Split;
+//using thrax::Split;
-typedef StringCompiler<StdArc> Compiler;