Skip to content

Instantly share code, notes, and snippets.

View shirmanov's full-sized avatar
💭
open to new opportunities

Leonid Shirmanov shirmanov

💭
open to new opportunities
  • RBI Group
  • SPb, Russia
  • 21:28 (UTC +03:00)
View GitHub Profile
╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity
# Create a new worktree and branch from within current git directory.
ga() {
if [[ -z "$1" ]]; then
echo "Usage: ga [branch name]"
exit 1
fi
local branch="$1"
local base="$(basename "$PWD")"
local path="../${base}--${branch}"
@yrashk
yrashk / inferal-workspace-architecture.md
Last active January 20, 2026 13:57
Inferal Workspace Architecture
@davidfowl
davidfowl / ResourceModel.md
Last active October 21, 2025 09:31
Aspire Resource Model: Concepts, Design, and Authoring Guidance
@gilangvperdana
gilangvperdana / README.md
Last active December 5, 2025 08:41
Integrate Logging with Promtail & Loki

General

Hello world, in this topic actually I'm making a logging visualization in grafana for GeoIP purposes. As we know, GeoIP cannot use Prometheus, we have to use metrics in the form of raw logs, which is called logging. Because I don't have a lot of resources for running the ELK Stack, in the end I just ran logging with Promtail + Loki. Follow this technical for installation and integration of Promtail & Loki.

I will continue from this article to visualize it with Promtail + Loki.

Change nginx.conf

	log_format json_analytics escape=json '{'
						'"msec": "$msec", ' # request unixtime in seconds with a milliseconds resolution
						'"connection": "$connection", ' # connection serial number
@mq1n
mq1n / upscaler.py
Last active January 11, 2026 13:28
Topaz Photo AI CLI Sample with Python Automated Script & DDS Support
import os, sys, subprocess
try:
from wand.image import Image
except ImportError:
os.system('python -m pip install wand')
from wand.image import Image
def main(args):
if len(args) < 1:
print('Usage: upscaler.py <input_image> [output_image]')
@gilangvperdana
gilangvperdana / README.md
Last active December 5, 2025 08:41
Install GeoIP for Nginx

General

  • If you want to see your client website region, you can install GeoIP module on Nginx
  • The project I've worked on, using (Filebeat, Logstash, Elasticsearch) after GeoIP is installed then visualized using Kibana or Grafana : image

Installation

sudo apt update
sudo apt install libnginx-mod-http-geoip
@darktempla
darktempla / Vagrantfile
Last active December 23, 2023 21:44
Example of running k0s using vagrant and the k0sctl binary to install on the 2 nodes.
# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
nodeCount = 2
image = "debian/buster64"
ipRangeStart = 40
Vagrant.configure("2") do |config|
@AlexeyRaga
AlexeyRaga / shell.nix
Created June 21, 2021 12:54
Postgres in Nix shell
with import <nixpkgs> {};
let
pg_root = builtins.toString ./. + "/.postgres";
pg_user = "postgres";
pg_db = "service";
pg_bind = "127.0.0.1";
svc_pg_user = "dev";
svc_pg_password = "changeme";
@allanger
allanger / Add Kubernetes roles.md
Last active November 15, 2023 11:39
Add Kubernetes users with Ansible

Add Kubernetes users with Ansible

Hi! In the previous article, I've told how to deploy k8s cluster with ansible. Now I'm going to tell, how to add users to your cluster to be able to control your k8s remotely.

My Github: https://github.com/allanger/kubernetes-rbac-ansible-role

Let's imagine you've deployed a bare-metal cluster and you ssh to the master node every time you wanna do something with it. It's not cool, right? So you need to add a user to your cluster.

You can do it manually but, I think, after the first time you perform it, you'd like to do it automatically. That's why I've created this Ansible role.