Skip to content

Instantly share code, notes, and snippets.

View onmomo's full-sized avatar
🏠

Christian Moser onmomo

🏠
View GitHub Profile

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@onmomo
onmomo / shell snippets
Last active July 26, 2021 11:36
[terminal magic] snippets for debugging / investigation #shell #linux
# show full process arguments
cat /proc/$PID/cmdline | sed -e "s/\x00/ /g"; echo
@onmomo
onmomo / macos-xcode
Created April 28, 2021 14:01
[Reinstall xcode] fix gyp ERR! #terminal #macos
# remove xcode
sudo rm -rf $(xcode-select -print-path)
# trigger cmdline tools install again
xcode-select --install
# combined
sudo rm -rf $(xcode-select -print-path) && xcode-select --install
@onmomo
onmomo / k8s-magic
Last active February 2, 2023 14:06
[kubectl magic] cheatsheet #k8s
# export, import secrets < 1.14
kubectl get secret $my-secret --export -o yaml -n $source-ns | kubectl -n $target-ns apply -f -
# export => 1.14
SECRET= SOURCE= TARGET= \
&& kubectl get secret $SECRET --namespace=$SOURCE -o yaml | sed "s/namespace: .*/namespace: $TARGET/" | kubectl apply -f -
# force delete resources
kubectl -n prometheus delete --force --grace-period=0 pod