Skip to content

Instantly share code, notes, and snippets.

wincentbalin /
Last active May 13, 2018
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
# Compile LibUTF
cd grctraining/tools/libutf
make CFLAGS="-ansi -pedantic -O2 -Wall -Wextra"
cd ..
wincentbalin /
Last active Mar 20, 2018
Attempt to compile static binaries for qt-box-editor using MXE
# Compile qt-box-editor for win32
# Set amount of MXE parallel compiling jobs
if [ "$JOBS" = "" ]
export JOBS
wincentbalin / .dockerignore
Created Mar 17, 2018
Attempt to compile static binaries for qt-box-editor
View .dockerignore
wincentbalin /
Created Feb 27, 2018
Remove unused Docker images
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
wincentbalin /
Created Feb 27, 2018
Remove stopped Docker containers
docker rm $(docker ps -a -q)
wincentbalin /
Last active Jan 3, 2018
Create calendar form on a A4 page
pcal -o -P a4 -M -F 1 -E 01 2018
wincentbalin / main.cpp
Created Dec 22, 2017
Get SQLite compile_options from Qt SQLite
View main.cpp
#include <QCoreApplication>
#include <QTextStream>
#include <QSqlDatabase>
#include <QSqlQuery>
int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
QTextStream out(stdout);
QTextStream err(stderr);
wincentbalin / idle.bat
Created Dec 15, 2017
Run IDLE from a batch file
View idle.bat
@echo off
if "%1" == "" goto start_without_arguments
start /B python -m idlelib.idle %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /B
python -m idlelib.idle
wincentbalin /
Last active Nov 1, 2017
How to cut videos automatically using FFMPEG
#!/usr/bin/env python
Cut videos specified in the description file using FFMPEG.
import os
import sys
import subprocess
import argparse
wincentbalin / command.js
Created Oct 28, 2017
Dump innerHTML at Firefox console
View command.js
$x('//div[@class="content"]').forEach(function(el) { console.log(el.innerHTML); console.log('----'); })