Skip to content

Instantly share code, notes, and snippets.

@AlexanderMakarov
AlexanderMakarov / 0001-fix-extensibility-restore-DefaultPackageManager-and-.patch
Created July 16, 2026 05:31
OMP fix: DefaultPackageManager shim + linkedom CJS interop for pi-task (#5658)
From ad3e61196994245b79d05002d87f1bab3db6519e Mon Sep 17 00:00:00 2001
From: 4ellendger <4ellendger@gmail.com>
Date: Thu, 16 Jul 2026 09:27:24 +0400
Subject: [PATCH] fix(extensibility): restore DefaultPackageManager and
linkedom CJS interop
Legacy pi extensions such as @mjasnikovs/pi-task fail to load under OMP
because the legacy-pi-coding-agent-shim does not export DefaultPackageManager
and CommonJS dependencies like linkedom/canvas.cjs are served through async
onLoad hooks without a default export interop layer.
@AlexanderMakarov
AlexanderMakarov / sync_cursor_to_claude_commands.sh
Created February 4, 2026 09:10
Update Claude code "Allowlist" from Cursor settings.
#!/bin/bash
set -euo pipefail
CURSOR_DB="${HOME}/.config/Cursor/User/globalStorage/state.vscdb"
CLAUDE_SETTINGS="${HOME}/.claude/settings.json"
KEY="src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.applicationUser"
ALLOWLIST_PATH="\$.composerState.yoloCommandAllowlist"
if [ ! -f "$CURSOR_DB" ]; then
@AlexanderMakarov
AlexanderMakarov / gcal_notifier.py
Last active February 2, 2026 06:33
Google Calendar Notifier script for Linux to don't miss in-browser notifications. Expected to poll GCal periodically via systemd timer.
#!/usr/bin/env python3
"""
Google Calendar Notifier — checks Calendar API and shows desktop notifications via notify-send.
Run via a user systemd timer (runs as you, so notifications and link clicks use your session).
Prerequisites:
gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/calendar.readonly
gcloud auth application-default set-quota-project YOUR_PROJECT_ID # if API requires it
pip install requests
@AlexanderMakarov
AlexanderMakarov / mkv_track_manager.py
Last active January 31, 2026 18:00
Interactive Python 3 script to remove audio and subtitle tracks from MKV video files without touching video track(s). Requires mkvmerge (mkvtoolnix) or (slower) ffmpeg and ffprobe CLI installed.
#!/usr/bin/env python3
import sys
import json
import subprocess
import shutil
import os
import re
import threading
import time
@AlexanderMakarov
AlexanderMakarov / sync_encrypt.sh
Last active April 21, 2024 12:20
Script for regular encrypted backups an restoring of specific folders and filterable files on Gdrive.
#!/bin/bash -xeE
set -o pipefail
# Idea: archive files or folders (tar), next encrypt archives (7z), push into GDrive (rclone).
# Prerequisits:
# - (usually already here) install 7za/7z - `sudo apt-get install p7zip-full`/`brew install p7zip`
# If executable has another name then need to see in script how it is used and correct.
# - install rclone and setup - https://ostechnix.com/install-rclone-in-linux/ or `brew install rclone`
# https://ostechnix.com/mount-google-drive-using-rclone-in-linux/ and don't set password for the configuration
# - set right values into variables (upper-cased, right below description).
#!/usr/bin/env python3
import os
import bencode
import re
import sys
# Inspired by https://github.com/ctminime/QB_Migrate_to_Linux
# Need `pip3 install bencode.py`.
# Run in folder like "/home/user/.local/share/data/qBittorrent/BT_backup/" (configured in qBitTorrent).
# Takes 2 parameters: