Skip to content

Instantly share code, notes, and snippets.

View shaposhnikoff's full-sized avatar
🏠
Working from home

Shaposhnikoff shaposhnikoff

🏠
Working from home
  • Kiev,Ukraine
View GitHub Profile
@shaposhnikoff
shaposhnikoff / Secure Azure App Registration and Service Principal Patterns for Python Automation.md
Created July 7, 2026 16:18
Secure Azure App Registration and Service Principal Patterns for Python Automation

Secure Azure App Registration and Service Principal Patterns for Python Automation

Executive summary

For Python automation against Azure or Microsoft Graph, the secure baseline is: create an App Registration as the application definition, use its Application (client) ID as the stable identifier in code, let Microsoft Entra create or associate a service principal as the tenant-local security principal, grant only the minimum Azure RBAC roles or Graph application permissions needed at the narrowest possible scope, obtain tokens with a supported library such as MSAL or Azure Identity, and let the target resource enforce authorization using the token’s app identity plus the assigned roles and permissions. In Microsoft Entra, the application object and service principal are distinct objects: the app object defines the application globally in its home tenant, while the service principal is the concrete instance used in a tenant. Microsoft documents that when you register a new

@shaposhnikoff
shaposhnikoff / github.md
Last active July 7, 2026 10:00
llama-server Web UI + MCP: Quick Setup Guide

Optional: Add GitHub MCP Server

You can also add the official GitHub MCP Server.

The recommended local setup uses Docker:

ghcr.io/github/github-mcp-server
@shaposhnikoff
shaposhnikoff / Claude Code Resource Bible.md
Last active April 7, 2026 16:05
Claude Code Resource Bible

Claude Code Resource Bible

Every tool, repo, and tutorial worth knowing. Nothing left out.


Official Anthropic

# Name Description Link
01 Official Docs Complete CC documentation code.claude.com/docs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaposhnikoff
shaposhnikoff / AGENTS.md
Last active March 25, 2026 06:19
AGENTS.md

AGENTS.md

Language Policy

  • All chat responses and explanations: Russian only
  • All git commit messages: English only
  • All code comments, docstrings, variable names: English only
  • All PR descriptions, issue comments, CI/CD messages: English only
  • All file names, function names, class names: English only
  • All review to Jira: English only
  • When explaining what you did after a commit or file change — explain in Russian,
@shaposhnikoff
shaposhnikoff / RB5009_trunk_CRS326.md
Last active February 25, 2026 12:35
DAC between RB5009 and CRS326 as a 10G trunk

MikroTik VLAN Trunk: RB5009 ↔ CRS326-24G-2S+ via SFP+ DAC

F3350C9B-7228-4FAD-8B7A-4DA2AA677E39_4_5005_c

Trunk link: sfp-sfpplus1 on RB5009 ↔ sfp-sfpplus1 on CRS326
Link speed: 10G (DAC cable)
VLANs: 10 VLANs (IDs 10–100)

@shaposhnikoff
shaposhnikoff / pyproject.toml
Created February 1, 2026 13:46
pyproject.toml
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "kvpass"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"azure-identity>=1.16.0",
@shaposhnikoff
shaposhnikoff / iot_device_checker.py
Created January 8, 2026 20:55
iot_device_checker
from math import log
import requests
import json
import logging
from requests.exceptions import (
ConnectionError,
Timeout,
RequestException,
@shaposhnikoff
shaposhnikoff / gh add branch protection.md
Created December 18, 2025 11:08
gh add branch protection
gh api repos/username/repo_name/branches/main/protection \
  --method PUT \
  --input - <<'JSON'
{
  "required_status_checks": null,
  "enforce_admins": true,
  "required_pull_request_reviews": {
    "dismiss_stale_reviews": false,
 "require_code_owner_reviews": true,
@shaposhnikoff
shaposhnikoff / showmount-fstab.sh
Created October 12, 2025 18:58
make fsteb entries fron showmount
#!/bin/bash
SERVER="192.168.10.211"
TMPFILE=$(mktemp)
showmount -e $SERVER > "$TMPFILE"
echo "# ==============================="
echo "# NFS mounts for $SERVER"
echo "# ==============================="