What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-03-04 21:25:04
pattern matching alias linux
command_not_found_handle() { local cmd_str # change the argument-list array back to a string printf -v cmd_str '%q ' "$@" # process that string: case $cmd_str in "git@"*".git") eval "git clone $cmd_str&qu... Add solution -
Other 2022-02-12 03:10:07
change node version [https://github.com/nvm-sh/nvm]
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$... Add solution -
Other 2022-01-30 19:16:45
bash variable execute
#!/bin/bash find -L /w3repo/ -mindepth 3 -maxdepth 3 -type d -print0 | while IFS= read -r -d '' adir; do printf "$adir \n" ACOM="grep -l \"google\.tick\|typeof navigator\|function(\" -r $adir/* | xargs rm -rf" eval "... Add solution -
Other 2021-11-16 06:53:08
Clear RAM Cache and Swap Space.
# echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' OR $ su -c "echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf... Add solution -
Other 2021-11-09 02:07:11
How do I tell which command has the longest manual on my system?
$ find /usr/share/man/ -type f -exec ls -S {} + 2>/dev/null | head | while \ read -r file; do printf "%-40s" "$file"; \ man "$file" 2>/dev/null | wc -lwm; done | sort -nrk 4 Add solution -
Shell/Bash 2021-11-03 09:24:24
self documenting makefile
.PHONY: help help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' # All rules with double-hash comments will be automatically displayed in th... Add solution
Best helpers
Derek Kaplan
+5
Ryo Hirai
+5
Sqlsourcerer
+5
Pierus
+5
Ken N.
+5
Rene Duchamp
+5
Susette87
+5
Tanveer Ali
+5
Simon LANG
+5
Andrew Besag
+5
Littleprince
+5
Bridget W.
+5
Haidy Kassem
+5
Ferhat Turan
+5
Jwp36
+5