Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / gist:2de38a4f2a8accdcc0f21c1bb0c65a09
Created February 12, 2025 19:04
Sync troubles with SB...
Plug updated, reloading index from _plug/index.plug.js client_system.ts:140:18
Booting up worker for index worker_sandbox.ts:33:12
GET
http://silverbullet.local:12345/_plug/index.plug.js
[HTTP/1.1 304 Not Modified 43ms]
Activated plug index system.ts:161:12
[sync] New file created on secondary, copying from secondary to primary _plug/plug-manager.plug.js sync.ts:157:14
Plug updated, reloading plug-manager from _plug/plug-manager.plug.js client_system.ts:140:18
Booting up worker for plug-manager worker_sandbox.ts:33:12
@mjf
mjf / formatNumber.lua
Last active January 29, 2025 07:12
Simple number formatter in Lua
-- Function formatNumber - Simple number formatter
-- Copyright (C) 2025 Matous Jan Fialka, <https://mjf.cz/>
-- Released under the terms of the "MIT" license
local function formatNumber(format, ...)
local args = { ... }
local argind = 1
local res = ''
local i = 1
@mjf
mjf / radix_fun.lua
Last active January 17, 2025 11:49
Radix functions in Lua (including example usage and a test suite)
local function from_radix(digits, base)
local ip = 0
local fp = 0
local dp = nil
for i, v in ipairs(digits) do
if v == "." then
dp = i
break
end
if type(v) ~= "number" then
@mjf
mjf / Linux-ML-refs.md
Last active August 23, 2024 10:58
Linux mailing lists references
@mjf
mjf / userChrome.css
Created February 8, 2024 08:56
Fix Firefox textarea ligature rendering bug
/**
* Get your profile from about:support page.
* Create ~/.mozilla/firefox/<profile>/chrome directory.
* Place to ~/.mozilla/firefox/<profile>/chrome/userContent.css file.
* Run restorecon -R -F ~/.mozilla/firefox/<profile>/chrome on SELinux-enabled distros.
* Set toolkit.legacyUserProfileCustomizations.stylesheets to true in about:config page.
* Restart Firefox and it should be working.
*/
@-moz-document domain("www.example.com") {
@mjf
mjf / qemu_hmp_qmp.inc.sh
Last active February 7, 2024 14:06
KVM/QEMU/LibVirt HMP/QMP shell functions
#! /bin/sh
# KVM/QEMU/LibVirt HMP/QMP shell functions
# Copyright (C) 2024 Matous Jan Fialka, <https://mjf.cz/>
# Released under the terms of the "MIT" license
# Usage: qmp [DOMAIN [COMMAND]]
qmp() {
case "$#" in
@mjf
mjf / llm-generated.md
Created January 17, 2024 13:38
LLM-generated websites and stuff
@mjf
mjf / rust.md
Last active January 7, 2025 10:17
Rust Programming Language
@mjf
mjf / tmux.conf
Last active October 12, 2023 13:11
tmux(1) synchronize panes toggling
set -g status-style 'bg=green fg=black'
set -g status-position top
set -g message-style 'bg=yellow fg=black'
set -g pane-border-status bottom
set -g pane-border-style 'bg=black fg=white dim'
set -g pane-active-border-style 'bg=black fg=cyan'
set -g pane-border-format "#{?pane_active,#[reverse],#[default]} #{pane_title} (#{pane_index}) "
@mjf
mjf / Blogs.md
Last active February 28, 2025 10:13
BLOGS