Skip to content

Instantly share code, notes, and snippets.

@vandot
vandot / k3sup_ha.yml
Last active November 4, 2020 14:37
ansible-playbook 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 }}"
---
- 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') }}"
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 December 27, 2023 12:02
List of whois servers with note about is expiration date provided per domain
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
@vandot
vandot / keybase.md
Last active December 22, 2019 20:50

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 17:32
You have to many dynamic instances? Resolves all key issues and connects to instance the moment is up.
#!/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 October 14, 2016 23:27
Bash completion script for curl for exploring internal instance (169.254.169.254) API on AWS and GCP
# 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 March 16, 2016 00:52
Fetch geoip data and create Bind9 ACL based on continents for poor man's GSLB service
#!/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'