Skip to content

Instantly share code, notes, and snippets.

View Willem3141's full-sized avatar
πŸ‘‹

Willem Sonke Willem3141

πŸ‘‹
View GitHub Profile
@Willem3141
Willem3141 / duality.lua
Created February 25, 2025 14:44
Ipelet that applies point-line duality
label = "Duality"
about = [[
Applies point-line duality to line segments and marks.
]]
function dualize(model,num)
local t = { label = label,
pno = model.pno,
vno = model.vno,
@Willem3141
Willem3141 / increment.lua
Created February 17, 2025 18:25
Ipelet that allows incrementing and decrementing numeric labels (written by Tim Ophelders)
label = "Increment"
about = [[
Increment the first numerical value in selected text objects.
]]
function foo(model,num)
local f
if num == 1 then
f = function (v) return v+1 end
@Willem3141
Willem3141 / measure.lua
Created February 17, 2025 18:22
Ipelet that measures the area of a polygon
label = "Measure"
about = [[
Measures areas of polygons
]]
function measure(model, num)
local p = model.doc[model.pno]
if p:primarySelection() == nil then
@Willem3141
Willem3141 / convert.py
Created October 3, 2024 11:40
Convert Trekarta .mtrack files to GPX
# To generate Track_pb2.py:
# * get app/src/main/java/mobi/maptrek/io/Track.proto from the Trekarta repo
# * run `protoc --python_out=. Track.proto`
from datetime import datetime
import Track_pb2
import sys
track = Track_pb2.Track()
@Willem3141
Willem3141 / caun-additions.json
Created August 18, 2019 16:16
Plover dictionary to correct missing KAUN- words
{
"KAUPB/*ER": "Conner",
"KAUPB/-D": "conned",
"KAUPB/-FPS": "conches",
"KAUPB/-RBS": "conscious",
"KAUPB/AO*E": "Connie",
"KAUPB/EBGS/*EUPB": "connexin",
"KAUPB/EBGS/O*PB": "connexon",
"KAUPB/ED": "Con Ed",
"KAUPB/ED/SO*PB": "Con Edison",
@Willem3141
Willem3141 / con-caun-similarities.txt
Created August 18, 2019 15:57
KON- words in Plover's main.json that are also defined with KAUN- (directly or because of the KAUN- prefix)
KOPB/KA*EUF -> 'concave' (KAUPB/KA*EUF -> undefined, KAUPB + KA*EUF -> 'concave' βœ”)
KOPB/KAT/TPHAEUGS -> 'concatenation' (KAUPB/KAT/TPHAEUGS -> 'concatenation' βœ”)
KOPB/KAT/TPHAEUT -> 'concatenate' (KAUPB/KAT/TPHAEUT -> 'concatenate' βœ”)
KOPB/KER -> 'conquer' (KAUPB/KER -> 'conquer' βœ”)
KOPB/KHRAOUD -> 'conclude' (KAUPB/KHRAOUD -> 'conclude' βœ”)
KOPB/KHRAOUDZ -> 'concludes' (KAUPB/KHRAOUDZ -> 'concludes' βœ”)
KOPB/KHRAOUGS -> 'conclusion' (KAUPB/KHRAOUGS -> 'conclusion' βœ”)
KOPB/KHRAOUS/*EUF -> 'conclusive' (KAUPB/KHRAOUS/*EUF -> 'conclusive' βœ”)
KOPB/KOBGT -> 'concoct' (KAUPB/KOBGT -> 'concoct' βœ”)
KOPB/KOPL/TAPBT -> 'concomitant' (KAUPB/KOPL/TAPBT -> 'concomitant' βœ”)
@Willem3141
Willem3141 / con-caun-differences.txt
Created August 18, 2019 15:55
KON- words in Plover's main.json that are not defined with KAUN-
KOPB/*ER -> 'Conner' (KAUPB/*ER -> undefined, KAUPB + *ER -> 'con{^er}' ✘)
KOPB/-D -> 'conned' (KAUPB/-D -> undefined, KAUPB + -D -> 'con{^ed}' ✘)
KOPB/-FPS -> 'conches' (KAUPB/-FPS -> undefined, KAUPB + -FPS -> 'con{^s}{.}' ✘)
KOPB/-RBS -> 'conscious' (KAUPB/-RBS -> undefined, KAUPB + -RBS -> 'con{,}' ✘)
KOPB/AO*E -> 'Connie' (KAUPB/AO*E -> undefined, KAUPB + AO*E -> 'con{^ie}' ✘)
KOPB/EBGS/*EUPB -> 'connexin' (KAUPB/EBGS/*EUPB -> undefined, KAUPB + EBGS/*EUPB -> undefined ✘)
KOPB/EBGS/O*PB -> 'connexon' (KAUPB/EBGS/O*PB -> undefined, KAUPB + EBGS/O*PB -> 'conExxon' ✘)
KOPB/ED -> 'Con Ed' (KAUPB/ED -> undefined, KAUPB + ED -> 'conEd' ✘)
KOPB/ED/SO*PB -> 'Con Edison' (KAUPB/ED/SO*PB -> undefined, KAUPB + ED/SO*PB -> 'conEdison' ✘)
KOPB/ED/SOPB -> 'Con Edison' (KAUPB/ED/SOPB -> undefined, KAUPB + ED/SOPB -> undefined ✘)
@Willem3141
Willem3141 / listing
Created August 13, 2019 21:56
sass generating invalid relative jumps
main.asm :13 (0x000017): 18 80 jr .label
main.asm :14 (0x000019): .fill 128, 0x00
main.asm :16 (0x000099):
@Willem3141
Willem3141 / oxygencolors.sty
Created January 23, 2015 15:57
Oxygen colors for LaTeX
% This package provides the Oxygen color scheme for LaTeX.
% See also https://techbase.kde.org/Projects/Oxygen/Style#Color_Usage
% The Oxygen color palette and this package are released under the Creative
% Commons Attribution-NonCommercial-NoDerivs 2.5 License.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{oxygencolors}[2015/01/23 Oxygen colors for LaTeX]
@Willem3141
Willem3141 / z80-asm.txt
Created January 13, 2015 16:17
Kate syntax highlighting XML file for Z80 assembly (sass/KnightOS style)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="z80 Assembler" section="Assembler" extensions="*.asm;*.z80" casesensitive="0" author="Willem Sonke ([email protected])" license="LGPL">
<general>
<comments>
<comment name="singleLine" start=";" />
</comments>
</general>