Skip to content

Instantly share code, notes, and snippets.

@empathicqubit
empathicqubit / mirrorboard.ahk
Last active March 14, 2024 14:46
Semi-universal mirrorboard script. Mirrors layout when space is pressed in combination with keys
; Mirrors the left ten "columns" of keys on the keyboard when holding down space.
; So for the first row, 1 becomes 0, 2 becomes 9, and so on. It does this for
; all four rows: home, top, bottom, and number. This should work with any layout,
; theoretically. This layout is based on https://github.com/empathicqubit/mirrorboard-mac
; My layout varies slightly from Qubist's by only mirroring the number row over the hands,
; So the two keys to the right of the number row are not included. This is to preserve the
; hand symmetry better, at the cost of not being able to use some of the symbols on the
; right hand side of the keyboard without reaching. This could be a problem if you're
; coding or something. I think that you probably shouldn't try to code with this, but if
; you do, use your rìght hand.
@empathicqubit
empathicqubit / piano-text.vb
Last active November 22, 2021 21:52
GlovePIE script for typing using piano.
// GlovePIE script for typing using piano.
// A1 = enable/disable
// Left pinky at G4 = A
// Right pinky at A6 = ;
// HOME ROW (White keys):
// Left hand: <SHIFT> ASDF G <BOTTOM ROW SHIFT> <SPACE> <NUMBER ROW SHIFT>
// Right hand: <NUMBER ROW SHIFT> <SPACE> <BOTTOM ROW SHIFT> H JKL; <BACKSPACE> <ENTER>
// Black keys are top row:
// Left hand: G4b (Q), G4# (W), A4# (E), C5# (R), D5# (T)
// Right hand: C6# (Y), D6# (U), F6# (I), G6# (O), A6# (P)
@empathicqubit
empathicqubit / midi.vb
Created November 14, 2021 13:36
GlovePIE script for MIDI control
/* http://www.tobias-erichsen.de/software/loopmidi.html */
Var.XExists = XInput2.Exists
Var.A = XInput2.A
Var.B = XInput2.B
Var.X = XInput2.X
Var.Y = XInput2.Y
Var.Start = Xinput2.Start
Var.Back = Xinput2.Back
Var.ShoulderR = Xinput2.RightShoulder
Var.ShoulderL = Xinput2.LeftShoulder
@empathicqubit
empathicqubit / audio-cycler.user.js
Last active October 29, 2021 02:30
Subtitle cycling script - DOESN'T WORK YET
// ==UserScript==
// @name Audio Cycler
// @namespace http://entan.gl/
// @version 0.1
// @description Change the audio language every time the subtitles change.
// @author EmpathicQubit
// @match https://www.disneyplus.com/*/video/*
// @icon https://www.google.com/s2/favicons?domain=disneyplus.com
// @require https://unpkg.com/m3u8-parser@4.7.0/dist/m3u8-parser.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/vtt.js/0.13.0/vtt.js
@empathicqubit
empathicqubit / srtmerge.js
Last active October 1, 2021 05:51
Combine two SRT files into CSV for Anki
const fs = require('fs');
const util = require('util');
const net = require('net');
const child_process = require('child_process');
const colors = {
Reset : "\x1b[0m",
Bright : "\x1b[1m",
Dim : "\x1b[2m",
Underscore : "\x1b[4m",
@empathicqubit
empathicqubit / style.css
Created September 6, 2021 20:05
Protonmail stylesheet
article.message-container {
position: relative;
}
.message-attachments {
top: 0px;
position: absolute;
}
.message-container.is-opened > .message-header {
display: block;
margin-top: 15em;
#! /bin/bash
CURDIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
which patch diff curl java 2>/dev/null || { echo "You need patch, diff, curl, and java to continue" ; exit 1 ; }
TMP="$(mktemp -d "$CURDIR/gboard-tmp-XXXXXX")"
echo "Building in $TMP..."
cat <<'HERE' > "$TMP/patch.patch"