Skip to content

Instantly share code, notes, and snippets.

@gangsta
Last active March 23, 2023 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gangsta/d24bb5e9a73e7314e5cd8c75752f8d1a to your computer and use it in GitHub Desktop.
Save gangsta/d24bb5e9a73e7314e5cd8c75752f8d1a to your computer and use it in GitHub Desktop.
Daily Linux Commands Cheat Sheet

Delete Github branches except main or master

git branch | grep -v "main" | xargs git branch -D

Useful Commands list

CPU

ps aux | sort -nrk 3,3 | head -n 5

watch "ps aux | sort -nrk 3,3 | head -n 5"

Allow kubectl Command to access all ports without sudo, Helpful for port-forward

which kubectl
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/kubectl

How to debug Fedora Networking

Docs: https://fedoraproject.org/wiki/Networking/CLI

Fedora Podman permission denied

~/git/terraform-google-lb-http ⮡ master 🖕$ make build
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Generating markdown docs with terraform-docs
find: ‘.’: Permission denied
~/git/terraform-google-lb-http ⮡ master 🖕$ chcon -Rt svirt_sandbox_file_t /home/gangsta/git/terraform-google-lb-http
~/git/terraform-google-lb-http ⮡ master 🖕$ make build
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Generating markdown docs with terraform-docs
Working in . ...
Success!
Working in ./examples/cloudrun ...
Success!
Working in ./examples/https-gke ...
Success!
Skipping ./examples/https-gke/gke-node-port because README.md does not exist.
Working in ./examples/https-redirect ...
Success!
Working in ./examples/mig-nat-http-lb ...
Success!
Working in ./examples/multi-backend-multi-mig-bucket-https-lb ...
Success!
Working in ./examples/multi-mig-http-lb ...
Success!
Working in ./examples/multiple-certs ...
Success!
Working in ./examples/shared-vpc ...
Success!
Working in ./modules/dynamic_backends ...
Success!
Working in ./modules/serverless_negs ...
Success!
Skipping ./test/fixtures/cloudrun because README.md does not exist.
Skipping ./test/fixtures/https-redirect because README.md does not exist.
Skipping ./test/fixtures/mig_nat because README.md does not exist.
Skipping ./test/fixtures/multi_certs because README.md does not exist.
Skipping ./test/fixtures/multi_mig because README.md does not exist.
Skipping ./test/setup because README.md does not exist.
~/git/terraform-google-lb-http ⮡ master 🖕$

How to get Wifi Password Fedora

#List Wifi names
~/🖕$ nmcli -g NAME connection show

#Show Password
~/🖕$ nmcli -s -g 802-11-wireless-security.psk connection show NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment