Skip to content

Commit 29b31ee

Browse files
authored
Merge pull request #21 from MattTriano/iss020_add_rss_feed
Adds rss feed generation functionality and rss link to navbar
2 parents 145d935 + 0aef021 commit 29b31ee

File tree

6 files changed

+261
-71
lines changed

6 files changed

+261
-71
lines changed

.githooks/pre-commit

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
5+
6+
echo "Testing RSS feed..."
7+
cd "$PROJECT_ROOT" && python -m tests.test_rss_feed
8+
9+
if [ $? -ne 0 ]; then
10+
echo "RSS feed validation failed"
11+
exit 1
12+
fi

.github/workflows/test-rss.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test RSS Feed
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-rss:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install Quarto
23+
uses: quarto-dev/quarto-actions/setup@v2
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install requests
29+
30+
- name: Test RSS feed
31+
run: python -m tests.test_rss_feed

_quarto.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@ project:
44
website:
55
title: "Matt Triano"
66
site-url: https://www.matttriano.dev
7-
description: "Experiments, walkthroughs past-me would have liked, and gifts to future me"
7+
description: "Notes and how-tos on data engineering, analysis, python, networking, experiments with hot new things, and more"
88
navbar:
99
right:
1010
- about.qmd
1111
- icon: github
1212
href: https://github.com/MattTriano
13+
- icon: rss
14+
href: index.xml
15+
feed:
16+
posts:
17+
limit: 20
18+
feed-url: /index.xml
19+
escape: true
20+
items:
21+
- title: true
22+
- date: true
23+
- description:
24+
html: true
25+
html-type: application/xhtml
26+
length: 2000
1327
format:
1428
html:
1529
theme: darkly

