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
pgrep java | |
//list all processes/pid running in java | |
pgrep java | xargs kill | |
// chain kill | |
lsof -i:8080 | |
//list pid running in port | |
lsof -i:8080 | awk 'NR==2 {print $2}' |
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
get-all-dependency-files | |
go get -d ./... |
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
get all zones by region filter | |
gcloud compute zones list --filter="region:europe-west1" | |
get all instances by instance groups by region | |
gcloud compute instance-groups list-instances GROUP_NAME --region REGION_NAME |
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
stop all containers | |
docker kill $(docker ps -q) | |
remove all containers | |
docker rm $(docker ps -a -q) | |
remove all docker images | |
docker rmi $(docker images -q) |
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
// removed gitignored films | |
git rm -r --cached . | |
//remove untracked files | |
git clean -f -x |
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
file=backup.tar.gz | |
curl -X PUT -T "$file" \ | |
-H "Host: <BUCKET_PATH>.amazonaws.com" \ | |
-H "Date: $(date +"%a, %d %b %Y %T %z")" \ | |
-H "Content-Type: application/x-compressed-tar" \ | |
"https://<BUCKET_PATH>.amazonaws.com/$file" |
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
disable system policy for installing from any source | |
sudo spctl --master-disable |
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
merge config files | |
KUBECONFIG=~/.kube/config:~/.kube/config2 kubectl config view --flatten > ~/.kube/temp | |
mv ~/.kube/temp ~/.kube/config |
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
sudo iptables -A INPUT -i tun0 -j ACCEPT | |
sudo iptables -A FORWARD -o tun0 -i ens3 -j ACCEPT | |
sudo iptables -A FORWARD -i tun0 -o ens3 -j ACCEPT | |
sudo iptables -A INPUT -i ens3 -p tcp --dport 80 -j ACCEPT | |
sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
iptables -D OUTPUT -d 8.8.8.8 -o ens3 -j DROP |
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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: nfs-pd | |
spec: | |
storageClassName: "nfs-storageclass" | |
capacity: | |
storage: 200G | |
accessModes: | |
- ReadWriteOnce |
OlderNewer