Skip to content

Instantly share code, notes, and snippets.

View gorshkov-leonid's full-sized avatar

Leonid Gorshkov gorshkov-leonid

View GitHub Profile
@gorshkov-leonid
gorshkov-leonid / docker-in-windows.md
Last active December 13, 2024 10:42
Docker in Windows without Docker Desktop
@gorshkov-leonid
gorshkov-leonid / install-and-configure-ubuntu-wsl.md
Last active December 13, 2024 10:37
Install and configure Ubuntu WSL
@gorshkov-leonid
gorshkov-leonid / 1_simple.go
Created September 3, 2021 09:31 — forked from sosedoff/1_simple.go
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@gorshkov-leonid
gorshkov-leonid / update-unsupported-ubuntu-debinan.md
Created August 28, 2021 10:29
How to install software or upgrade from an old unsupported release?
@gorshkov-leonid
gorshkov-leonid / wsl-remove-with-paths.md
Last active November 5, 2021 13:58
WSL How to remove the Win10's PATH from WSL

How to remove the Win10's PATH from WSL Create or edit /etc/wsl.conf

 [interop]
 enabled=false # enable launch of Windows binaries; default is true
 appendWindowsPath=false # append Windows path to $PATH variable; default is true

then wsl --shutdown

@gorshkov-leonid
gorshkov-leonid / docker-in-docker.md
Created August 13, 2021 19:22
Docker in docker mount sock
docker run -it -v $(pwd):/home/docker -v /var/run/docker.sock:/var/run/docker.sock -w /home/docker docker:19.03.8 /bin/sh
@gorshkov-leonid
gorshkov-leonid / how-to-split-pem-certs.md
Created August 12, 2021 22:14
How to split PEM certificates
IN_CERTS=$(cat in.pem)
echo -e "$IN_CERTS" > ./tmp.pem 
sed -i '/^[[:space:]]*$/d' ./tmp.pem
mkdir -p _certs 
csplit -s -z -f './_certs/cert-' -b '%02d.crt' ./tmp.pem '/-----BEGIN CERTIFICATE-----/' '{*}'
@gorshkov-leonid
gorshkov-leonid / update-file-permissions-in-git-repo.md
Created August 11, 2021 12:38
Update file permissions in GIT repo
find . -name "*.sh" -exec git ls-files -s {} \;
find . -name "*.sh" -exec git update-index --chmod=+x {} \;