posts/019_setup_tailscale_for_ssh/install_code_security_audit.ipynb

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"id": "639b5105-cae7-470d-902b-e7bfebe7219f",
4848
"metadata": {},
4949
"source": [
50-
"### Tailscale Client Installation on a Ubuntu/Debian Linux Machine {.linux_install}\n",
50+
"### Tailscale Client Installation on a Ubuntu/Debian Linux Machine\n",
5151
"\n",
5252
"```console\n",
5353
"curl -fsSL https://tailscale.com/install.sh | sh\n",
@@ -80,7 +80,7 @@
8080
"name": "stdout",
8181
"output_type": "stream",
8282
"text": [
83-
"Lines in install script: 626\n"
83+
"Lines in install script: 627\n"
8484
]
8585
}
8686
],
@@ -493,7 +493,7 @@
493493
"\t\t\t\tVERSION=\"\" # rolling release\n",
494494
"\t\t\t\tPACKAGETYPE=\"pacman\"\n",
495495
"\t\t\t\t;;\n",
496-
"\t\t\tmanjaro|manjaro-arm)\n",
496+
"\t\t\tmanjaro|manjaro-arm|biglinux)\n",
497497
"\t\t\t\tOS=\"manjaro\"\n",
498498
"\t\t\t\tVERSION=\"\" # rolling release\n",
499499
"\t\t\t\tPACKAGETYPE=\"pacman\"\n",
@@ -829,7 +829,8 @@
829829
"\t\t\t;;\n",
830830
"\t\tfreebsd)\n",
831831
"\t\t\tif [ \"$VERSION\" != \"12\" ] && \\\n",
832-
"\t\t\t [ \"$VERSION\" != \"13\" ]\n",
832+
"\t\t\t [ \"$VERSION\" != \"13\" ] && \\\n",
833+
"\t\t\t [ \"$VERSION\" != \"14\" ]\n",
833834
"\t\t\tthen\n",
834835
"\t\t\t\tOS_UNSUPPORTED=1\n",
835836
"\t\t\tfi\n",
@@ -882,8 +883,7 @@
882883
"\t\telse\n",
883884
"\t\t\techo \"No /etc/os-release\"\n",
884885
"\t\tfi\n",
885-
"\t\texit 1\n",
886-
"\tfi\n"
886+
"\t\texit 1\n"
887887
]
888888
}
889889
],
@@ -916,6 +916,7 @@
916916
"name": "stdout",
917917
"output_type": "stream",
918918
"text": [
919+
"\n",
919920
"\t# Step 3: work out if we can run privileged commands, and if so,\n",
920921
"\t# how.\n",
921922
"\tCAN_ROOT=\n",
@@ -934,8 +935,7 @@
934935
"\t\techo \"This installer needs to run commands as root.\"\n",
935936
"\t\techo \"We tried looking for 'sudo' and 'doas', but couldn't find them.\"\n",
936937
"\t\techo \"Either re-run this script as root, or set up sudo/doas.\"\n",
937-
"\t\texit 1\n",
938-
"\tfi\n"
938+
"\t\texit 1\n"
939939
]
940940
}
941941
],
@@ -1038,6 +1038,7 @@
10381038
"name": "stdout",
10391039
"output_type": "stream",
10401040
"text": [
1041+
"\n",
10411042
"\t# Step 4: run the installation.\n",
10421043
"\tOSVERSION=\"$OS\"\n",
10431044
"\t[ \"$VERSION\" != \"\" ] && OSVERSION=\"$OSVERSION $VERSION\"\n",
@@ -1142,7 +1143,7 @@
11421143
"\t\t\t;;\n",
11431144
"\t\tpkg)\n",
11441145
"\t\t\tset -x\n",
1145-
"\t\t\t$SUDO pkg install tailscale\n",
1146+
"\t\t\t$SUDO pkg install --yes tailscale\n",
11461147
"\t\t\t$SUDO service tailscaled enable\n",
11471148
"\t\t\t$SUDO service tailscaled start\n",
11481149
"\t\t\tset +x\n",
@@ -1180,8 +1181,7 @@
11801181
"\t\t*)\n",
11811182
"\t\t\techo \"unexpected: unknown package type $PACKAGETYPE\"\n",
11821183
"\t\t\texit 1\n",
1183-
"\t\t\t;;\n",
1184-
"\tesac\n"
1184+
"\t\t\t;;\n"
11851185
]
11861186
}
11871187
],
@@ -1263,54 +1263,7 @@
12631263
"\n",
12641264
"\n",
12651265
"Modern keyring gpg key (compressed, binary format)\n",
1266-
"Pʌ�g\u0006�|\u0004Bb���e-�A�d��<�\u0005\u001c",
1267-
"\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",
1268-
"�^�\\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",
1269-
"���\u0018\u0003Sλ(�[H���i�}x*ӟ6)�kL��\u0005tă�L5���M��\u0011�F7�3�#����^a!)�m� =\u0019!��\\jR��e�G�w7Lj���.�b��^��w�\n",
1270-
"$�j\"\\\n",
1271-
"�h�%\u0014�nj�����H?\f",
1272-
"��u���*㚳���zߕC�\n",
1273-
"-=g2���\u0007�&/}���ňlvt�\u0004tِ����Ӗ��{�� J=\u0000\u0011\u0001\u0000\u0001�DTailscale Inc. (Package repository signing key) <[email protected]>�\u0002N\u0004\u0013\u00008\u0016!\u0004%�����8!�<\n",
1274-
"yE��2�Xh\u0005\u0002^T��\u0002\u001b\u0003\u0005\u000b",
1275-
"\u0007\u0002\u0006\u0015\n",
1276-
"\u000b",
1277-
"\u0002\u0004\u0016\u0002\u0003\u0001\u0002\u001e",
1278-
"\u0001\u0002\u0017\u0000\n",
1279-
"\u0004^T��\u0001\u0010\u0000�H��x]�X<f�\u001e",
1280-
"�0��fm�r���`�\u0002�䂡\f",
1281-
"\u0003���5ej\u0013W�\u000f\u001b�l\f",
1282-
"�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",
1283-
"/z�\u001be�z$.Rl2�M͒\u0013����\u0004\u0010�*���\u000b",
1284-
"N\u001d",
1285-
"��\u0017#�G�rGST�\u00057�.�\u0005��\u0014�ɥ\u0013���5�X9��4\u000f\u0007\u0013k3ل��o���a7V�\f",
1286-
"�Jdݢ���գ\u0000jIZ>@d!�\u001d",
1287-
"�k�kU���ܫBBa�F$u�3\u001b��]H~!~a�a��xm�+{�s���j��CU��D�\u00191�=���r��\u0002\f",
1288-
"��k����\u001e",
1289-
"}4�Ԃ\u0002�P\"k���\u0002\n",
1290-
"!#&\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",
1291-
"����\u0004Jʀ�\"�3���\n",
1292-
"$L�P\u0006\u0004\u000e0�_��ܸ��>A\n",
1293-
"\u0002�w�g\u000b",
1294-
"��H�۷�jK$��\u0014��f�2kb��@�T�X�l\u001a\u0006�Ņ�i%{�o�y�\u0019%�@\u0014�q٘\u001f!ϸ�+��v\u0000�5X,\u0007Ť\n",
1295-
"j�\t�%��X�g��\u0002�;]_ֹ1\u000e1e�L�g�ه��J�\u0019A�2F����� h '��T\u0000\u0010�j�O�/Y�V�<��\u0002\u00157��Q�\u001e",
1296-
"\u0000}'#\u0000\u0011\u0001\u0000\u0001\u00026\u0004\u0018\u0000 \u0016!\u0004%�����8!�<\n",
1297-
"yE��2�Xh\u0005\u0002^T��\u0002\u001b\f",
1298-
"\u0000\n",
1299-
"\u0014\tMx�G<q�\u0007��\u000e/r.y�v�g\u0018��\f",
1300-
"1v\n",
1301-
"��,1\u0005\u000em�V�˲m&�Jb\u0016\u0015S5\u001a��2\u001e",
1302-
"Qc\u0003\u001an�ס�pRLW�\u0000#*�v�x��(]�1�4\u0004\u000e��\u001c",
1303-
"\u0010{\f",
1304-
"~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",
1305-
"/^c���pa�\u001d",
1306-
"�E\u001d",
1307-
"�y���X��\n",
1308-
"׏�c(���wc\u0013\f",
1309-
"\u0016��*���0��3BLK�S\u001c",
1310-
"d7R�ur�� �\u001a�3�\u001c",
1311-
"!\u00159�-9���\u0001U�\u001b���hL6ɭ��[*�z��锅�-#��G�]\u0016�Г�\u0006\tq\u001d",
1312-
"��3��g�\u001a\u000e��M\\[q�/$�gɘ��}J�ba��\u001b0{L�,\u0013\n",
1313-
"\n",
1266+
"Omitted due to being unparsable binary\n",
13141267
"\n",
13151268
"# Tailscale packages for ubuntu jammy\n",
13161269
"deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main\n",
@@ -1344,7 +1297,8 @@
13441297
"keyring_keyfile_resp = requests.get(keyring_keyfile_url)\n",
13451298
"keyring_keyfile_resp.raise_for_status()\n",
13461299
"print(f\"\\n\\nModern keyring gpg key (compressed, binary format)\")\n",
1347-
"print(keyring_keyfile_resp.text)\n",
1300+
"print(\"Omitted due to being unparsable binary\")\n",
1301+
"# print(keyring_keyfile_resp.text)\n",
13481302
"\n",
13491303
"# $CURL \"https://pkgs.tailscale.com/$TRACK/$OS/$VERSION.tailscale-keyring.list\" | $SUDO tee /etc/apt/sources.list.d/tailscale.list\n",
13501304
"keyring_pkg_repo_url = f\"https://pkgs.tailscale.com/{track}/{os}/{version}.tailscale-keyring.list\"\n",

posts/019_setup_tailscale_for_ssh/setting_up_tailscale.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"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",
9393
"\n",
9494
"Then, run these commands\n",
95+
"\n",
9596
"```console\n",
9697
"go install tailscale.com/cmd/tailscale{,d}@main\n",
9798
"sudo $HOME/go/bin/tailscaled install-system-daemon\n",
@@ -102,7 +103,7 @@
102103
"\n",
103104
"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",
104105
"\n",
105-
"![First caption](imgs/macos_dns_fix.png){fig-align=\"center\" width=\"50%\"}"
106+
"![Manually add the tailscale DNS](imgs/macos_dns_fix.png){fig-align=\"center\" width=\"50%\"}"
106107
]
107108
},
108109
{
@@ -145,17 +146,17 @@
145146
"id": "b0235e5d-6c3a-4322-84d6-e9a9225bf793",
146147
"metadata": {},
147148
"source": [
148-
"| ![First caption](imgs/android_install_1.png){width=\"100%\"} | ![Second caption](imgs/android_install_2.png){width=\"100%\"} |\n",
149-
"|:--:|:--:|\n",
150149
"| 2.1. **Get Started** | 2.2. Click **OK** to allow a VPN connection |\n",
151-
"\n",
152-
"| ![First caption](imgs/android_install_3.png){width=\"100%\"} | ![Second caption](imgs/android_install_4.png){width=\"100%\"} |\n",
153150
"|:--:|:--:|\n",
154-
"| 3. **Log in** | 3. via the method used when signing up |\n",
151+
"| ![First caption](imgs/android_install_1.png){width=\"100%\"} | ![Second caption](imgs/android_install_2.png){width=\"100%\"} |\n",
155152
"\n",
156-
"| ![First caption](imgs/android_install_5.png){width=\"100%\"} | ![Second caption](imgs/android_install_6.png){width=\"100%\"} |\n",
153+
"| 3. **Log in** | 3. via the method used when signing up |\n",
157154
"|:--:|:--:|\n",
155+
"| ![First caption](imgs/android_install_3.png){width=\"100%\"} | ![Second caption](imgs/android_install_4.png){width=\"100%\"} |\n",
156+
"\n",
158157
"| 4. **Connect** the device | 4. Open up the Admin console |\n",
158+
"|:--:|:--:|\n",
159+
"| ![First caption](imgs/android_install_5.png){width=\"100%\"} | ![Second caption](imgs/android_install_6.png){width=\"100%\"} |\n",
159160
"\n",
160161
"Then click **Approve** (not pictured, too much to redact)."
161162
]
@@ -285,7 +286,6 @@
285286
"\t\t},\n",
286287
"\t],\n",
287288
"}\n",
288-
"\n",
289289
"```"
290290
]
291291
},
@@ -300,9 +300,9 @@
300300
"\n",
301301
"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",
302302
"\n",
303-
"![First caption](imgs/acl_open_tag_adding_interface.png){fig-align=\"center\" width=\"80%\"}\n",
303+
"![Open the ACL tags interface](imgs/acl_open_tag_adding_interface.png){fig-align=\"center\" width=\"80%\"}\n",
304304
"\n",
305-
"![First caption](imgs/acl_add_tag_to_homelab.png){fig-align=\"center\" width=\"60%\"}\n",
305+
"![Add a tag to a device](imgs/acl_add_tag_to_homelab.png){fig-align=\"center\" width=\"60%\"}\n",
306306
"\n",
307307
"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",
308308
"\n",

0 commit comments

Comments
 (0)