Skip to content

Instantly share code, notes, and snippets.

View kigster's full-sized avatar
:octocat:
Pushing AI automation into production.

Konstantin Gredeskoul kigster

:octocat:
Pushing AI automation into production.
View GitHub Profile
@kigster
kigster / justfile
Created August 19, 2026 04:36
Justfile Reusable Snippets
# replace me
repo := 'git@github.com:USERNAME/REPO'
# replace with whereever your package version lives
version := `jq .version package.json | tr -d '"'`
[no-exit-message]
recipes:
@just --choose
# Ensures you have Homebrew installed, and installs it if needed.
@kigster
kigster / which-starship
Last active August 23, 2026 18:25
A ZSH script that interactively lets you choose one of the prompt presets, and (if supported) palettes. Based on http://starship.rs/
#!/usr/bin/env zsh
# © 2026 Konstantin Gredeskoul, MIT License.
# starship ZSH preset chooser and palette helper script, interactive.
#
# WHY this script?
#
# Starship povides one of the best prompts I've ever seen, it's super fast, colorful and
# very customizable. Once you install it from https://starship.rs it will also install
# a couple of presets. Some presets (such as catppuccin) have multiple palletes to choose
# from.
@kigster
kigster / gwt.bash
Created July 6, 2026 05:45
gwt() — Bash Function to select a worktree via fzf using the worktree folder and a branch
# vim: ft=bash
gwt() {
local sel dir esc=$'\033'
sel=$(git worktree list --porcelain | awk -v home="$HOME" -v esc="$esc" '
/^worktree / { wt = $2; sub("^" home, "~", wt) }
/^branch / { sub(/^refs\/heads\//, "", $2)
printf "%s[1;33m%s%s[0m (%s[1;32m%s%s[0m)\n", esc, wt, esc, esc, $2, esc }
/^detached$/ { printf "%s[1;33m%s%s[0m (detached)\n", esc, wt, esc }
' | fzf --ansi \
--prompt='worktree > ' --height=40% --reverse --no-multi \
@kigster
kigster / install-rust-tools.sh
Last active May 16, 2026 07:07
Shell script that installs lots of fresh tools written in Rust and many replace GNU commands. Requires BASH v4+ on MacOS.
#!/usr/bin/env bash
#
# install-rust-cli.sh — opinionated installer for modern Rust CLI/TUI tools.
# Skips anything already installed; for the rest, prints a colorful h2bg
# banner describing the tool, then installs it via cargo-binstall.
#
# USAGE:
# # We need BASH version 4+
# brew install bash # MacOS only
#
@kigster
kigster / Brewfile
Last active March 28, 2026 21:47
Minimal Development Brewfile. Download., then run `brew bundle`
# frozen_string_literal: true
# vim: ft=ruby
# © 2026 Konstantin Gredeskoul
# This is the "minimum" development tooling list of Brew Packages
# that every developer should have on their MacOS system. It's
# nowhere near complete, and is minimal for a reason (for those
# that prefer minimalistic approach).
#
require 'benchmark'
require 'etc'
require 'parallel'
input = ('a'..'z').map { |letter| [letter, letter] }.to_h
index = 0
N = 5_000_000
cpu_count = Etc.nprocessors.to_i
@kigster
kigster / install-claude-app-cli
Last active July 24, 2025 01:02
BASH script that downloads and installs Claude Mac App & the CLI client via npm
#!/usr/bin/env bash
# shellcheck disable=SC2154,SC1091,SC1090
# vim: ft=bash
#
# AUTHOR:
# © 2025 Konstantin Gredeskoul, All rights reserved.
# LICENSE:
# MIT
# USAGE:
# Download the script to a local file called "install-claude-app-cli" and then:
@kigster
kigster / module_madness.rb
Created February 20, 2025 01:56
Ruby Modules and method precedence explained
module A
def foo
"A"
end
end
module Z
include A
def foo
"Z"
@kigster
kigster / concerning-modules.rb
Created January 25, 2025 11:01
Ruby Module/Class Interdependency playground
#!/usr/bin/env ruby
# © 2025 Konstantin Gredeskoul, All rights reserved.
#
# This script is a proof of concept to show how to use ActiveSupport::Concern
# to manage dependencies between modules and classes. The main idea is to use
# the included block to include the dependencies of a module, and the
# class_methods block to define class methods.
#
# Ultimately, the script prints all of the the methods of the Host, Bar, and
# Foo classes and modules to show the result of the concern implementation.