Skip to content

Instantly share code, notes, and snippets.

@Mardeg
Mardeg / init.lua
Created February 4, 2026 21:25
Character count in TextAdept statusbar
-- Add character count to status bar
events.connect(events.UPDATE_UI, function()
local char_count = buffer.length
-- Update the status bar (left side)
ui.statusbar_text = "Chars: " .. char_count
end)
@Mardeg
Mardeg / gist:7a0e34a9e5a707599d03e1c5f242be7c
Created September 5, 2024 00:35
Bingo card randomiser (binary digits) using the angle of the second hand from analog clock
function RandomBits(b) {
let n = "",
p = document.getElementById("pang").transform.animVal[0];
if((p)&&(p.angle>0)){
p=p.angle.toFixed(Math.floor(Math.random() * 14)).at(-1);
}
let q=p?p:Math.random().toFixed();
if (q & 1)
while (n.length < b) n += Math.random().toFixed();
else {
@Mardeg
Mardeg / SVGtetris.svg
Last active October 5, 2020 06:22
SVG Tetris
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.