Skip to content

Instantly share code, notes, and snippets.

View Paulomart's full-sized avatar

Paul Heidenreich Paulomart

View GitHub Profile
@Paulomart
Paulomart / main.py
Last active January 20, 2023 09:58
from tabulate import tabulate
from typing import List, Tuple
import re
Rule = Tuple[str, List[str]]
def rule_to_string(rule: Rule) -> str:
"""
Converts a rule to a string.
"""
@Paulomart
Paulomart / README.md
Last active August 24, 2020 12:22
Nice Flow Release Guide

Nice Flow Release Guide

Version:= x.x.x

Pull Changes From Remote

git checkout develop
git pull
git checkout master

🚧 Python mit Lego

Dieses Handbuch behandelt die Programmierung von EV3 Hardware mithilfe von Python und der Lego Labview Software. Zuerst werden wir uns die Hardware anschauen.

Hardware vorbreiten

Für den EV3

Für den EV3 ist eine besondere Vorbereitung notwendig.

@Paulomart
Paulomart / Clientlog
Last active February 15, 2016 18:49
Chunks
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
[19:47:31] [Netty Client IO #11/DEBUG]: IN: [PLAY:33] go
zone="example.com"
sub="subdomain" # subdomain
email="fuu@example.com" # your cloudflare email
token="xxxxxxxxxxxxxx" # you api key
rid="xxx" # record id, find it with https://www.cloudflare.com/docs/client-api.html#s3.3 3.3 - "rec_load_all" - Retrieve DNS Records of a given domain
IP=$(curl http://icanhazip.com/)
echo "Setting cloudflare dns $sub.$zone to $IP"
curl https://www.cloudflare.com/api_json.html -d 'a=rec_edit' -d "tkn=$token" -d "id=$rid" -d "email=$email" -d "z=$zone" -d 'type=A' -d "name=$sub" -d "content=$IP" -d 'service_mode=0' -d 'ttl=1'