Skip to content

Instantly share code, notes, and snippets.

View gavvvr's full-sized avatar
🥷
Taming complexity

Kirill Gavrilov gavvvr

🥷
Taming complexity
View GitHub Profile
@gavvvr
gavvvr / keybase.md
Last active December 29, 2015 07:24

Keybase proof

I hereby claim:

  • I am gavvvr on github.
  • I am gavvvr (https://keybase.io/gavvvr) on keybase.
  • I have a public key ASBVdAscFthlk-FsN7qXMK_99KVss6R_cLAwh1W10lE4Wgo

To claim this, I am signing this object:

@gavvvr
gavvvr / OpenConnect-MacOS-setup.md
Last active August 15, 2019 09:26
Install OpenConnect with Brew on High Sierra/Mojave

Installation and usage

brew install openconnect
sudo openconnect vpn.domain.com -u email@domain.com --authgroup=VPN-SSL-GROUP

If you have issues with DNS resolution (even though your /ect/resolv.conf looks good), configure DNS servers manually:

@gavvvr
gavvvr / minikube-1.9.3.sh
Last active March 4, 2018 09:47
Minikube kubernetes 1.9 on OSX using hyperkit driver
#!/bin/bash
minikube start --vm-driver=hyperkit --kubernetes-version=v1.9.3 --bootstrapper=kubeadm
@gavvvr
gavvvr / AnypointStudio-openjdk.md
Last active November 28, 2018 13:14
Make AnypointStudio work with OpenJDK installed with SDKMAN! on OSX

If you prefer using SDKMAN! for having Java installed on your Mac and recieve the following message:

you need to install the legacy Java SE 6 runtime

You should open /Applications/AnypointStudio.app/Contents/Eclipse/AnypointStudio.ini and explicitly add path to your JVM using -vm option, i.e.:

-vm
/Users/user/.sdkman/candidates/java/8.0.181-zulu/bin/java
@gavvvr
gavvvr / visualvm-sdkman-osx.md
Last active May 19, 2023 01:59
Getting visualvm on OSX with SDKMAN!

UPDATE:

Now you can just install Liberica JDK pkg-distibution using brew and will never face the problem mentioned below:

brew tap bell-sw/liberica
brew cask install liberica-jdk11

@gavvvr
gavvvr / Eclipse-based-apps-startup-fixed-with-Liberica-on-osx.md
Last active June 23, 2020 15:10
Eclipse-based apps on OSX without Oracle Java

It is hard to make Eclipse-based apps to work on Max OS X if you do not have Oracle Java installed. Usually you get an error like this:

To open X you need to install the legacy java se 6 runtime

Liberica JDK fixes running Eclipse-based apps on Mac OS. So, you can install tools like DBeaver or SpringToolsSuite from command line without need to modify eclipse.ini or any other files.

@gavvvr
gavvvr / netstat.sh
Created April 2, 2020 13:49
netstat with full command running an associated process
netstat -antp 2>&1 | sort -k7,7 -k 6,6| {
while IFS= read -r line
do p="$(sed -En 's/^.*( [0-9]+)\/[^ ]*.*/\1/gp'<<<"$line")";
[ "$p" == "" ] || p=" ## $(ps -p $p -o cmd=)";
echo "$line"$p;
done
}
@gavvvr
gavvvr / svn2git.md
Last active September 22, 2021 14:59
Subversion to git migration check list

The workflow

Svn repos often have binary files and secrets committed. This data should not get to target Git repository.

To migrate Svn repo to git I have the following workflow:

  • Use SubGit to do initial translation of Subversion revisions to git commits
  • Inspect resulting git repo for uwanted/sensitive data
  • Adjust SubGit configuration file to avoid unwanted data at import stage
@gavvvr
gavvvr / Using xargs to reduce amount of new docker layers.md
Last active September 11, 2020 00:04
Running multiple commands in parallel on unix shells with `xargs`
echo 'basiclite sdk sqlplus' | tr ' ' '\n' | xargs -P 3 -I{} \
sh -c "wget -O {}.zip \
https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-{}-linux.x64-19.8.0.0.0dbru.zip \
&& unzip {}.zip -d $CLIENT_PATH && rm {}.zip"

I used this command to add a content of multiple archives from the Internet within single RUN step in Dockerfile which will lead to only one new layer.

@gavvvr
gavvvr / install-ruby.sh
Last active February 14, 2023 18:13
Ruby version management on Windows using Ubuntu WSL
RUBY_VERSION=2.7.1
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
. $HOME/.asdf/asdf.sh
asdf plugin install ruby
sudo apt install -y build-essential libssl-dev zlib1g-dev
asdf install ruby $RUBY_VERSION
asdf global ruby $RUBY_VERSION