This file contains hidden or 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
.blinkme{ | |
animation: blinker 2s infinite; | |
font-size:300%; | |
} | |
@keyframes blinker { | |
0% {opacity:1;color:#00F} | |
5% {opacity:1} | |
5.1% {opacity:0} | |
9.9% {opacity:0;color:#00F} |
This file contains hidden or 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
import datetime | |
import random | |
import urllib.parse | |
import hmac | |
import hashlib | |
import base64 | |
import requests | |
import pytz | |
""" To setup RAM sub-accounts, use the following policy: |
This file contains hidden or 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
import itertools | |
import struct | |
unpack = struct.unpack | |
ts = """CURSOR=1 | |
BITMAP=2 | |
ICON=3 | |
MENU=4 | |
DIALOG=5 | |
STRING=6 |
This file contains hidden or 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
import re | |
NAME_PATTERN = re.compile(r'(?P<name>[^ "]+|".*") \<(?P<email>.*@.*)\>') | |
ENCODED_PATTERN = re.compile(r'=\?(?P<charset>.*)\?(?P<encoding>.*)\?(?P<encodedtext>.*)\?=') | |
import sys | |
def eprint(*args, **kwargs): | |
print(*args, file=sys.stderr, **kwargs) | |
This file contains hidden or 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
#!/bin/sh | |
if [ $EUID -eq 0 ]; then | |
echo "Please don't run me with root privilege!" | |
exit 1 | |
fi | |
ROOT="$(dirname "$(readlink -f "$0")")" | |
DATABASE=db |
This file contains hidden or 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 typing import List, Tuple | |
from ipaddress import _BaseAddress, _BaseNetwork | |
import io | |
import math | |
import random | |
import argparse | |
import ipaddress |
This file contains hidden or 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
allusers=$(cat) | |
for i in $allusers ; do | |
mv $i ==$i && \ | |
btrfs subvol create $i && \ | |
chown --reference===$i $i | |
done | |
for i in $allusers ; do | |
cp -a --reflink=always ==$i/. $i |
This file contains hidden or 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
# rate limit, max 20KB/s from 192.168.1.1 | |
nft -f - <<EOF | |
table ip test { | |
chain inbound { | |
type filter hook input priority filter; policy accept; | |
ip saddr 192.168.1.1 limit rate over 20 kbytes/second drop | |
} | |
} | |
EOF |
This file contains hidden or 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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": [ | |
{ | |
"command": "find", | |
"keys": "ctrl+shift+f" | |
}, | |
{ | |
"command": { |
This file contains hidden or 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
import json | |
import collections | |
import os | |
def sort_keys(x): | |
if isinstance(x, list): | |
return [sort_keys(i) for i in x] | |
elif isinstance(x, dict): | |
ks = sorted(x.keys()) |