Skip to content

Instantly share code, notes, and snippets.

View Summertime's full-sized avatar
😳
programming

Andrew C. H. McMillan Summertime

😳
programming
View GitHub Profile
Cloudflare:
1.1.1.1
1.0.0.1
2606:4700:4700::1111
2606:4700:4700::1001
Quad9:
9.9.9.9
149.112.112.112
2620:fe::fe
2620:fe::9

Python 3 vs Perl 6

There are more ways to do it in perl6, so thats bad!

word-dash-number iteration

# Python
map('link-{}'.format, itertools.count())
# or
(f'link-{n}' for n in itertools.count())
#!/bin/dash
seq 1000000 |
sed 's|^|https://example.com/|' |
xargs -P20 -n1000 \
curl -sSNL -X HEAD --retry 5 -w '%{http_code},%{url_effective}\n' |
tee urls.txt
{
"array" = [
"value"
"value"
]
"array_empty" = [
]
"array_nested" = [
[
[

EMail: ProtonMail

  • 👍 Pay via BTC, Card, ...?
  • 👍 Encryption/Decryption happen client side
  • 👍 Web client is open source
  • 👍 Located in Switzerland
  • 👎 Apps are closed source, IMAP bridge is closed source

VPN: Mullvad

  • 👍 Pay via BTC, BCH, Card, Cash, Bank wire, PayPal, Swish
  • 👍 Custom client is open source
from signal import signal as _signal
from collections import defaultdict as _defaultdict
__all__ = ['pls_handle']
_pls_handlets = _defaultdict(list)
def _the_pls_handle_signal_handler(signalnum, frame):

STPAK Specification Draft

Notes

All integers in the file are unsigned little endian, everything is little endian, unless otherwise specified! the packers / unpackers are expected to work across platforms however.

File layout

@Summertime
Summertime / color.sh
Created October 8, 2019 01:21
Detect color resolution of the terminal
#!/bin/sh
detect_color_resolution() {
# 24bit
if [ "$COLORTERM" = "truecolor" ]
then
printf '%s\n' 24
return
elif [ "$COLORTERM" = "24bit" ]
then