Skip to content

Instantly share code, notes, and snippets.

View sem-hub's full-sized avatar

Sergey Matveychuk sem-hub

  • Yandex
  • Moscow
View GitHub Profile
@dai-ichy
dai-ichy / vim_color_scheme_setup.md
Last active June 3, 2025 23:40
Set up and choose `vim` color scheme, quickly.

Pick vim color scheme, quickly

When you are in need of a new color scheme and you want to sidestep the hassle of manually editing and loading each scheme one by one, you can do so with these steps:

  1. copy switch_colors.vim script to ~/.vim/plugin/switch_colors.vim
  2. clone vim-colorschemes
  3. copy schemes from vim-colorschemes/colors to ~/.vim/colors
  4. while in vim execute :SetColors all command (it will set the script to use newly downloaded schemes from the repo)
  5. use F8 to cycle forward and Shift-F8 to cycle backwards through all schemes
  6. after choosing one, set its name in .vimrc color scheme with colorscheme [scheme name]
@xjdrew
xjdrew / client.go
Last active June 20, 2025 01:31
golang tls client and server, require and verify certificate in double direction
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io"
"io/ioutil"
"log"
"os"
@labbots
labbots / color_script.sh
Last active June 3, 2025 00:27
Test script to understand bash script ANSII colour codes
#!/usr/bin/env bash
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
bldred=${txtbld}$(tput setaf 9) # red
bldblu=${txtbld}$(tput setaf 14) # blue
bldwht=${txtbld}$(tput setaf 10) # white
txtrst=$(tput sgr0) # Reset
info=${bldwht}*${txtrst} # Feedback
pass=${bldblu}*${txtrst}
#lists contents of current directory with file permisions
alias ll='ls --color -l -sort'
#list all directories in current directories
alias ldir='ls -l | grep ^d'
# List directory and pipe output to less. Makes viewing of large directory easy
alias lsl="ls -lhFA --color | less -r"
#Find files in current directory