Skip to content

Instantly share code, notes, and snippets.

Petr Ruzicka ruzickap

Block or report user

Report or block ruzickap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ruzickap / aws_create_site.yml
Created Feb 16, 2017
Ansible playbook which creates instances and tag volumes
View aws_create_site.yml
- name: Create Instance in AWS
hosts: localhost
connection: local
gather_facts: false
aws_access_key: "xxxxxx"
aws_secret_key: "xxxxxx"
security_token: "xxxxxx"
ruzickap /
Last active Feb 2, 2020
Automatically check links on web pages
git clone
cd check_urls
mkdir -p .github/workflows
cat > .github/workflows/periodic-broken-link-checks.yml << \EOF
name: periodic-broken-link-checks
- cron: '0 0 * * *'
ruzickap /
Created Apr 6, 2014
OpenWrt WiFi configuration tweaks
uci set
uci set wireless.radio0.htmode=HT40-
uci set wireless.radio0.noscan=1
uci set wireless.radio0.bursting=1
uci set wireless.radio0.ff=1
uci set wireless.radio0.compression=1
uci set wireless.radio0.xr=1
uci set
uci set wireless.radio0.txpower=20
ruzickap /
Created Mar 22, 2018
Short script which will move all audio (in/out)put to the USB Headphones
#!/bin/bash -eux
#pacmd list-sink-inputs
#pacmd list-source-outputs
pacmd stat | grep -E '^Default (sink|source) name'
ruzickap /
Created May 2, 2014
OpenWrt - Guest WiFi configuration
uci set network.wifi_open=interface
uci set network.wifi_open.type=bridge
uci set network.wifi_open.proto=static
uci set network.wifi_open.ipaddr=
uci set network.wifi_open.netmask=
uci add wireless wifi-iface
uci set wireless.@wifi-iface[-1].device=radio0
uci set wireless.@wifi-iface[-1].mode=ap
uci set wireless.@wifi-iface[-1]
ruzickap /
Created Dec 23, 2014
BIGIP F5 initial configuration
#(root / default)
tmsh modify sys global-settings mgmt-dhcp disabled
tmsh create sys management-ip
tmsh create sys management-route default gateway
#(or you can use "config" command - to speed it up)
tmsh modify sys dns name-servers add { }
tmsh modify sys dns search add { }
ruzickap / git-repository-gpg-crypt
Created Nov 1, 2019
Make git repository encrypted with generated GPG key which can be used by CI/CD to access the git repo when using GitHub Actions
View git-repository-gpg-crypt
# Make sure you are using gpg2
git config --global gpg.program gpg2
# Clone empty repository
git clone
# Configure a repository to use git-crypt
cd terraform-gitops
git-crypt init
# Connect to PostgreSQL database internally
kubectl run -i --tty --rm psql --image=postgres --env "PGPASSWORD=user_password" --command -- \
psql -U myuser -h patroni.patroni.svc.cluster.local my_database
# Port forwarding to service
kubectl port-forward -n harbor service/harbor 8080:443
ruzickap /
Last active Aug 27, 2019
Decode RAW files form camera using darktable-cli + XMP to JPEG
#!/bin/bash -eu
for XMP_FILE in *.xmp; do
RAW_FILE=`awk -F \" '/xmpMM:DerivedFrom=/ { print $2 }' $XMP_FILE`
echo "*** $XMP_FILE [$RAW_FILE] [$FILE_NAME]"
if [ "$RAW_FILE_NAME" != "$RAW_FILE" ]; then
ruzickap /
Created Sep 27, 2014
OVFTool installation on ESXi
#Download OVF tools
wget -q -O /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Extract ovftool content to /vmfs/volumes/My_Datastore
tar -xzf /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz -C /vmfs/volumes/My_Datastore/
rm /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Modify the ovftool script to work on ESXi
sed -i 's@^#!/bin/bash@#!/bin/sh@' /vmfs/volumes/My_Datastore/vmware-ovftool/ovftool
You can’t perform that action at this time.