This file contains 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 zapup.sh | |
#!/bin/zsh | |
cd $HOME/Downloads | |
curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmllint --xpath '//core/daily/url/text()' - > /tmp/zzzzap | |
if [[ -z "$(find $HOME/Downloads -name 'ZAP_D*' | head -1)" ]] || ! $(grep $(ls -d ZAP_D* | sed -e "s/ZAP_//") /tmp/zzzzap >& /dev/null) | |
then | |
/bin/rm -f $HOME/Downloads/zap |
This file contains 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
mkdir $HOME/kali | |
# assumes you're in the docker group ... | |
# if you want net_admin inside the container | |
# docker run -td --name mykali --network host -v $HOME/kali:/tmp/home --device=/dev/net/tun --cap-add=net_admin kalilinux/kali-rolling | |
docker run -td --name mykali --network host -v $HOME/kali:/tmp/home kalilinux/kali-rolling | |
docker exec -it mykali bash | |
apt update |
This file contains 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
# tested on ubuntu 20.04 | |
k3d cluster create mycluster --port 8080:80@loadbalancer --port 8443:443@loadbalancer | |
kubectl get all | |
kubectl create -f helloworld.yaml | |
kubectl expose deployment helloworld | |
kubectl create -f helloworld-ingress.yaml | |
kubectl get pod,svc,ing | |
# http://localhost:8443 the default self-signed traefik cert will cause a browser warning, but it does work |
This file contains 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
# inspect the afm fonts | |
# I punted and went with: matplotlib.font_manager.weight_dict | |
# see: https://gist.github.com/zesty/de6f872908add8aca3c3a156431baa3b for the pretty stuff | |
# ref: Commonly used names for CSS font-weight values https://gist.github.com/lukaszgrolik/5849599 | |
import pandas as pd | |
import matplotlib.font_manager | |
df = pd.DataFrame( | |
# [(f.name, f.stretch, f.style, f.variant, f.weight, f.size) for f in matplotlib.font_manager.fontManager.ttflist] + |
This file contains 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
# run this in a jupyter notebook; looks much better in jupyter lab | |
# based on: http://jonathansoma.com/lede/data-studio/matplotlib/list-all-fonts-available-in-matplotlib-plus-samples/ | |
import matplotlib.font_manager | |
from IPython.core.display import HTML | |
def make_html(font, fonts): | |
default_size = '26px' | |
html = f"<p>{font}<br>" | |