Skip to content

Instantly share code, notes, and snippets.

View mprokopov's full-sized avatar

Maksym Prokopov mprokopov

View GitHub Profile
@mprokopov
mprokopov / pi-otel-grafana-dashboard.json
Last active March 9, 2026 10:45
Grafana dashboard for pi-otel-telemetry extension (pi coding agent OTEL traces & metrics)
{
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.0.0"
},
{
@mprokopov
mprokopov / claude-code-dashboard.json
Created March 9, 2026 06:09
Grafana Dashboard for Claude Code AI Agent Observability (Mimir + Loki + Tempo)
{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"panels": [
{
@mprokopov
mprokopov / iterm2-cmd-as-ctrl.json
Created February 22, 2026 09:34
iTerm2 profile: Cmd as Ctrl keybindings (Emacs-style navigation)
{
"Profiles": [
{
"Name": "Cmd as Ctrl",
"Guid": "F7C4B853-D473-4CBF-8E4D-1B84B5A1C0E2",
"Custom Directory": "No",
"Keyboard Map": {
"0x61-0x100000": { "Action": 10, "Text": "01" },
"0x62-0x100000": { "Action": 10, "Text": "02" },
"0x64-0x100000": { "Action": 10, "Text": "04" },
@mprokopov
mprokopov / benchmark-shell.sh
Created February 22, 2026 06:41
iTerm2 + Zsh optimization for Claude Code
#!/bin/bash
# Shell Startup Benchmark Script
# Measures zsh startup time to validate optimization improvements
echo "🔍 Benchmarking shell startup time..."
echo "Running 10 iterations to calculate average..."
echo ""
total_time=0
iterations=10
@mprokopov
mprokopov / xenserver_vm.tf
Created December 4, 2023 13:59
XenServer Terraform Example
provider "xenserver" {
url = "https://xxx.xxx.xxx.xxx"
username = "root"
password = ""
}
# resource "xenserver_vm" "test1" {
# base_template_name = "sample-template"
# name_label = "test1"
# static_mem_min = 2147483648
@mprokopov
mprokopov / import.bb
Created December 4, 2023 13:52
babushka generate dips.edn out of project.clj
#!/usr/bin/env bb
(ns switch
(:require [clojure.pprint :as pprint]))
(defn project-clj-map [filename]
(->> (slurp filename)
(read-string)
(drop 1)
(partition 2)
(map vec)
@mprokopov
mprokopov / docker-credentials-1password-helper.clj
Created October 16, 2022 18:20
Docker helper to provision AWS token from AWS credentials stored in 1Password Connect.
#!/usr/bin/env bb
;; 0. run using 1Password CLI "op inject -i docker-credentials-1password -o docker-credentials-1password" to replace
;; reference to op://Personal/1P token/credential with real 1Password Connect token.
;; http://onepasswordconnect.local/v1/vaults/vault_uuid/items/item_uuid should point to your 1Password Connect, vault and item with AWS credentials.
;; 1. save to /usr/local/bin/docker-credentials-1password;
;; 2. install babashka from http://babashka.org
;; 3. create /etc/docker/config.json
;; { "credsStore": "1password" }
;; 4. install docker-credentials-ecr-login from https://github.com/awslabs/amazon-ecr-credential-helper
;; 5. docker pull xxxxxxxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/my-great-repo should just work now!
@mprokopov
mprokopov / time.clj
Created June 29, 2021 11:31
clojure time span at beginning of the month and at the end of the month
(def now (java.time.LocalDateTime/now))
(-> now
(.with (java.time.temporal.TemporalAdjusters/firstDayOfMonth))
(.with (java.time.LocalTime/MIN)))
(-> now
(.with (java.time.temporal.TemporalAdjusters/lastDayOfMonth))
(.with (java.time.LocalTime/MAX)))
@mprokopov
mprokopov / bb-mysql.clj
Created May 21, 2021 10:23
babashka honeysql with mysql example
;; CREATE TABLE `station` (
;; `id` int(11) NOT NULL AUTO_INCREMENT,
;; `location` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
;; PRIMARY KEY (`id`)
;; ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
;; CREATE TABLE `rental_order` (
;; `id` int(11) NOT NULL AUTO_INCREMENT,
;; `campervan_id` int(11) NOT NULL,
;; `start_station_id` int(11) NOT NULL,
;; `end_station_id` int(11) NOT NULL,