Skip to content

Instantly share code, notes, and snippets.

@wincentbalin
wincentbalin / .dockerignore
Created Mar 17, 2018
Attempt to compile static binaries for qt-box-editor
View .dockerignore
README.md
compile_qt-box-editor.sh
qt-box-editor-win32.zip
@wincentbalin
wincentbalin / qt-box-editor-compile.sh
Last active Mar 20, 2018
Attempt to compile static binaries for qt-box-editor using MXE
View qt-box-editor-compile.sh
#!/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
How to compile gcrtraining tools for win32
View compile-gcr-tools.sh
# 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 ..
View clean_html.py
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 Jul 7, 2018
KeyHistory in AutoHotKey
View KeyHistory.ahk
#Persistent
#InstallKeybdhook
KeyHistory
@wincentbalin
wincentbalin / rewrap.py
Created Aug 1, 2018
Text file rewrapping script
View rewrap.py
#!/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 Sep 17, 2018
Simple browser-based sampler
View audiobuttons.html
<!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 Oct 31, 2018
Convert ABC to SVG
View abc2svg.html
<!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 Jan 14, 2019
Mode switcher for USB armory
View make_me.sh
#!/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
View batch_tester.patch
--- 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;