Skip to content

Instantly share code, notes, and snippets.

View kigster's full-sized avatar
:octocat:
@repos.select { |r| r.is_a?(Gem) }.publish("https://rubygems.org")

Konstantin Gredeskoul kigster

:octocat:
@repos.select { |r| r.is_a?(Gem) }.publish("https://rubygems.org")
View GitHub Profile
@kigster
kigster / bootstrap-bashmatic.sh
Last active December 18, 2019 09:49
BashMatic bootstrapper for curl-based installations. To install BashMatic using this, run the following command: `eval "$(curl -fsSL http://bit.ly/bashmatic-v0-1-0)"`
#!/usr/bin/env bash
# vim: ft=sh
[[ -z $(command -v git) ]] && {
echo "Please install xcode-tools on MacOSX, or git on Linux before running this script."
exit 1
}
export BashMatic="${HOME}/.bashmatic"
@kigster
kigster / cloudSettings
Last active August 5, 2020 04:50
VSCode Settings Sync
{"lastUpload":"2020-08-05T04:50:18.785Z","extensionVersion":"v3.4.3"}
@kigster
kigster / ruby-with-bazel.md
Created November 26, 2019 22:05
RubyConf Australia Submission for 2020

Building Ruby Apps and Gems with Bazel and Monorepo

Elevator Pitch

You must have heard about mono-repos by now. It's all the rage. Google is doing it, AirBnB is doing it, — the list goes on. But: does it really make sense to put all of your Ruby Things in one basket? Even so, does Bazel build system deliver on its promises when applied to Ruby? Come and see!

Talk Format

30-45 minutes

@kigster
kigster / jb
Last active October 28, 2019 22:56
JetBrains Command Line IDE Finder / Launcher. This tool should be installed in /usr/local/bin/jb and then, as long as your JetBrains apps are installed into `/Applications/apps` folder, `jb` will be able to find launch them. If the binaries are installed elsewhere, set the `JETBRAINS_INSTALLATION_DIR` folder.
#!/usr/bin/env bash
#
# © 2019 Konstantin Gredeskoul
#
# A generic jetbrains command line launcher after the Toolbox one seems to
# never really work anymore.
#
# This tool should be installed in /usr/local/bin/jb and then, as long as your JetBrains apps
# are installed into `/Applications/apps` folder, `jb` will be able to find launch them.
# If the binaries are installed elsewhere, set the `JETBRAINS_INSTALLATION_DIR` folder.
@kigster
kigster / sha1benchmark.rb
Last active August 17, 2019 00:04
Comparing time to compute SHA1 of integers using pure Ruby, Ruby threads, and Forking
#!/usr/bin/env ruby
#
# To run this example, do first: `gem install parallel`
#
# Simple Benchmark on a 16-Core MacBook PRO:
#
# Number of CPU Cores: 16, total iterations: 10000
#
# user system total real
# ruby/01T 0.054921 0.000947 0.055868 ( 0.055886)
@kigster
kigster / .irbrc
Created July 3, 2019 22:05
My ~/.irbrc that loads some extra goodies
# encoding: utf-8
require 'readline'
require 'irb/completion'
require 'irb/ext/save-history'
begin
require 'colored2'
require 'awesome_print'
require 'irbtools'
rescue LoadError => e
@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
@kigster
kigster / wispertest.rb
Last active February 8, 2019 01:01
Exploration of the Ruby Gem Wisper in the context of class-level subscriptions
#!/usr/bin/env ruby
#
# License: MIT
# Author: Konstantin Gredeskoul
#
# This is a simple conceptual script to explore the gem Wisper, but unlike the examples in the README
# using the class methods and class-level subscriptions similar to how another gem Ventable
# accomplishes something similar. Wisper passes with flying colors.
#
# ## Usage

Keybase proof

I hereby claim:

  • I am kigster on github.
  • I am kig (https://keybase.io/kig) on keybase.
  • I have a public key ASB6s4JHlxCxWo8c8nLT3IvSJcjeuq8SMSjn0dV8JclmrQo

To claim this, I am signing this object:

@kigster
kigster / reduce-underscan.sh
Last active April 25, 2022 17:32
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.