View atlas_claimer.sh
#!/bin/bash | |
# Dependencies: curl, jq, realpath, date (GNU), at | |
API_KEY="FIXME" | |
claim_endpoint() { | |
local regid=$1 | |
curl -s -H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ |
View data.yaml
--- | |
data_1: | |
- id: 1 | |
key: hello | |
- id: 2 | |
key: world | |
data_2: | |
- id: 1 |
View wgwatchdog.sh
#!/bin/sh | |
check_reachability() { | |
local target="$1" | |
local retval | |
ping6 -c1 -W1 "$target" >/dev/null 2>&1 | |
retval="$?" | |
[ "$retval" -eq 2 ] && { | |
ping -c1 -W1 "$target" >/dev/null 2>&1 | |
retval="$?" |
View oneshot_setup.sh
#!/bin/sh | |
# Enable gadget mode | |
echo "dtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt | |
systemctl enable setupgadget.service | |
# alternatively: ln -s /etc/systemd/system/setupgadget.service /etc/systemd/system/basic.target.wants/setupgadget.service | |
# Enable getty on the virtual serial line | |
systemctl enable serial-getty@ttyGS0.service | |
# alternatively: ln -s /lib/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyGS0.service |
View videocuttter.sh
#!/bin/bash | |
INFILE="input_video.mp4" | |
FPS=30 | |
get_seconds() { | |
local seconds=0 | |
IFS=":" read -ra T <<< "$1" | |
for x in "${T[@]}"; do | |
seconds=$(echo "$seconds * 60 + $x" | bc) |
View happykaktus.py
#!/usr/bin/env python3 | |
import lxml.html | |
import urllib.request | |
from pathlib import Path | |
import requests | |
telegram_bot_token = "FIXME" | |
telegram_group_name = "@kvetinac" |
View wgcf.py
#!/usr/bin/env python3 | |
import subprocess | |
import json | |
import os | |
from pathlib import Path | |
import requests | |
from requests.compat import urljoin |
View walk_sk_nsec3_ds.py
#!/usr/bin/env python3 | |
from hashlib import sha1 | |
from base64 import b32encode | |
import csv | |
from collections import OrderedDict | |
from itertools import zip_longest | |
import dns.name | |
from dns.rdtypes.ANY.NSEC3 import b32_normal_to_hex |
View grabivysilani.py
#!/usr/bin/env python3 | |
import subprocess | |
import youtube_dl | |
import click | |
from pprint import pprint | |
@click.command() |
View rpsl_to_fred.py
#!/usr/bin/env python3 | |
import gzip | |
import hashlib | |
import sys | |
from collections import defaultdict | |
def read_db_dump(fname="ripe.db.domain.gz"): | |
obj = None |
NewerOlder