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 / 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 / reduce-underscan.sh
Last active April 7, 2026 13:17
This shell script walks you through the steps required to change the monitor underscan or overscan value on OS-X, when the Display Preferences are not providing the underscan/overscan slider for a given display. This process was documented by Ishan Sharma here: http://ishan.co/external-monitor-underscan and is a part of BashMatic library.
#!/usr/bin/env bash
#
# Script to change underscan/overscan value of a monitor on OS-X.
# © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License.
#
#———————————————————————————————————————————————————————————————————————————————————————————
# EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS".
# OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR
# IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF
# MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
@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).
#
@kigster
kigster / cursor-extension-importer.sh
Created January 22, 2025 02:59
Import VSCode Extensions into Cursor via CLI
#!/usr/bin/env bash
# vim: ft=bash
#
# © 2025 Konstantin Gredeskoul
# http://github.com/kigster | https://kig.re
#
# This script allows you to export the list of your VSCode
# extensions and import them into, eg. Cursor IDE. Or the
# other way around. By the default the script continues on
# import errors because there are typically quite a few.
@kigster
kigster / fabfilter-remover.sh
Created March 5, 2019 05:16
Script to find and remove FabFilter plugins on Mac OS-X. Requires Terminal usage.
#!/usr/bin/env bash
if [[ ! -L lib || ! -L bootstrap ]]; then
[[ -z $(which curl) ]] && {
printf "Curl is required for this operation. Please install it with\n"
printf "brew install curl\n"
exit 1
}
curl -fsSL "http://bit.ly/bashmatic-bootstrap" | /usr/bin/env bash
fi
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"