Skip to content

Instantly share code, notes, and snippets.

View bojidar-bg's full-sized avatar

Bojidar Marinov bojidar-bg

View GitHub Profile
@bojidar-bg
bojidar-bg / Connection.i
Last active December 29, 2023 13:47
Virtual machine interaction net bootstrap for https://inet.run/playground/
require "./SymbolMap.i" // Diamond imports don't work
// import { List, null } from "./List.i"
// import { del, delOut, dup, dupOut } from "./Generic.i"
type Edge
type Connection
node pos(
edge: Edge,
@bojidar-bg
bojidar-bg / unsilence.sh
Last active March 15, 2024 14:33
Unsilence w/ MLT
#!/usr/bin/env bash
set -e
if [ "$#" -ne 4 ]; then
echo "Usage: $0 source-file silencedetect-args speedup-factor output-file"
echo " E.g.: $0 file.mkv n=-35dB:d=0.25 2.5 file.mlt"
exit 1;
fi
@bojidar-bg
bojidar-bg / layout-switcher.snip.sh
Created April 11, 2024 07:50
Change keyboard layout programatically and reload - kwin_wayland
# Go to Colemak
kwriteconfig6 --file kxkbrc --group Layout --key Model pc104awide
kwriteconfig6 --file kxkbrc --group Layout --key LayoutList us,bg
kwriteconfig6 --file kxkbrc --group Layout --key Options grp:alt_shift_toggle,grp:win_space_toggle,caps:backspace,lv3:ralt_switch_multikey,compose:menu
kwriteconfig6 --file kxkbrc --group Layout --key VariantList cmk_ed_dh,colemak_dh
dbus-send --session --type=signal --reply-timeout=100 --dest=org.kde.keyboard /Layouts org.kde.keyboard.reloadConfig
# Back to QWERTY