Skip to content

Instantly share code, notes, and snippets.

View gfdsa's full-sized avatar
🐶
I have no idea

gfdsa

🐶
I have no idea
View GitHub Profile
@gfdsa
gfdsa / gist:a8ce789683580ed0e7998c7e3f856d04
Created June 22, 2020 10:01
gpg2 --encrypt --armor --recipient 51852D87348FFC4C < vscode-terraform-ls-stuck.txt
-----BEGIN PGP MESSAGE-----
hQEMA9X0O2Qy6nfzAQf/WhKd4/dj1wUwChewd3ZUYWTeq/F93zR5YsAA4QosVunH
FfVhbjV5Wd1FKLX2J7O19YrTPA3zHvviTcNbm2K1DFsvXaAmRwv1KdNxF3klxrt4
oA1NuTyfx7YxtEIbYBJbTnph54Ws01sfSrkIvhH832/LJVO/53+moPlXAeZXkVra
qvUmlzdUOear6U2nIKXX9yzOz/rkdtHxzRD62LSjIdOZ67hXWvk5KphpDuhqyi6y
f/Tb8dI0wfVTiiUCqWuiwGWxgBzarxU0qD0HElvy78kE9rqiFydkzLX27PD9vdyX
fhHo2H3hYJ3lFoub/w6HxqKuHvDnLHWWK8jsgRYvxtLsATz02g1Acxk1XIr8DaBw
+LJh5QiMAACseWkDewedFcTz5+uvNlFEgPZbtiYHIZYtS1ZPoOyGW2YGB5xh9/ra
jbdPtPUEhU9PJMwUq8CEr4lJ5xZLFRhWovq1sBEMzCcdu+/Q49XhkhWqd5lRwAIO
@gfdsa
gfdsa / hexonet.py
Created September 12, 2018 20:46
Authentication/cleanup hook for acme certbot to authenticate a domain via DNS-01 challenge and using hexonet API (ISP API)
#!/usr/bin/python
""" This is a 15 minutes hack so don't expect any fancies from it
The ispapi is this one: https://github.com/retailify/ispapi
Just pass it as --manual-auth-hook and --manual-cleanup-hook
or put in the reneal config as manual_auth_hook and manual_cleanup_hook
"""
import ispapi
import sys
import os
function getjson {
uri=$1
file=$2
[ ${uri: -1} == "&" ] && uri=${uri}pretty || uri=${uri}?pretty
curl -o ${file}.json -s $base$uri || { echo "Failed to curl $base$uri to ${file}.json"; exit 1; }
}
base="$1"
[ x$base == "x" ] && { echo "Provide a base url as argument 1"; exit 1; }
getjson "/_cluster/health" health
getjson "/_nodes/" nodes

Keybase proof

I hereby claim:

  • I am gfdsa on github.
  • I am gfdsa (https://keybase.io/gfdsa) on keybase.
  • I have a public key ASAIyxvEnrOeUkNPPIMi9pTQJLINbz9H_N95Gja7uhYjQgo

To claim this, I am signing this object: