Skip to content

Instantly share code, notes, and snippets.

View belkinai's full-sized avatar

Aleksandr Belkin belkinai

  • i-complex
  • Novokuznetsk
View GitHub Profile
@belkinai
belkinai / .zshrc
Created February 13, 2023 11:33
Checks .nvmrc and automatically switches current node version of nvm
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
@belkinai
belkinai / gtk.css
Last active October 29, 2022 07:42 — forked from nabam/gtk.css
Dark tabs for Arc GTK theme in terminator
/*
Put these lilnes into .config/gtk-3.0/gtk.css file
(Probably you'll need to create it)
*/
.terminator-terminal-window notebook tab {
background-color: #383c4a;
padding: 0.2em;
border: none;
}
@belkinai
belkinai / .zshrc
Created October 21, 2020 09:01
my zsh plugins
#Replace this line in your .zshrc/ Requires ohmyzsh pack
plugins=(git zsh-autosuggestions nvm alias-tips command-not-found composer dirhistory golang history laravel npm yarn)
@belkinai
belkinai / case.sh
Created September 21, 2019 13:08
Find case collisions of files in directory and subdirectories
#!/bin/bash
for dir in $(find $1 -type d)
do
cd $dir
for file in $(find . -maxdepth 1 -type f | tr '[A-Z]' '[a-z]'| sed "s#./##" | sort -u)
do
if [ $(ls|grep -iwc $file) -gt 1 ]
then
echo "$dir"
ls|grep -iw $file