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 bash | |
# Exit on error | |
set -e | |
function usage { | |
echo "Usage: $0 [options]" | |
echo "Options:" | |
echo " -h, --help Show this help message" | |
echo " -r, --reduce EXT Reduce image size (jpg, png)" |
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 | |
# This script calculates the substantial presence test for US tax purposes. | |
# Example usage: ./residency_calc.py "2025-02-02,2025-03-03;2024-04-04,2024-05-05;2023-06-06,2023-07-07" | |
import argparse | |
from dataclasses import dataclass | |
from datetime import datetime |
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
# ref: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository | |
setup_apt_repo() { | |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get install ca-certificates curl gnupg | |
sudo install -m 0755 -d /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg |
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
45403 socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 3 | |
45403 setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0 | |
45403 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0 | |
45403 setsockopt(3, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0 | |
45403 bind(3, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0 | |
45403 getsockname(3, {sa_family=AF_NETLINK, nl_pid=45403, nl_groups=00000000}, [12]) = 0 | |
45403 sendto(3, [{nlmsg_len=40, nlmsg_type=RTM_GETLINK, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=1694105256, nlmsg_pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0, ifi_flags=0, ifi_change=0}, [{nla_len=8, nla_type=IFLA_EXT_MASK}, RTEXT_FILTER_VF]], 40, 0, NULL, 0) = 40 | |
45403 recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 2844 |