This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # vim: ft=bash | |
| # | |
| # © 2024 Konstantin Gredeskoul <kig AT kig.re> | |
| # | |
| # How to use this: | |
| # curl -fsSL https://bit.ly/rb-jemalloc-check | bash | |
| export rc=/tmp/ruby-check | |
| curl -fsSL -o $rc "https://raw.githubusercontent.com/kigster/bashmatic/refs/heads/main/bin/ruby-check" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # vim: ft=bash | |
| # | |
| # This Gist is about installing any version of Ruby using rbenv on Linux or MacOS | |
| # with Jemalloc and YJIT enabled. | |
| # | |
| # To install a ruby run the following command (this will install the ruby version | |
| # defined in the .ruby-version file in the current directory) | |
| # | |
| # curl -fsSL https://bit.ly/rb-rbenv-install | bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # (c) 2024 Konstantin Gredeskoul | |
| # Under the MIT License | |
| # | |
| # This gist documents a frequently thed pattern of decorating multiple classes with Logging methods | |
| # by sharing just one Logger typically at the top of the module namespace (Application) in this case. | |
| # If the concurrency issues come up, each class can be given its own logger, or perhaps the Logging moduloe | |
| # might have decorators for each of the logging methods (eg #info, #debug) by using a Mutex. | |
| # | |
| # The output of this Ruby Code should be as follows: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Gemfile | |
| source "https://rubygems.org" | |
| # Activate the gem you are reporting the issue against. | |
| gem 'rails', '>= 7.0.4.3' | |
| gem "dalli" | |
| gem "rspec" | |
| gem "rspec-its" | |
| gem "rspec-rails" | |
| gem "awesome_print" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- This file requires a local SQL file named "json_table_columns.csv" to have two columns: | |
| -- [ "Table", "Column" ] | |
| -- It then loops over records in this table computing the total size of the column in each table, | |
| -- the average size of the column in that table, and finally the percentage that column occupies relative | |
| -- to the entire table (including its indexes). | |
| -- First we import the data | |
| BEGIN; | |
| drop table if exists JSON_TABLE_COLUMNS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Discourse Settings | |
| export RUBY_GC_HEAP_INIT_SLOTS=997339 | |
| export RUBY_GC_HEAP_FREE_SLOTS=626600 | |
| export RUBY_GC_HEAP_GROWTH_FACTOR=1.03 | |
| export RUBY_GC_HEAP_GROWTH_MAX_SLOTS=88792 | |
| export RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=2.4 | |
| export RUBY_GC_MALLOC_LIMIT=34393793 | |
| export RUBY_GC_MALLOC_LIMIT_MAX=41272552 | |
| export RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=1.32 | |
| export RUBY_GC_OLDMALLOC_LIMIT=39339204 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # © 2019-2021 Konstantin Gredeskoul, MIT License. | |
| # vim: ft=make | |
| # | |
| # Place this file anywhere. | |
| # | |
| # 1. To create a backup of your vscode settings, keybindings and extensions, run | |
| # $ make save | |
| # This backs it all up to your ~/Documents/VSCode folder. | |
| # | |
| # 2 To restore VSCode configuration: |