kubectl get nodes > all_nodes.txt
cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt
kubectl logs <pod> <search_criteria> > some_file.txt
# show options available | |
mvn help:help | |
# Interactive shell to evaluate maven expressions like ${project.groupId} | |
mvn help:evaluate | |
# shows information about the plugin | |
mvn help:describe -Dplugin=org.apache.maven.plugins:maven-shade-plugin -Ddetail | |
tr -cs A-Za-z '\n' | | |
tr A-Z a-z | | |
sort | | |
uniq -c | | |
sort -rn | | |
sed ${1}q |
kubectl get nodes > all_nodes.txt
cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt
kubectl logs <pod> <search_criteria> > some_file.txt
#!/bin/bash | |
################ | |
# Uncomment if you want the script to always use the scripts | |
# directory as the folder to look through | |
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
REPOSITORIES=`pwd` | |
IFS=$'\n' |
# list installed packages | |
rpm -qa | |
# list files installed by a package | |
rpm -ql [rpm file name] |
$ find . -name "*.jar" -print0 | xargs -0 -n1 unzip -l | grep Exception |
# lists the env vars for the process | |
$ cat /proc/28818/environ | tr '\0' '\n' | |
# lists more details about the process, including the env vars | |
$ ps e -ww -p 28818 |
$ mvn spring-boot:run \ | |
-P '!default' \ # setting a profile, in this case, excluding it by prefixing it with '!' | |
-Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000" # debug settings |
# Remove duplicates from zsh_history: | |
$ cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zsh_no_duplicates_history | |
$ mv .zsh_no_duplicates_history .zsh_history | |
# In case of failure (i.e, `sort: Illegal byte sequence`), debug | |
# replacing the command above with `head`: | |
$ head -n 10000 .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- |
# find string accross all git revisions | |
git grep "string/regexp" $(git rev-list --all) | |
# diff file between two different branches or tags | |
git diff master 21.5.5.1 src/files/example.txt | |
# show file history | |
git log --stat src/customProperties.json | |
git log --graph src/customProperties.json |