- You own a Git repository server and the developers do not have access to it
(i.e. they can only read & write to the repo, but not
gc
it). - You had a developer that wrote a project for you.
- He got angry for whatever reason and deleted all branches from the remote repo.
He also
push -f
ed themaster
branch leaving only one silly commit there. - He escaped from the country leaving you without any code at all (at least this is what he believe in).
- You have never cloned the repo to other machine. There were only two copies of it: the developer's one and the server's one.
This file contains 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
docker images --format "{{.Repository}}:{{.Tag}}" | grep -v "none" |
This file contains 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
alias dc='docker-compose' |
This file contains 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
apt update | |
apt install git | |
apt install iputils-ping | |
apt install net-tools | |
apt install telnet | |
curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
This file contains 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
docker volume create --name squidVolume | |
docker run --name squid -d -p 3128:3128 -v squidVolume:/var/spool/squid Datadog/squid |
This file contains 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
# Find process running on port 8080 | |
lsof -i:8080 | |
# Just kill it | |
kill -9 $(lsof -t -i:8080) | |
# find process listening on port 9200 | |
lsof -nP -i4TCP:$PORT | grep LISTEN |
This file contains 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
#!/bin/bash | |
set -e | |
set -o pipefail | |
# Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
echo "usage: $0 <service_account_name> <namespace>" | |
exit 1 | |
fi |
Manually downloading, extracting and configuring the installation of OpenJDK 11+ is a high-maintenance exercise. Particularly if you need to install and switch between multiple versions of the JDK.
The following options for installing OpenJDK 11+ and switching between versions make the job easier..
Jabba is a Java version manager inspired by nvm (Node.js) written in Go.