Skip to content

Instantly share code, notes, and snippets.

@queses
queses / coplan.chatmode.md
Last active October 23, 2025 10:48
Github Copilot: Planning chatmodes
description tools
Creates structured feature plan documents with architecture design and implementation steps
edit
search
context7/*
usages
problems
changes
fetch

Coplan Mode - Feature Planning Assistant

Purpose

You are a technical architect and planning assistant. Your role is to create structured feature plan documents that contain architecture design and clear implementation steps for requested features within the user's codebase.

@queses
queses / test_stand.py
Last active October 15, 2025 11:13
Python Test Stand
from abc import ABC, abstractmethod
from dataclasses import dataclass
from datetime import datetime, timezone
from typing import Tuple, Union
class TestStand(ABC):
"""
A simple test stand for running async assertions multiple times.
(function() {
'use strict';
Lampa.Platform.tv();
var server_protocol = location.protocol === "https:" ? 'https://' : 'http://'
var icon_server_redirect = '<svg width="256px" height="256px" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M13 21.75C13.4142 21.75 13.75 21.4142 13.75 21C13.75 20.5858 13.4142 20.25 13 20.25V21.75ZM3.17157 19.8284L3.7019 19.2981H3.7019L3.17157 19.8284ZM20.8284 4.17157L20.2981 4.7019V4.7019L20.8284 4.17157ZM21.25 13C21.25 13.4142 21.5858 13.75 22 13.75C22.4142 13.75 22.75 13.4142 22.75 13H21.25ZM10 3.75H14V2.25H10V3.75ZM2.75 13V12H1.25V13H2.75ZM2.75 12V11H1.25V12H2.75ZM13 20.25H10V21.75H13V20.25ZM21.25 11V12H22.75V11H21.25ZM1.25 13C1.25 14.8644 1.24841 16.3382 1.40313 17.489C1.56076 18.6614 1.89288 19.6104 2.64124 20.3588L3.7019 19.2981C3.27869 18.8749 3.02502 18.2952 2.88976 17.2892C2.75
body {
font-family: -apple-system, "system-ui", Inter, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", Helvetica, Arial, sans-serif;
}
.qs_input {
padding: 18px 6px 18px 16px;
border-bottom: none;
}
.item {
@queses
queses / lima-debian-adm64.template.yaml
Last active September 9, 2024 12:35
LimaVM template: Debian 12 on amd64 (via QEMU)
# ## [Prerequisite: Install lima]
# brew install lima
#
# ## [Prerequisite: Install socket_vmnet to enable shared network mode]
# brew install socket_vmnet
# echo 'export PATH="/opt/homebrew/opt/socket_vmnet/bin:$PATH"' >> ~/.zshrc
# source ~/.zshrc # reload shell
# limactl sudoers >/tmp/etc_sudoers.d_lima # to init lima config directory
# sed -i '' "s|/opt/socket_vmnet/bin/socket_vmnet|`readlink -f $(/opt/homebrew/opt/socket_vmnet/bin/socket_vmnet)`|g" ~/.lima/_config/networks.yaml
# limactl sudoers >/tmp/etc_sudoers.d_lima # generate sudoers file
@queses
queses / docker-alpine-vznat.template.yaml
Last active December 31, 2023 15:25
LimaVM template: Docker + Alpine + vzNAT
# Install:
# brew install lima
#
# Install Docker CLI if it's not installed:
# brew install docker docker-compose docker-buildx docker-credential-helper
# ln -sfn /opt/homebrew/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx
# ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
#
# Create the VM:
# limactl create --name=myvm docker-alpine-vznat.template.yaml
@queses
queses / not_found.go
Created March 19, 2023 16:38
Go 404 Handler
// CatchNotFound is used to apply specific handler for code 404; it receives two handlers:
// if the requested path is not handled by the first, the second is called
func CatchNotFound(foundHandler, notFoundHandler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
writer := &notFoundWriter{ResponseWriter: w}
foundHandler.ServeHTTP(writer, r)
if writer.isNotFound {
notFoundHandler.ServeHTTP(w, r)
}
@queses
queses / MyWslConfigsXfce.md
Created August 12, 2021 12:41
My WSL configs

/home/ratt/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml

<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboard-layout" version="1.0">
  <property name="Default" type="empty">
    <property name="XkbDisable" type="bool" value="false"/>
    <property name="XkbLayout" type="string" value="us,ru"/>
    <property name="XkbVariant" type="string" value=","/>
    <property name="XkbOptions" type="empty">
@queses
queses / index.js
Created May 13, 2020 08:23
PlusAgent Remarketing Image With Agent
const htmlToImage = require('node-html-to-image')
const sharp = require('sharp')
const axios = require('axios')
const path = require('path')
const fs = require('fs')
const { promisify } = require('util')
const readFile = promisify(fs.readFile)
async function main() {
@queses
queses / meistertask-calculate-hours.js
Created May 5, 2020 11:14
Calculate worker hours in MeisterTask's CSV export file
const fs = require('fs')
const printHelp = () => {
console.log(
'Console tool to extract and sum worker hours from MeisterTask\'s CSV export file\n' +
'Usage: node meistertask-calculate-hours.js FILEPATH [WORKER NAME] [DATE FROM] [DATE TO]\n' +
'Example: node meistertask-calculate-hours.js /home/user/meister.csv Maxim 2020.04.01 2020.04.30'
)
}