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
| SELECT * FROM block_devices; | |
| SELECT * FROM users WHERE gid < 65534 AND uid >= 1000; | |
| # finds all users who have actual login shells | |
| SELECT * FROM users WHERE shell NOT LIKE '%false' AND shell NOT LIKE '%true'; | |
| SELECT * FROM users WHERE shell="/bin/bash" | |
| #Querying the socket_events table | |
| SELECT pid, remote_address AS address, |
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
| ============================================================================ | |
| #how to delete a workflow from GitHub Actions? | |
| https://stackoverflow.com/questions/57927115/anyone-know-a-way-to-delete-a-workflow-from-github-actions | |
| ============================================================================ | |
| gists | |
| ============================================================================ | |
| https://api.github.com/users/githubfoam/gists | |
| `html_url` list gists | |
| ============================================================================ |
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
| ----------------------------------------------------------------------------------------------------- | |
| Read Test | |
| fio --name=randread --ioengine=libaio --iodepth=16 --rw=randread --bs=4k --direct=0 --size=512M --numjobs=4 --runtime=240 --group_reporting | |
| ----------------------------------------------------------------------------------------------------- | |
| writes a total 2GB files [4 jobs x 512 MB = 2GB] running 4 processes at a time: | |
| fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=0 --size=512M --numjobs=4 --runtime=240 --group_reporting | |
| ----------------------------------------------------------------------------------------------------- | |
| Read Write Performance Test | |
| fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 |
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
| zypper ref #Refreshing Repositories | |
| zypper update -y #update all installed packages with newer version as far as possible | |
| #Reboot is required to ensure that your system benefits from these updates. | |
| zypper --non-interactive --quiet install bcc-tools bcc-examples git |
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
| ----------------------------------------------------------------------------------------------------- | |
| Common Ways to Run a Bash Script | |
| You can execute a Bash script in several different ways, each affecting: | |
| Which shell runs it, | |
| Whether a new shell process is created, | |
| Which environment variables are used, and |
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
| ------------------------------------------------------------------------------------------------- | |
| # official Go downloads page https://go.dev/dl/ | |
| ------------------------------------------------------------------------------------------------- | |
| sudo snap install go --classic #Ubuntu | |
| ------------------------------------------------------------------------------------------------- | |
| cd /tmp | |
| export GOVERSION="1.18" | |
| curl -O https://dl.google.com/go/go$GOVERSION.linux-amd64.tar.gz | |
| tar -xvf go$GOVERSION.linux-amd64.tar.gz | |
| sudo mv go /usr/local |
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
| ------------------------------------------------------------------------------------------------------------------------------------------------- | |
| $ cat Makefile | |
| F90 = gfortran | |
| TARGET=hello | |
| OBJECTS = $(TARGET).o | |
| FCFLAGS = -g -pg -fbounds-check | |
| OPFLAGS = -Ofast -O3 -O2 -O1 | |
| #PROFILERS = gprof strace ltrace valgrind | |
| all: build-gprof build-strace build-ltrace build-valgrind |
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
| -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| #zsh shell (Z-Shell),Most versions of macOS ship with zsh pre-installed | |
| zsh --version | |
| chsh -s $(which zsh) #set zsh as the default shell | |
| chsh -s $(which bash) # revert to Bash | |
| chsh -s /usr/local/bin/zsh | |
| chsh -s /bin/zsh | |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| #Hosts File | |
| Windows 10 - "C:\Windows\System32\drivers\etc\hosts" |
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 -E minikube start --driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification #Some versions of Linux have a version of docker that is newer than what Kubernetes expects. To overwrite this, run minikube with the following parameters | |
| sudo minikube config set driver none #make none the default driver | |
| minikube start --alsologtostderr -v=4 #debug crashes | |
| sudo minikube start --profile=minikube --memory=8192 --cpus=4 --vm-driver=none --kubernetes-version=v$KUBERNETES_VERSION # The 'none' driver does not respect the --cpus flag ! The 'none' driver does not respect the --memory flag | |
| sudo minikube start --memory=8192 --cpus=4 --vm-driver="virtualbox" | |
| ------------------------------------------------------------------------------------------------ | |
| kubectl config use-context minikube #use kubectl to switch to the minikube context, so we can talk to the cluster | |
| ----------- |
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
| #pkg update | |
| # System configuration profiles are processed by SMF after OS package installation when a client first boots. | |
| #The Service Management Facility in Oracle Solaris 11 is used to configure systems and store related configuration data, allowing changes to persist across system updates. | |
| sysconfig create-profile -o profile.xml | |
| sysconfig configure -c sc-profile.xml #The resulting profile can be used with AI or as input to a sysconfig command | |
| kstat -p | grep link_ | grep bge # display network interface variables | |
| #vagrant sudoer |