Join the "Lobby" group with the link above to initiate contact.
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
def newtons_sqrt(i, /, *, precision=1e-10): | |
loops = 0 | |
x = (1+i) // 2 | |
d = i | |
n_x = 0 | |
print(f'{precision=}', flush=True) | |
while loops < x and abs(d) > precision: | |
loops += 1 | |
print(f'{loops=} abs(d) = {abs(d)}: {d=}', flush=True) | |
n_x = x - (x*x - i)/(2*x) |
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 | |
import datetime | |
import os | |
# import wmi | |
# https://github.com/tjguk/wmi | |
# https://github.com/tcely/wmi | |
class LastBoot: |
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 | |
import hashlib | |
import io | |
import os | |
import pathlib | |
import sys | |
def sum_file(hasher, file_path): |
Any GitHub user account can contain GPG keys used for signed commits.
To verify these signatures, your local gpg.program
needs the public key.
To fetch them, just use a URL such as this:
https://github.com/<ACCOUNT>.gpg
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
url_decode() { | |
local arg ; | |
if [ $# -gt 0 ]; then | |
for arg; do | |
printf -- '%s\n' "${arg}" ; | |
done | url_decode ; | |
else | |
check_printf ; | |
printf -- '%b\n' "$(sed -E -e 's/\+/ /g' -e 's/%([0-9a-fA-F]{2})/\\x\1/g')" ; | |
fi ; |
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
# Add this to the ~/.ssh/config file | |
# | |
Match Exec "ssh-rsa-needed.sh '%n' '%C' '%l' '%h' '%p' '%r'" | |
PubkeyAcceptedKeyTypes +ssh-rsa |
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
if [ "${BASH_VERSION-}" ]; then | |
# Local variables the functions depend upon | |
_bash_history_prefix=~/.local/history/bash | |
# {{{ Begining of the temporary functions block | |
_bash_history_get_today() { | |
date '+%Y/0%m/%d' | |
} |
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 sh | |
secho() { | |
_arg="${1}"; | |
_fmt='%s'; | |
_sentinel='--'; | |
case "${_arg}" in | |
(-e|-en|-ne) _fmt='%b'; shift ;; | |
(-n|-En|-nE) shift ;; |
NewerOlder