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 / 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.
@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 / ec2-bench.sh
Last active January 8, 2025 20:37
AWS Instance Benchmark using sysbench
#!/usr/bin/env bash
# vim: ft=bash
# Uses sysbench on Ubuntu to run CPU, RAM and File IO Tests
# Saves the output into "result-for-<instance-type>-<date>-<time>.txt
#
# You can run this as follows without downloading:
# curl -fsSL https://gist.githubusercontent.com/kigster/3869409f17739461f9d1fb7e0aa5022c/raw | bash
line() {
echo -e "\e[0;33m———————————————————————————————————————————————————————————————————————\e[0m"
@kigster
kigster / ruby-install
Last active February 18, 2025 20:20
Ruby Install Minimal script for MacOS and Linux. You can use it to install a recent Ruby using `rbenv` and `ruby-build`, with Jemalloc & YJIT enabled. Run it like so: `bash -c "$(curl -fsSL https://bit.ly/ruby-install-0-2-1)" -- 3.4.1`
#!/usr/bin/env bash
# vim: ft=bash
#
# © 2025 Konstantin Gredeskoul <kig AT kig.re>
# All rights reserved.
# MIT License.
#
# This script uses rbenv/ruby-build to install Ruby on OS-X or Linux. It configures
# Ruby build flags in such a way to ensure Ruby is linked with libjemalloc (which
# reduces the memory by half) and YJIT enabled. It has been tested on both Linux and