Skip to content

Instantly share code, notes, and snippets.

@vandot
vandot / k3sup_ha.yml
Last active Nov 4, 2020
ansible-playbook k3sup_ha.yml
View k3sup_ha.yml
---
- hosts: localhost
gather_facts: true
connection: local
roles:
- role: vandot.k3sup.k3sup
tasks:
- name: Create ssh key
community.digitalocean.digital_ocean_sshkey:
oauth_token: "{{ oauth_token }}"
View k3sup_parallel.yml
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- name: Create ssh key
community.digitalocean.digital_ocean_sshkey:
oauth_token: "{{ oauth_token }}"
name: mykey
ssh_pub_key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}"
View network-partition.yaml
apiVersion: pingcap.com/v1alpha1
kind: NetworkChaos
metadata:
name: network-partition-example
namespace: vandot
spec:
action: partition
mode: one
duration: "59s"
selector:
@vandot
vandot / whois_server_list.txt
Last active Oct 5, 2018
List of whois servers with note about is expiration date provided per domain
View whois_server_list.txt
domain whois_server test_domain expiration_field
ac whois.nic.ac nic.ac true
ad [none]
ae whois.nic.ae nic.ae true
aero whois.aero nic.aero true
af whois.nic.af nic.af true
ag whois.nic.ag nic.ag true
ai whois.nic.ai nic.ai true
al [web-only] https://www.webhost.al/al-whois.html false
am whois.amnic.net nic.am false
View keybase.md

Keybase proof

I hereby claim:

  • I am vandot on github.
  • I am vandot (https://keybase.io/vandot) on keybase.
  • I have a public key ASA1JvSlCSblxj1H5KYUwq9X5Civ-fMnUTCfCxHsUQlm3Ao

To claim this, I am signing this object:

@vandot
vandot / shh.sh
Created May 13, 2017
You have to many dynamic instances? Resolves all key issues and connects to instance the moment is up.
View shh.sh
#!/usr/bin/env bash
declare -x USER=""
declare -x HOST=""
declare -x KEY1=""
declare -x KEY2=""
retry_scan() {
while true; do
KEY1=$(ssh-keyscan -t ecdsa "${1}")
@vandot
vandot / _curl_api
Created Oct 14, 2016
Bash completion script for curl for exploring internal instance (169.254.169.254) API on AWS and GCP
View _curl_api
# curl metadata api explorer -*- shell-script -*-
# you can copy paste it inside ~/.bash_completion
_curl_api()
{
local cur prev word cword
_init_completion -n : || return
case "$cur" in
@vandot
vandot / geoipbind.py
Created Mar 16, 2016
Fetch geoip data and create Bind9 ACL based on continents for poor man's GSLB service
View geoipbind.py
#!/usr/bin/env python
import csv
import urllib
import zipfile
import os
link = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip'
csv1 = 'GeoLite2-Country-Blocks-IPv4.csv'
csv2 = 'GeoLite2-Country-Locations-en.csv'