Skip to content

Instantly share code, notes, and snippets.

@jsonn
jsonn / gandi.py
Created October 23, 2017 12:31
Basic Gandi LiveDNS client
#!/usr/bin/env python
import json
import requests
import sys
APIKEY = "xxx"
def create_domain_record(domain, name, rrtype, ttl, values):
r = requests.post("https://dns.api.gandi.net/api/v5/domains/%s/records" % domain,
1869 > 1 7 3 0 ba35d6c0 gzip
274 1 3 3 80 b6b2a3c0 tar pipe_rd
201 1 3 1 80 b6b2b700 sh wait
1343 1 3 1 80 ba9bc620 sh wait
104 1 3 2 80 b8770920 top select
1900 1 3 2 80 b8770660 sh wait
1807 1 3 3 80 baa7ce40 sshd select
80 1 3 1 80 ba9bcba0 sh wait
71 1 3 2 80 ba35c380 pickup kqueue
1893 1 3 1 80 bad62320 login wait
CREATE VIEW view_kunden_probe_messung AS
SELECT m.id, m.probe, m.messwert, m.groesse_zahl, m.groesse_text,
m.abzeichner, mw.vor_ort, mw.name AS messwert_name, b.account,
mw.arbeitsgruppe, mw.arbeitsgruppe_untergruppe AS untergruppe,
p.eingang, p.entnahmezeit, p.messpunkt,
mw.formel AS messwert_formel,
mw.position AS messwert_position, p.entnahme
FROM kunden_probe_messung m
INNER JOIN view_kunden_probe p ON (p.id = m.probe)
LEFT JOIN zentral_benutzer b ON (b.id = m.abzeichner)