Last active
October 13, 2021 12:30
-
-
Save mazzma12/6d21ca8de10e8802e037f629b4cc1d61 to your computer and use it in GitHub Desktop.
Common oneliners used in Bash and their purpose
This file contains hidden or 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 IP address from host | |
nslookup $hostanme | |
# https://superuser.com/a/1414856 | |
nslookup $hostname | grep -i address | awk -F" " '{print $2}' | awk -F# '{print $1}' | tail -n 1 | |
# DNS issues: better use dig as host will use the local cache of the machine | |
# @ specifies another resolver than the local cache DNS | |
dig google.com +short @1.1.1.1 | |
## Docker | |
# Run notebook forward port and net | |
docker run -p 8888:8888 --net=host -it scipynb | |
## Kube | |
# Remove completed pods | |
kubectl get pods -n $namespace | grep Completed | cut -d" " -f1 | xargs -n 1 kubectl delete -n $namespace pod | |
# Generate basic auth https://kubernetes.github.io/ingress-nginx/examples/auth/basic/ | |
# Where file.txt is a file with https:// links | |
wget -i ~/file.txt --http-user=myName --http-passwd=pwd | |
# Goofys | |
export bucket_name=blabla | |
folder_name=$bucket_name | |
mkdir $folder_name | |
goofys --region $region --endpoint $endpoint --profile oio $bucket_name $folder_name | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment