site

Website Content
git clone https://git.pngu.org/site
Log | Files | Refs | README

commit 8bc2e318bb5244e74b03c1aee7a08e5f81a32ca1
parent 7d00c8350c3b1d4e5701fd25af93ebfd11fec7e2
Author: Jack Sangdahl <jack@pngu.org>
Date:   Sat, 21 Feb 2026 16:50:00 -0700

Formatting for a couple pages, add initial laptop page

Diffstat:
Aartix_laptop.html | 42++++++++++++++++++++++++++++++++++++++++++
Mcontent.html | 2+-
Mdebian_server.html | 72++++++++++++++++++++++++++++++++++++++----------------------------------
Mleetcode.html | 153++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
4 files changed, 170 insertions(+), 99 deletions(-)

diff --git a/artix_laptop.html b/artix_laptop.html @@ -0,0 +1,42 @@ +<!doctype html> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>Artix Laptop</title> + <script src="header.js"></script> + </head> + <body> + <a style="text-decoration: none" href="content.html">&lt;--</a> + <h2>Artix Laptop</h2> + <p><i>2026-02-19</i></p> + <hr /> + <p>This page covers my 2013 Macbook Air (A1466) running Artix Linux.</p> + <img + class="inline-image" + src="https://raw.githubusercontent.com/waffle87/dots/refs/heads/kepler/.img/fetch.png" + alt="fetch.png" + /> + <img + class="inline-image" + src="https://raw.githubusercontent.com/waffle87/dots/refs/heads/kepler/.img/nvim.png" + alt="nvim.png" + /> + <img + class="inline-image" + src="https://raw.githubusercontent.com/waffle87/dots/refs/heads/kepler/.img/zathura.png" + alt="zathura.png" + /> + <img + class="inline-image" + src="https://raw.githubusercontent.com/waffle87/dots/refs/heads/kepler/.img/fuzzel.png" + alt="fuzzel.png" + /> + <img + class="inline-image" + src="https://raw.githubusercontent.com/waffle87/dots/refs/heads/kepler/.img/fuzzel.png" + alt="fuzzel.png" + /> + <script src="frame.js"></script> + </body> +</html> diff --git a/content.html b/content.html @@ -16,7 +16,7 @@ </li> <li><a href="artix_laptop.html">Artix Laptop</a></li> <li><a href="https://git.pngu.org/dots/commit/?h=xena" target="_blank">macOS Laptop</a></li> - <li><a href="https://git.pngu.org/server">Debian Server</a></li> + <li><a href="debian_server.html">Debian Server</a></li> <li><a href="programs.html">Programs &amp; Utilities</a></li> <li><a href="kernel.html">Kernel Configuration</a></li> </ul> diff --git a/debian_server.html b/debian_server.html @@ -1,27 +1,30 @@ <!doctype html> <html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>Debian Server</title> + <script src="header.js"></script> + </head> -<head> - <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <title>Debian Server</title> - <script src="header.js"></script> -</head> - -<body> - <a style="text-decoration: none" href="content.html">&lt;--</a> - <h2>Debian Server</h2> - <p><i>2024-07-25</i></p> - <hr /> - <p>Without the physical space or electricity funding to have a home lab setup, I opted for a VPS instead. Despite - some perhaps questionable reviews and information online, <a href="https://racknerd.com" - target="_blank">RackNerd</a> has provided well for my needs. I pay about 25 USD per year for a KVM VPS with 4 GB - RAM and 4 virtual CPU cores. While this is a suspiciously low price (what one may pay <i>per month</i> with another - provider), they have quite good Black Friday sales. I initially chose them, as one of the requirements for a VPS was - the necessary SMTP ports open for a email server. Most providers (AWS, DigitalOcean, etc.) keep these ports strictly - closed, as to not be placed on an IP blacklists for spam origination. I will note that my VPS's IP is on a number of - blacklists and it has been a work in progress to be able to send email to certain receivers.</p> - <pre><code> _,met$$$$$gg. jack@pngu.org + <body> + <a style="text-decoration: none" href="content.html">&lt;--</a> + <h2>Debian Server</h2> + <p><i>2024-07-25</i></p> + <hr /> + <p> + Without the physical space or electricity funding to have a home lab setup, I opted for a VPS + instead. Despite some perhaps questionable reviews and information online, + <a href="https://racknerd.com" target="_blank">RackNerd</a> has provided well for my needs. I + pay about 25 USD per year for a KVM VPS with 4 GB RAM and 4 virtual CPU cores. While this is a + suspiciously low price (what one may pay <i>per month</i> with another provider), they have + quite good Black Friday sales. I initially chose them, as one of the requirements for a VPS + was the necessary SMTP ports open for a email server. Most providers (AWS, DigitalOcean, etc.) + keep these ports strictly closed, as to not be placed on an IP blacklists for spam + origination. I will note that my VPS's IP is on a number of blacklists and it has been a work + in progress to be able to send email to certain receivers. + </p> + <pre><code> _,met$$$$$gg. jack@pngu.org ,g$$$$$$$$$$$$$$$P. ------------- ,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) x86_64 ,$$P' `$$$. Host: KVM RHEL 7.6.0 PC (i440FX + PIIX, 1996) @@ -38,17 +41,18 @@ `Y$$b. `"Y$b._ `"""</code></pre> - <p>There is not much to discuss in terms of intricate system configuration or hardware quirks. All - services run in Docker containers, configured via Docker Compose. These include...</p> - <h3><a href="https://agendav.readthedocs.io" target="_blank">Agendav</a></h3> - <h3><a href="https://sabre.io/baikal" target="_blank">Ba&iuml;kal</a></h3> - <h3><a href="https://caddyserver.com" target="_blank">Caddy</a></h3> - <h3><a href="https://git.zx2c4.com/cgit" target="_blank">Cgit</a></h3> - <h3><a href="https://uptimekuma.org" target="_blank">Kuma</a></h3> - <h3><a href="https://roundcube.net" target="_blank">Roundcube</a></h3> - <h3><a href="https://stalw.art" target="_blank">Stalwart</a></h3> - <h3><a href="https://www.vaultwarden.net" target="_blank">Vaultwarden</a></h3> - <script src="frame.js"></script> -</body> - + <p> + There is not much to discuss in terms of intricate system configuration or hardware quirks. + All services run in Docker containers, configured via Docker Compose. These include... + </p> + <h3><a href="https://agendav.readthedocs.io" target="_blank">Agendav</a></h3> + <h3><a href="https://sabre.io/baikal" target="_blank">Ba&iuml;kal</a></h3> + <h3><a href="https://caddyserver.com" target="_blank">Caddy</a></h3> + <h3><a href="https://git.zx2c4.com/cgit" target="_blank">Cgit</a></h3> + <h3><a href="https://uptimekuma.org" target="_blank">Kuma</a></h3> + <h3><a href="https://roundcube.net" target="_blank">Roundcube</a></h3> + <h3><a href="https://stalw.art" target="_blank">Stalwart</a></h3> + <h3><a href="https://www.vaultwarden.net" target="_blank">Vaultwarden</a></h3> + <script src="frame.js"></script> + </body> </html> diff --git a/leetcode.html b/leetcode.html @@ -1,67 +1,86 @@ <!doctype html> <html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>Leetcode</title> + <script src="header.js"></script> + </head> -<head> - <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <title>Leetcode</title> - <script src="header.js"></script> -</head> + <body> + <a style="text-decoration: none" href="content.html">&lt;--</a> + <h2>Leetcode</h2> + <p><i>2025-02-23</i></p> + <hr /> + <p> + I have been completing + <a href="https://leetcode.com/u/0x6A73" target="_blank">Leetcode</a> problems for quite some + time now, and at the time of writing have a 1,400 day streak and am ranked about 6,500 + worldwide. Many problems end up feeling quite similar to others, however I greatly enjoy bit + manipulation type problems, as these still puzzle me often. I solve the daily problem in both + C and Python3, unless the C solution would require hundreds of LoC to implement. My solutions + can be found <a href="https://pngu.org/leetcode" target="_blank">here</a>, along with some + utility functions. + </p> + <h3>C Utilities</h3> + <p> + The + <a href="https://git.pngu.org/leetcode/tree/leetcode.h" target="_blank" + ><code>leetcode.h</code></a + > + header file contains various includes, standard Leetcode structs (<code>ListNode</code>, + <code>TreeNode</code>), and macros for things like calculating the size of an array (<i + >in a portable manner</i + >): + </p> + <pre><code class="language-c">#define IS_ARRAY(value) \ + (!__builtin_types_compatible_p(typeof((value)), typeof(&(value)[0]))) -<body> - <a style="text-decoration: none" href="content.html">&lt;--</a> - <h2>Leetcode</h2> - <p><i>2025-02-23</i></p> - <hr /> - <p>I have been completing <a href="https://leetcode.com/u/0x6A73" target="_blank">Leetcode</a> problems for quite some - time - now, and at the time of writing have a 1,400 day streak and am ranked about 6,500 worldwide. Many problems end up - feeling quite similar to others, however I greatly enjoy bit manipulation type problems, as these still puzzle me - often. I solve the daily problem in both C and Python3, unless the C solution would require hundreds of - LoC to implement. My solutions can be found <a href="https://pngu.org/leetcode" target="_blank">here</a>, along with - some utility functions. - </p> - <h3>C Utilities</h3> - <p>The <a href="https://git.pngu.org/leetcode/tree/leetcode.h" target="_blank"><code>leetcode.h</code></a> header file - contains various includes, standard Leetcode structs (<code>ListNode</code>, <code>TreeNode</code>), and macros for - things like calculating the size of an array (<i>in a portable manner</i>):</p> - <pre><code class="language-c">#define IS_ARRAY(value) \ - (!__builtin_types_compatible_p(typeof((value)), typeof(&(value)[0]))) +#define ARRAY_SIZE(array) \ + (__builtin_choose_expr(IS_ARRAY((array)), \ + sizeof((array)) / sizeof((array)[0]), (void)0)) - #define ARRAY_SIZE(array) \ - (__builtin_choose_expr(IS_ARRAY((array)), \ - sizeof((array)) / sizeof((array)[0]), (void)0)) - - // foo.c - int arr[] = {1, 2, 3}; - int foo = func(arr, ARRAY_SIZE(arr));</code></pre> - <p>The <a href="https://git.pngu.org/leetcode/tree/leetcode.c" target="_blank"><code>leetcode.c</code></a> file - contains helper functions to fill <code>ListNode</code> and <code>TreeNode</code> data structures with given problem - input, and also print data returned by such functions. - </p> - <h4><code>ListNode</code> Data Type</h4> - <img class="inline-image" src="https://assets.leetcode.com/uploads/2022/02/02/ex1-1.png" alt="list node example"> - <pre><code class="language-c">int main() { +// foo.c +int arr[] = {1, 2, 3}; +int foo = func(arr, ARRAY_SIZE(arr));</code></pre> + <p> + The + <a href="https://git.pngu.org/leetcode/tree/leetcode.c" target="_blank" + ><code>leetcode.c</code></a + > + file contains helper functions to fill <code>ListNode</code> and <code>TreeNode</code> data + structures with given problem input, and also print data returned by such functions. + </p> + <h4><code>ListNode</code> Data Type</h4> + <img src="https://assets.leetcode.com/uploads/2022/02/02/ex1-1.png" alt="list node example" /> + <pre><code class="language-c">int main() { int input[] = {0, 3, 1, 0, 4, 5, 2, 0}; struct ListNode *head = listnode_build(input, ARRAY_SIZE(input)); listnode_print(head); listnode_free(head); }</code></pre> - <h4><code>TreeNode</code> Data Type</h4> - <img class="inline-image" src="https://assets.leetcode.com/uploads/2021/04/08/leftsum-tree.jpg" - alt="tree node example"> - <p>Note that in the following, a value of -1 denotes a "null" leaf. If a problem's input depends on this value, use - <code>treenode_create()</code> to create each node individually. - </p> - <pre><code class="language-c">int main() { + <h4><code>TreeNode</code> Data Type</h4> + <img + class="inline-image" + src="https://assets.leetcode.com/uploads/2021/04/08/leftsum-tree.jpg" + alt="tree node example" + /> + <p> + Note that in the following, a value of -1 denotes a "null" leaf. If a problem's input depends + on this value, use <code>treenode_create()</code> to create each node individually. + </p> + <pre><code class="language-c">int main() { int input[] = {3, 9, 20, -1, -1, 15, 7}; struct TreeNode *root = treenode_build(input, ARRAY_SIZE(input)); treenode_print(root); treenode_free(root); }</code></pre> - <h4>2D Array Helpers</h4> - <p>These functions dynamically allocate and fill a 2D array with values from a static array of values.</p> - <pre><code class="language-c">int func(int **edges, int edgesSize, int *edgesColSize); + <h4>2D Array Helpers</h4> + <p> + These functions dynamically allocate and fill a 2D array with values from a static array of + values. + </p> + <pre><code class="language-c">int func(int **edges, int edgesSize, int *edgesColSize); int main() { int edges_input[6][2] = {{0, 1}, {0, 2}, {1, 3}, {1, 4}, {2, 5}, {2, 6}}; @@ -70,29 +89,35 @@ two_d_arr_free(edges); } </code></pre> - <p>If a problem's input has varying sized columns, one must create a array specifying each column's size and pass that - to the function, instead of <code>struct two_d_arr.col_size</code>.</p> - <h3>Python Utilities</h3> - <p>Quite similar to the above, <a href="https://git.pngu.org/leetcode/tree/leetcode.py" - target="_blank"><code>leetcode.py</code></a> - contains helpers to work Leetcode data structures. Python, of course, does not require special handling for things - like 2D arrays.</p> - <h4><code>ListNode</code> Data Type</h4> - <pre><code class="language-python">from leetcode import ListNode, listnode_build, listnode_print + <p> + If a problem's input has varying sized columns, one must create a array specifying each + column's size and pass that to the function, instead of + <code>struct two_d_arr.col_size</code>. + </p> + <h3>Python Utilities</h3> + <p> + Quite similar to the above, + <a href="https://git.pngu.org/leetcode/tree/leetcode.py" target="_blank" + ><code>leetcode.py</code></a + > + contains helpers to work Leetcode data structures. Python, of course, does not require special + handling for things like 2D arrays. + </p> + <h4><code>ListNode</code> Data Type</h4> + <pre><code class="language-python">from leetcode import ListNode, listnode_build, listnode_print if __name__ == "__main__": head = listnode_build(vals=[0, 3, 1, 0, 4, 5, 2, 0]) listnode_print(head) </code></pre> - <h4><code>TreeNode</code> Data Type</h4> - <p>Note that in the following, a value of <code>None</code> denotes a "null" leaf.</p> - <pre><code class="language-python">from leetcode import TreeNode, treenode_build, treenode_print + <h4><code>TreeNode</code> Data Type</h4> + <p>Note that in the following, a value of <code>None</code> denotes a "null" leaf.</p> + <pre><code class="language-python">from leetcode import TreeNode, treenode_build, treenode_print if __name__ == "__main__": root = treenode_build(vals=[3, 9, 20, None, None, 15, 7]) treenode_print(root) </code></pre> - <script src="frame.js"></script> -</body> - + <script src="frame.js"></script> + </body> </html>