Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / KeyHistory.ahk
Created July 7, 2018 14:24
KeyHistory in AutoHotKey
#Persistent
#InstallKeybdhook
KeyHistory
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 / 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 ..
@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 / .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 / remove_unused_images.sh
Created February 27, 2018 21:26
Remove unused Docker images
#!/bin/sh
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
@wincentbalin
wincentbalin / remove_stopped_containers.sh
Created February 27, 2018 21:26
Remove stopped Docker containers
#!/bin/sh
docker rm $(docker ps -a -q)