This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gnuplot | |
set timefmt '%Y-%m-%d' | |
set xdata time | |
set yrange [1<*:] | |
set format x '%Y-%m-%d' | |
set xrange ["2020-03-01"<*:] | |
set datafile sep ',' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
MYPID=$$ | |
watchdog () { | |
( PID=$1 | |
DONE=0 | |
while [[ $DONE == 0 ]]; do | |
echo "watchdog running" | |
if $( kill -0 $PID ); then | |
sleep 1; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S bash -i | |
STASH=~/.secrets | |
RZ="\e[0m" | |
GR="\e[92m" | |
RD="\e[91m" | |
HL="\e[1m" | |
mkdir $STASH &> /dev/null | |
chmod 700 $STASH | |
if [ ! -z "$1" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.7 | |
from functools import reduce | |
push_to_stack=object() | |
stack=[] | |
OP="+/-*" | |
all_true=lambda x: True | |
def crush_stack(): | |
global stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.7 | |
from functools import reduce | |
crush_stack=object() | |
stack=[] | |
dispatch={ | |
lambda x: True : | |
print, | |
str.isdigit : | |
lambda x: stack.append(int(x)), | |
lambda x: x in '+*/-' : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# usage python3 dict2graph.py | xdot - | |
DIGRAPH = """digraph structs { | |
graph [ | |
rankdir= "TD" | |
bgcolor=white | |
] | |
node [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf8 -*- | |
from pyquery import PyQuery as P | |
from archery import mdict | |
from archery.trait import Copier | |
from pyaml import dumps | |
import re | |
by3 = lambda s: "".join( | |
[ " " * int((i+1)%3==0) + x for i,x in enumerate(s[::-1])][::-1]).strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unbound domain blacklist that works with pihole? and my code | |
# https://gist.github.com/jul/40c35d751f513dab0e15f6ea9732ca83 | |
# get_unbound_adblock.sh | |
optnx.com | |
xlanding.pw | |
jwpsrv.com | |
adnxs.com | |
faktor.io | |
ferank.eu | |
bidswitch.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from bla import * | |
from ldap3 import * | |
from contextlib import contextmanager | |
from sys import argv | |
import ipaddress as ip | |
netmask = lambda s: str(ip.IPv4Network("0.0.0.0/%s" % s.dhcpNetmask).netmask) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Perversion | |
""" | |
from collections import MutableMapping, Counter, MutableSequence | |
from json import * | |
from functools import reduce |