Skip to content

Instantly share code, notes, and snippets.

alias cfg="git --git-dir=$HOME/.cfg --work-tree=$HOME"
alias cfg-tig="env GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME tig"
// Thomann Delete all items from basket.
var items = document.getElementsByClassName('delete-action')
for (var i = 0; i < items.length; i++) {
items[i].click()
}
#!/usr/bin/env python3
import CloudFlare
import argparse
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-e", "--email", required=True, help="The Cloudflare login email to use")
parser.add_argument("-n", "--hostname", required=True, help="The hostname to update, e.g. mydyndns.mydomain.com")
parser.add_argument("-k", "--api-key", required=True, help="The Cloudflare global API key to use. NOTE: Domain-specific API tokens will NOT work!")
error: failed to run custom build command for `openssl-sys v0.9.72`
Caused by:
process didn't exit successfully: `/home/alarm/cfddns/src/cfddns-1.6.2/target/release/build/openssl-sys-f45f371ab842d1b0/build-script-main` (exit s
tatus: 101)
--- stdout
cargo:rustc-cfg=const_fn
from celery import current_app
def send_task(name, args=(), kwargs={}, **opts):
task = current_app.tasks[name]
return task.apply(args, kwargs, **opts)
if 'test' in sys.argv:
current_app.send_task = send_task
@radupotop
radupotop / Sequence diagram
Created May 5, 2022 14:25
Mermaid Sequence diagram
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
@radupotop
radupotop / .pylintrc
Created April 29, 2022 08:29
pylintrc
[MESSAGES CONTROL]
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
@radupotop
radupotop / nginx.conf
Created March 14, 2022 01:08
Nginx default Dummy server
# Nginx default Dummy server
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_reject_handshake on;
return 444;
}
@radupotop
radupotop / iperf-lan-vs-wg.txt
Created March 9, 2022 10:04
iperf results LAN vs WG
iperf3 -c ham.lan -R
Connecting to host ham.lan, port 5201
Reverse mode, remote host ham.lan is sending
[ 5] local 192.168.1.44 port 36732 connected to 192.168.1.3 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 110 MBytes 925 Mbits/sec
[ 5] 1.00-2.00 sec 110 MBytes 921 Mbits/sec
[ 5] 2.00-3.00 sec 111 MBytes 928 Mbits/sec
[ 5] 3.00-4.00 sec 110 MBytes 924 Mbits/sec
@radupotop
radupotop / wireguard.conf
Created March 3, 2022 23:08 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown