Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"

echo "Testing RSS feed..."
cd "$PROJECT_ROOT" && python -m tests.test_rss_feed

if [ $? -ne 0 ]; then
echo "RSS feed validation failed"
exit 1
fi
31 changes: 31 additions & 0 deletions .github/workflows/test-rss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test RSS Feed

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test-rss:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests

- name: Test RSS feed
run: python -m tests.test_rss_feed
16 changes: 15 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@ project:
website:
title: "Matt Triano"
site-url: https://www.matttriano.dev
description: "Experiments, walkthroughs past-me would have liked, and gifts to future me"
description: "Notes and how-tos on data engineering, analysis, python, networking, experiments with hot new things, and more"
navbar:
right:
- about.qmd
- icon: github
href: https://github.com/MattTriano
- icon: rss
href: index.xml
feed:
posts:
limit: 20
feed-url: /index.xml
escape: true
items:
- title: true
- date: true
- description:
html: true
html-type: application/xhtml
length: 2000
format:
html:
theme: darkly
Expand Down
74 changes: 14 additions & 60 deletions posts/019_setup_tailscale_for_ssh/install_code_security_audit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"id": "639b5105-cae7-470d-902b-e7bfebe7219f",
"metadata": {},
"source": [
"### Tailscale Client Installation on a Ubuntu/Debian Linux Machine {.linux_install}\n",
"### Tailscale Client Installation on a Ubuntu/Debian Linux Machine\n",
"\n",
"```console\n",
"curl -fsSL https://tailscale.com/install.sh | sh\n",
Expand Down Expand Up @@ -80,7 +80,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Lines in install script: 626\n"
"Lines in install script: 627\n"
]
}
],
Expand Down Expand Up @@ -493,7 +493,7 @@
"\t\t\t\tVERSION=\"\" # rolling release\n",
"\t\t\t\tPACKAGETYPE=\"pacman\"\n",
"\t\t\t\t;;\n",
"\t\t\tmanjaro|manjaro-arm)\n",
"\t\t\tmanjaro|manjaro-arm|biglinux)\n",
"\t\t\t\tOS=\"manjaro\"\n",
"\t\t\t\tVERSION=\"\" # rolling release\n",
"\t\t\t\tPACKAGETYPE=\"pacman\"\n",
Expand Down Expand Up @@ -829,7 +829,8 @@
"\t\t\t;;\n",
"\t\tfreebsd)\n",
"\t\t\tif [ \"$VERSION\" != \"12\" ] && \\\n",
"\t\t\t [ \"$VERSION\" != \"13\" ]\n",
"\t\t\t [ \"$VERSION\" != \"13\" ] && \\\n",
"\t\t\t [ \"$VERSION\" != \"14\" ]\n",
"\t\t\tthen\n",
"\t\t\t\tOS_UNSUPPORTED=1\n",
"\t\t\tfi\n",
Expand Down Expand Up @@ -882,8 +883,7 @@
"\t\telse\n",
"\t\t\techo \"No /etc/os-release\"\n",
"\t\tfi\n",
"\t\texit 1\n",
"\tfi\n"
"\t\texit 1\n"
]
}
],
Expand Down Expand Up @@ -916,6 +916,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\t# Step 3: work out if we can run privileged commands, and if so,\n",
"\t# how.\n",
"\tCAN_ROOT=\n",
Expand All @@ -934,8 +935,7 @@
"\t\techo \"This installer needs to run commands as root.\"\n",
"\t\techo \"We tried looking for 'sudo' and 'doas', but couldn't find them.\"\n",
"\t\techo \"Either re-run this script as root, or set up sudo/doas.\"\n",
"\t\texit 1\n",
"\tfi\n"
"\t\texit 1\n"
]
}
],
Expand Down Expand Up @@ -1038,6 +1038,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\t# Step 4: run the installation.\n",
"\tOSVERSION=\"$OS\"\n",
"\t[ \"$VERSION\" != \"\" ] && OSVERSION=\"$OSVERSION $VERSION\"\n",
Expand Down Expand Up @@ -1142,7 +1143,7 @@
"\t\t\t;;\n",
"\t\tpkg)\n",
"\t\t\tset -x\n",
"\t\t\t$SUDO pkg install tailscale\n",
"\t\t\t$SUDO pkg install --yes tailscale\n",
"\t\t\t$SUDO service tailscaled enable\n",
"\t\t\t$SUDO service tailscaled start\n",
"\t\t\tset +x\n",
Expand Down Expand Up @@ -1180,8 +1181,7 @@
"\t\t*)\n",
"\t\t\techo \"unexpected: unknown package type $PACKAGETYPE\"\n",
"\t\t\texit 1\n",
"\t\t\t;;\n",
"\tesac\n"
"\t\t\t;;\n"
]
}
],
Expand Down Expand Up @@ -1263,54 +1263,7 @@
"\n",
"\n",
"Modern keyring gpg key (compressed, binary format)\n",
"Pʌ�g\u0006�|\u0004Bb���e-�A�d��<�\u0005�\u001c",
"�\u001afCJͳpc/���4���0� ��N<\u0012�Q��Fk&��\u001f���j�=,�70�� ����%�P��\u0006*T1�\u001f�\u0000^.C_�w/v\u0018x��#\"�7� `�k�?�F�^CA�.�\u0016����\u0003\u001c",
"�^�\\4�Dm\u000f��a��\u001f�'y��^�ɫo׍�z;\t\u0010^ꐦ�\u0001��Hȵ�嚍�\u0000s_�R�m#(҆��Q�W\u0013N�7U���\u0015'pP��<�\u0010�|\u0001#\"�aiU�\u0001�\u0011d�ݕ{\u001c",
"���\u0018\u0003Sλ(�[H���i�}x*ӟ6)�kL��\u0005tă�L5���M��\u0011�F7�3�#����^a!)�m� =\u0019!��\\jR��e�G�w7Lj���.�b��^��w�\n",
"$�j\"\\�\n",
"�h�%\u0014�nj�����H?\f",
"��u���*㚳���zߕC�\n",
"-=g2���\u0007�&/}���ňlvt�\u0004tِ����Ӗ��{�� J=\u0000\u0011\u0001\u0000\u0001�DTailscale Inc. (Package repository signing key) <info@tailscale.com>�\u0002N\u0004\u0013\u00008\u0016!\u0004%�����8!�<\n",
"yE��2�Xh\u0005\u0002^T��\u0002\u001b\u0003\u0005\u000b",
"\u0007\u0002\u0006\u0015\n",
"\u000b",
"\u0002\u0004\u0016\u0002\u0003\u0001\u0002\u001e",
"\u0001\u0002\u0017�\u0000\n",
"\u0004^T��\u0001\u0010\u0000�H��x]�X<f�\u001e",
"�0��fm�r���`�\u0002�䂡\f",
"\u0003���5ej\u0013W�\u000f\u001b�l\f",
"�PG��k��(�\u0011j��E<��)���N�\u0004��+7��\u0013�J�\u0015\u000e\tDl��\u0015�\u001bE��/��Xn!�\u0015��^�2�v,\u000fe��||L>��\u0011���v�|��d'$UK'b6�\u0003�x�\f",
"/z�\u001be�z$.Rl2�M͒\u0013����\u0004\u0010�*���\u000b",
"N\u001d",
"��\u0017#�G�rGST�\u00057�.�\u0005��\u0014�ɥ\u0013���5�X9��4\u000f�\u0007\u0013k3ل��o���a7V�\f",
"�Jdݢ���գ\u0000jIZ>@d!�\u001d",
"�k�kU���ܫBBa�F$u�3\u001b��]H~!~a�a��xm�+{�s���j��CU��D�\u00191�=���r��\u0002�\f",
"��k����\u001e",
"}4�Ԃ\u0002�P\"k���\u0002\n",
"!#&\u0013Q�Y\"C�`\u0016�\u00067�Va�H�\u0012�K�����}��8x%��P:�ȰT�U���\"�f��x���b����2Pr�U\u0006�\u001456x(��Ĺ�k�X��(�!I�AO\u0007�Y��\u001d",
"����\u0004Jʀ�\"�3���\n",
"$L�P\u0006�\u0004\u000e0�_��ܸ��>A\n",
"�\u0002�w�g\u000b",
"��H�۷�jK$��\u0014��f�2kb��@�T�X�l\u001a\u0006�Ņ�i%{�o�y�\u0019%�@\u0014�q٘\u001f!ϸ�+��v\u0000�5X,\u0007Ť\n",
"j�\t�%��X�g��\u0002�;]_ֹ1\u000e1e�L�g�ه��J�\u0019A�2F����� h '��T\u0000\u0010�j�O�/Y�V�<��\u0002�\u00157��Q�\u001e",
"\u0000}'#\u0000\u0011\u0001\u0000\u0001�\u00026\u0004\u0018\u0000 \u0016!\u0004%�����8!�<\n",
"yE��2�Xh\u0005\u0002^T��\u0002\u001b\f",
"\u0000\n",
"�\u0014�\tMx�G<q�\u0007��\u000e/r.y�v�g\u0018��\f",
"1v\n",
"��,1\u0005\u000em�V�˲m&�Jb\u0016\u0015S5\u001a��2\u001e",
"Qc\u0003\u001an�ס�pRLW�\u0000#*�v�x��(]�1�4\u0004�\u000e��\u001c",
"�\u0010{\f",
"~K\u0014��6��\u001f8d9�����\u000f���~ᥳ�e��S�uT=��g�3\u0005��z� �j��\u0000P����{�\u0004s���\u0002\u0000Ӫ��\u0016C�&��\u0000�ԛ_VO3���g\u001f�z��'�%���\u0001ފ8]7T��m\u0005dQ��0n\u0005�F�\"w��\u001e",
"/^c���pa�\u001d",
"�E\u001d",
"�y���X��\n",
"׏�c(���wc\u0013�\f",
"\u0016��*���0��3BLK�S\u001c",
"d7R�ur�� �\u001a�3�\u001c",
"!\u00159�-9���\u0001U�\u001b���hL6ɭ��[*�z��锅�-#��G�]\u0016�Г�\u0006\tq\u001d",
"��3��g�\u001a\u000e��M\\[q�/$�gɘ��}J�ba��\u001b0{L�,\u0013\n",
"�\n",
"Omitted due to being unparsable binary\n",
"\n",
"# Tailscale packages for ubuntu jammy\n",
"deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main\n",
Expand Down Expand Up @@ -1344,7 +1297,8 @@
"keyring_keyfile_resp = requests.get(keyring_keyfile_url)\n",
"keyring_keyfile_resp.raise_for_status()\n",
"print(f\"\\n\\nModern keyring gpg key (compressed, binary format)\")\n",
"print(keyring_keyfile_resp.text)\n",
"print(\"Omitted due to being unparsable binary\")\n",
"# print(keyring_keyfile_resp.text)\n",
"\n",
"# $CURL \"https://pkgs.tailscale.com/$TRACK/$OS/$VERSION.tailscale-keyring.list\" | $SUDO tee /etc/apt/sources.list.d/tailscale.list\n",
"keyring_pkg_repo_url = f\"https://pkgs.tailscale.com/{track}/{os}/{version}.tailscale-keyring.list\"\n",
Expand Down
20 changes: 10 additions & 10 deletions posts/019_setup_tailscale_for_ssh/setting_up_tailscale.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"If `golang` isn't installed, [download](https://go.dev/dl/) and install golang and make sure the `go` binary is in a dir on the system's `PATH`.\n",
"\n",
"Then, run these commands\n",
"\n",
"```console\n",
"go install tailscale.com/cmd/tailscale{,d}@main\n",
"sudo $HOME/go/bin/tailscaled install-system-daemon\n",
Expand All @@ -102,7 +103,7 @@
"\n",
"You might have to manually add your tailnet's DNS server IP address to your MacOS-running-machine's DNS servers. Go into system settings, search for **DNS**, and add IP address \"100.100.100.100\" ahead of the existing IP address (Most routers use \"192.168.0.1\"). If you sometimes connect to Wi-Fi and other times use ethernet, you'll probably have to do this for both connection modes.\n",
"\n",
"![First caption](imgs/macos_dns_fix.png){fig-align=\"center\" width=\"50%\"}"
"![Manually add the tailscale DNS](imgs/macos_dns_fix.png){fig-align=\"center\" width=\"50%\"}"
]
},
{
Expand Down Expand Up @@ -145,17 +146,17 @@
"id": "b0235e5d-6c3a-4322-84d6-e9a9225bf793",
"metadata": {},
"source": [
"| ![First caption](imgs/android_install_1.png){width=\"100%\"} | ![Second caption](imgs/android_install_2.png){width=\"100%\"} |\n",
"|:--:|:--:|\n",
"| 2.1. **Get Started** | 2.2. Click **OK** to allow a VPN connection |\n",
"\n",
"| ![First caption](imgs/android_install_3.png){width=\"100%\"} | ![Second caption](imgs/android_install_4.png){width=\"100%\"} |\n",
"|:--:|:--:|\n",
"| 3. **Log in** | 3. via the method used when signing up |\n",
"| ![First caption](imgs/android_install_1.png){width=\"100%\"} | ![Second caption](imgs/android_install_2.png){width=\"100%\"} |\n",
"\n",
"| ![First caption](imgs/android_install_5.png){width=\"100%\"} | ![Second caption](imgs/android_install_6.png){width=\"100%\"} |\n",
"| 3. **Log in** | 3. via the method used when signing up |\n",
"|:--:|:--:|\n",
"| ![First caption](imgs/android_install_3.png){width=\"100%\"} | ![Second caption](imgs/android_install_4.png){width=\"100%\"} |\n",
"\n",
"| 4. **Connect** the device | 4. Open up the Admin console |\n",
"|:--:|:--:|\n",
"| ![First caption](imgs/android_install_5.png){width=\"100%\"} | ![Second caption](imgs/android_install_6.png){width=\"100%\"} |\n",
"\n",
"Then click **Approve** (not pictured, too much to redact)."
]
Expand Down Expand Up @@ -285,7 +286,6 @@
"\t\t},\n",
"\t],\n",
"}\n",
"\n",
"```"
]
},
Expand All @@ -300,9 +300,9 @@
"\n",
"In the **Edit ACL Tags** interface, click the **Add tags** dropdown and select the **tag:homelab** option. Note that these options were defined in the **tagOwner** section of ACL policy file.\n",
"\n",
"![First caption](imgs/acl_open_tag_adding_interface.png){fig-align=\"center\" width=\"80%\"}\n",
"![Open the ACL tags interface](imgs/acl_open_tag_adding_interface.png){fig-align=\"center\" width=\"80%\"}\n",
"\n",
"![First caption](imgs/acl_add_tag_to_homelab.png){fig-align=\"center\" width=\"60%\"}\n",
"![Add a tag to a device](imgs/acl_add_tag_to_homelab.png){fig-align=\"center\" width=\"60%\"}\n",
"\n",
"Now, from a terminal on the homelab machine, run this command to direct tailscale to start up in `ssh` mode, which will persist even after rebooting.\n",
"\n",
Expand Down
Loading