diff options
| -rw-r--r-- | 404.org | 200 | ||||
| -rw-r--r-- | agenda.org | 16 | ||||
| -rw-r--r-- | config/emacs.org | 8 | ||||
| -rw-r--r-- | config/nix.org | 1 | ||||
| -rw-r--r-- | mindmap/LRC circuit.org | 20 | ||||
| m--------- | nix | 0 | ||||
| -rw-r--r-- | style.scss | 208 | ||||
| -rw-r--r-- | yasnippet/org-mode/org | 12 |
8 files changed, 428 insertions, 37 deletions
@@ -0,0 +1,200 @@ +#+title: You're Lost! +#+author: Preston Pan +#+description: You're looking in the wrong place! +#+language: en +#+OPTIONS: broken-links:t + +#+attr_html: :width 595 :height 746 +#+attr_html: :alt My ret2pop logo +#+caption: Nice! You found my 404 Page! +[[./img/logo.webp]] + +* Wow! +Is this an easter egg? No, it is not. You're lost, you're on the 404 page, this is obviously either your fault or +the fault of whoever sent you this link. However, you can go back to my real website using the header above, +and you can even finish reading this content. +** What Is This Content? +You know what? I'm actually going to use this page to test if all my CSS on my page is actually working. Yeah. +That's right. This webpage is actually going to make it to /production/, yet it's literally going to be used as a CSS +stylesheet test page as well. Why? I guess I'm quirky. +*** Let's do even more nested headers +Because why not? I don't have anything against them. +**** Aren't Fourth Level Nested Headers Bad Design? +Yes, probably, but you know what, we're just going to run with it. + +* Visual Eye-Candy +Do you want to see some cool code blocks, and other such visual elements? Well you've discovered just the webpage! +#+begin_src python :results output :exports both +import math + +print("hello, world!") +print("Yeah, we're going to write an amazing 404 page/504 page") +print("Okay yeah well you know") + +x = 5 +if x == 5: + print("wow code is executing") +else: + print("I have a fourth grade education") + +print(math.pi) +#+end_src + +#+RESULTS: +: hello, world! +: Yeah, we're going to write an amazing 404 page/504 page +: Okay yeah well you know +: wow code is executing +: 3.141592653589793 + +You know I can also use multiple languages: +#+begin_src nix +{ + my_attrset = { + deeply_nested_attrset = { + this_is_too_nested = { + wow_this_is_nested = { + some_string = "asdf"; + some_int = 4; + some_lambda = x: y: x + y; + some_nested_also = { + very_nested = { + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = { + hello = "hello"; + }; + }; + }; + }; + }; + }; + }; +} +#+end_src +Or would you like to have a mix of very long and quite short latex blocks? I can do inline latex too: $x = 5$. +\begin{align} +x = 5 \\ +y = 2 \\ +(AD^{2} + BD + C)(f)(x) = sin(\omega t) \\ +1 + 2 + 3 + 4 + \ldots n = \frac{1 + 2 + 3 + 4 + 5 + 6 + 7 + 1 + 2 + 3 + 4 + 5 + 6 + 7}{3} +\end{align} +Also you know what? I have some other ~display: block~ elements as well: +#+begin_quote +If I had to eat cheese, I would not be me. -- Preston Pan +#+end_quote +You know what, I could have lorum ipsum'd all of this, but instead I have written entertaining content that is almost as meaningless, you're welcome. +#+begin_example +lol, you really think this example means anything? Well, luckily for you, it does not. +#+end_example +These are really all important specialised visual elements that I use in order to style my website. Though there are also some other notable org-mode +related ones: +* TODO Wow, Look +It's a todo tag, and I can also create some other ones like this +** DONE This One is Done +Okay yeah I mean title. +** More Pill Styles :tagged: +This one is tagged. +** More Tags :thisisaverylongunbrokenstringtotestoverflowbehaviorandseewhetherthelayoutexplodesonsmallscreens: +Okay, this is reading less like a quirky 404 page now and more like i'm just testing random elements. If you've made it this far, I'm genuinely +surprised. You can see how I'm trying to break my website in real time. + +Hopefully this smoke test will have caught something in its lifetime, or else I wasted a couple hours of my life for nothing. Are /you/ lost, or am /I/ +lost? + +Anyways. I really like inline footnotes. [fn:: Maybe I should use these elements for something useful instead of just for memes, eh?] +* TODO [#A] Extremely Important Heading :urgent:work: +SCHEDULED: <2026-03-15 Sun> +DEADLINE: <2026-03-20 Fri> +CLOSED: [2026-03-15 Sun 18:00] +* Line Breaks +This line ends here.\\ +This should appear on the next line. +* Tables +In org mode, you can even write tables: +| Album | Author | Good | Description | +|----------------+---------------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Animals | TTNG | Y | A really great quintessential album and deeply influential in math rock. | +| Ultra Ego | Feed Me Jack | Y | A jazzy album that is also sort of indie rock, with a bit of math. Incredible artistic vision. | +| Somewhere City | Origami Angel | Y | A feel good album that does emo rock in its essence and actually does it in an innovative way. | +| Technicolor | Covet | Y | Mathy guitar with Yvette Young, a great guitarist and with amazing feel good vibes (you'd think it wouldn't be possible with mostly instrumental but it is) | +These are all great albums. See? If you've discovered something here, you haven't wasted your time! +* Other things +- I can add list elements like this. +- This seems to be a great way to test my website. +- I am making sure to test things. +* Ordered Lists +1. It should be an ordered list. +2. I should be able to parse this. +3. I am really sure that this is nonsense. +* Checkboxes +- [ ] Check number one + - [ ] Check number two (nested) +- [X] Check number three +* Links and Inline Markup +Here is an [[https://ret2pop.net][external link]], a [[./index.html][relative link]], *bold*, /italic/, _underline_, +strike+, =verbatim=, and ~code~. + +* Description List +- Org :: Powerful plaintext editing +- CSS :: The worst possible system anyone could have designed +- Nix :: An amazing language that everyone thinks is bad[fn:3] +[fn:3] This is a story for another day, but it's not that bad. The only problem is the lack of static typing. +* Some Footnotes +Here is a sentence with a footnote.[fn:2] +[fn:2] This is a footnote for testing styling. +* More Blocks +----- +Here is my very great poem: +#+begin_verse +The margins drift +The padding lies +The mobile breakpoint +Devours my eyes + +We all love CSS +It's clearly so blessed +We must all kneel +at its behest +#+end_verse +Now you wish that you read this! Also I can do magic tricks, like centering text! +#+begin_center +Centered text test. I don't even use this in my website, though. +#+end_center +* Overflow Tests +Source blocks! +#+begin_src text +this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens +#+end_src +Examples! +#+begin_example +this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens +#+end_example +Quotations! +#+begin_quote +this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens +#+end_quote +Verses! +#+begin_verse +this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens +#+end_verse +There's more where that came from! ~this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens~, +=this-is-a-very-long-unbroken-string-to-test-overflow-behavior-and-see-whether-the-layout-explodes-on-small-screens=. + +#+caption: Wide table test +| Name | Notes | +|------+------------------------------------------------------------------------------------------------------------------------------------------| +| A | This is a very long table cell intended to test wrapping behavior on narrow screens and ensure the table does not become visually cursed | +| B | Short | + +| Name A | Name B | Name C | Name D | Name E | Name F | Name G | Name H | Name I | Name J | Name K | Name L | Name M | +|------------------+----------------------------------------------------------------+----------------------------------------+----------------------------+--------------------------------------------+--------+--------+--------+--------+--------+--------+---------+--------| +| lol this is text | hello world my name is preston pan, and this is a long message | holy shit this table is extremely long | Please stop this is cursed | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | what | is | going | on | with | my | website | Please | +* Timestamps +- Active: <2026-03-15 Sun> +- Inactive: [2026-03-15 Sun] +- Range: <2026-03-15 Sun>--<2026-03-16 Mon> +- Diary-style: <2026-03-15 Sun +1w> +:LOGBOOK: +- Note taken on [2026-03-15 Sun] +:END: +* Conclusion +I've tested literally every single possible element on my website that I could think of. What a load of eye candy and random useless information! +Anyways, if you like what you're looking at, you should probably see [[https://ret2pop.net][my main website]]. @@ -12,14 +12,14 @@ project, it can be referenced here. * Tasks These are general life tasks that I need to do, which don't depend on a specific time or date. ** TODO [#B] Monorepo -- add an RSS feed of my blogs to my website. -- finish up my SCSS abstractions and learning how to write in it (also finish touching up my CSS). -- finish my automated testing matrix. -- write more content to my website. -- write a shell script to get passwords from my run path. -- touch up emacs. -- write tests for installer script. -- write documentation +- [ ] add an RSS feed of my blogs to my website. +- [X] finish up my SCSS abstractions and learning how to write in it (also finish touching up my CSS). +- [ ] finish my automated testing matrix. +- [ ] write more content to my website. +- [ ] write a shell script to get passwords from my run path. +- [X] touch up emacs. +- [ ] write tests for installer script. +- [ ] write documentation ** TODO [#B] Nullring Update the nullring to be in org mode, and also include a couple more sites. ** TODO [#B] Umami diff --git a/config/emacs.org b/config/emacs.org index dda7dc2..99aff38 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -134,6 +134,8 @@ These are packages that I require in order to write some scripts in emacs-lisp. (use-package dash) (use-package s) (use-package f) +(use-package yaml-mode + :demand t) #+end_src ** Emacs These are all the options that need to be set at the start of the program. Because use-package @@ -300,7 +302,7 @@ This is my org mode configuration, which also configures latex. (use-package htmlize :demand t - :after (catppuccin-theme doom-themes)) + :after (catppuccin-theme doom-themes yaml-mode)) (unless noninteractive (use-package htmlize @@ -346,6 +348,7 @@ This is my org mode configuration, which also configures latex. :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 + :html-footnotes-section "<div id=\"footnotes\"><hr><div id=\"text-footnotes\"><span class=\"footnotes-label-hidden\">%s</span>%s</div></div>" :html-head ,(concat "<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Inconsolata-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Lora-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\"><meta name=\"msapplication-TileColor\" content=\"#da532c\">\n" "<style>" (->> (create-htmlize-css) @@ -915,7 +918,8 @@ For all my mathematics and programming notes: (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") (org-roam-ui-follow t "Have cool visual while editing org-roam") (org-roam-ui-update-on-save t "This option is obvious") - (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads"))) + (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads") + :config (org-roam-ui-sync-theme))) #+end_src ** Pinentry diff --git a/config/nix.org b/config/nix.org index 0f63df0..6f68ee0 100644 --- a/config/nix.org +++ b/config/nix.org @@ -1741,6 +1741,7 @@ to the outside world under a domain. }; extraConfig = '' rewrite ^/graph_view/?(.*)$ https://graph.${config.monorepo.vars.remoteHost}/$1 permanent; + error_page 404 /404.html; ''; }; diff --git a/mindmap/LRC circuit.org b/mindmap/LRC circuit.org index 51afe3c..950d57b 100644 --- a/mindmap/LRC circuit.org +++ b/mindmap/LRC circuit.org @@ -43,21 +43,21 @@ another circuit diagram will include a possibly variable voltage source. * Mass-Spring Equation Equivalence We know these relations for the given circuit elements above: -\begin{equation} +\begin{align} v(t) = L\frac{di}{dt} \\ i(t) = C\frac{dv}{dt} \\ v = iR -\end{equation} +\end{align} if we analyze the current signal, Kirchhoff's voltage law tells us that the total voltage drop throughout this circuit is zero. We use the capacitor equation in integral form and sum the voltages: \begin{equation} L\frac{di}{dt} + \frac{1}{C}\int i(t)dt + iR = 0 \end{equation} We then take a derivative to remove the integral: -\begin{equation} +\begin{align} L\frac{d^{2}i}{dt^{2}} + R\frac{di}{dt} + \frac{1}{C}i = 0 \\ (LD^{2} + RD + \frac{1}{C}) i(t) = 0 -\end{equation} +\end{align} it is clear that the characteristic polynomial of this homogeneous linear [[id:4be41e2e-52b9-4cd1-ac4c-7ecb57106692][differential equation]] is: \begin{align*} L\lambda^{2} + R\lambda + \frac{1}{C} = 0 @@ -143,7 +143,7 @@ i(t) = V_{0}e^{i\phi}\mathcal{L}^{-1}\{\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3} where $z_{2}$ and $z_{3}$ are the two roots we found for the homogeneous case. We then use partial fraction decomposition: \begin{align} \label{} -\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} &= \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ +\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} = \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ A(s - z_{2})(s - z_{3}) + B(s - z_{1})(s - z_{3}) + C(s - z_{1})(s - z_{2}) &= 1 \end{align} from this we know: @@ -185,9 +185,9 @@ C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1 \end{align} So we have the three coefficients: \begin{align} -A &= \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -B &= \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -C &= \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} +A = \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +B = \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \end{align} The resulting solution looks like this: \begin{align} @@ -224,10 +224,10 @@ so the full solution including the terms used for the [[id:bc7e9e01-9721-4b3e-a8 i(t) = V_{0}e^{i\phi}(Ae^{z_{1}t} + Be^{z_{2}t} + Ce^{z_{3}t}) + (i'(0) + i(0))(De^{z_{2}t} + Ee^{z_{3}t}) \end{align} the sinusoidal part of the solution looks like this: -\begin{equation} +\begin{align} \label{} \frac{(z_{3} - z_{2})V_{0}e^{i\phi}e^{2\pi i\omega t}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} -\end{equation} +\end{align} * Mass-Spring System Starting from [[id:6e2a9d7b-7010-41da-bd41-f5b2dba576d3][Newtonian mechanics]] in a single dimension: diff --git a/nix b/nix -Subproject 2e33a6b2397720f7fc4c6ec70091f29796c6a6b +Subproject eb35af09b03fdffc1bcda42c6b1ee3fd3e4bc22 @@ -197,6 +197,57 @@ a, .org-link { } } +dl { + margin: 1.5rem 0 2rem 0; +} + +dt { + margin-top: 1rem; + font-family: var(--font-mono), monospace; + font-size: 0.82rem; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + color: color-mix(in srgb, var(--text-main) 80%, transparent); +} + +dd { + margin: 0.3rem 0 0 1.5rem; + color: var(--text-main); +} + +table { + display: block; + table-layout: fixed; + width: 100%; + + margin: 2rem 0; + font-size: 0.95rem; + line-height: 1.5; + background: color-mix(in srgb, var(--accent) 4%, var(--bg-main)); + @include horizontal-scroll; + @include hide-scrollbar; +} + +th, td { + padding: 0.75rem 0.9rem; + text-align: left; + vertical-align: top; +} + +thead th { + font-family: var(--font-mono), monospace; + font-size: 0.78rem; + letter-spacing: 0.05em; + text-transform: uppercase; + background: color-mix(in srgb, var(--accent) 10%, var(--bg-main)); + border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); +} + +tbody tr + tr td { + border-top: 1px solid color-mix(in srgb, var(--text-main) 8%, transparent); +} + figure { margin: 2rem auto; text-align: center; @@ -291,6 +342,30 @@ h1.title { margin-top: 0.5rem; } +.underline { + text-decoration: underline; + text-decoration-thickness: 2px; + text-underline-offset: 4px; +} + +.footdef .footpara, .footdef p { + display: inline; + margin: 0; +} + +.footdef { + display: block; + sup { + display: inline; + vertical-align: super; + margin-right: 0.25em; + } +} + +.footnotes-label-hidden { + display: none; +} + .title { font-size: 2.6rem; margin-bottom: 0.5rem; @@ -332,7 +407,7 @@ h1.title { &:not(:last-child)::after { content: ", "; font-style: normal; } } -.todo, .done, .tag { +.todo, .done, .tag, .timestamp-wrapper { font-family: var(--font-mono), monospace; font-size: 0.75em; font-weight: bold; @@ -355,12 +430,34 @@ h1.title { border: 1px solid #8f9e76; } +.timestamp-wrapper { + margin-left: 8px; + font-weight: normal; + color: #5e4a57; + background-color: #efe6eb; + border: 1px solid #c8b2bc; + + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 32ch; + vertical-align: middle +} + .tag { margin-left: 8px; font-weight: normal; color: color-mix(in srgb, var(--text-main) 80%, transparent); background-color: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); + + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 16ch; + vertical-align: middle } .theorem, .proof { @@ -388,6 +485,18 @@ h1.title { .org-svg { width: 100%; max-width: none; } +.verse { + width: fit-content; + max-width: min(100%, 38rem); + margin: 2rem auto; + padding: 1.25rem 1.5rem; + white-space: pre-wrap; + line-height: 1.9; + font-style: italic; + color: color-mix(in srgb, var(--text-main) 92%, transparent); + background: color-mix(in srgb, var(--accent) 6%, transparent); +} + .src, .example { @include hide-scrollbar; @include horizontal-scroll; @@ -414,24 +523,53 @@ h1.title { } } -.org-src-container { - position: relative; - margin: 1.2em 0; - - pre.src { - overflow: visible; - margin: 0; - border: none; - - & > code { - padding: 1.5rem 1rem 1rem 1rem; - white-space: pre; - @include hide-scrollbar; - @include horizontal-scroll; - } - } +.org-center { + text-align: center; } +// .org-src-container { +// position: relative; +// margin: 1.2em 0; +// color: var(--code-text); +// background: var(--code-bg); +// padding: 1.5rem 1rem 1rem 1rem; +// @include horizontal-scroll; +// @include hide-scrollbar; + +// pre.src { +// overflow: visible; +// margin: 0; +// border: none; +// padding-inline-end: 1rem; +// box-sizing: border-box; +// & > code { +// white-space: pre; +// } +// } +// } +// .org-src-container { +// position: relative; +// margin: 1.2em 0; +// color: var(--code-text); +// background: var(--code-bg); +// padding: 1.5rem 1rem 1rem 1rem; +// overflow-x: auto; + +// pre.src { +// margin: 0; +// border: none; +// overflow: visible; +// } + +// pre.src > code { +// display: inline-block; +// min-width: 100%; +// white-space: pre; +// padding-inline-end: 1rem; +// box-sizing: border-box; +// } +// } + .equation-container { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; @@ -460,6 +598,28 @@ h1.title { } } +.org-src-container { + position: relative; + margin: 1.2em 0; + color: var(--code-text); + background: var(--code-bg); + padding: 1.5rem 1rem 1rem 1rem; + overflow-x: auto; + overflow-y: hidden; + @include hide-scrollbar; + + pre.src { + margin: 0; + border: none; + overflow: visible; + display: inline-block; + min-width: 100%; + width: max-content; + padding-right: 1rem; + box-sizing: border-box; + } +} + .figure { margin: 2rem auto; text-align: center; @@ -597,3 +757,17 @@ h1.title { #postamble { text-align: center; } #content { padding-top: 0; } + +#footnotes { + padding-top: 1rem; +} + +#footnotes hr { + margin-top: 0; + margin-bottom: 0; +} + +#footnotes hr { + margin-top: 1rem; + margin-bottom: 0.5rem; +} diff --git a/yasnippet/org-mode/org b/yasnippet/org-mode/org new file mode 100644 index 0000000..789c12f --- /dev/null +++ b/yasnippet/org-mode/org @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: org +# key: org +# -- +#+title: $1 +#+author: $2 +#+description: $3 +#+date: [`(format-time-string "%Y-%m-%d %a")`] + +#+language: en +#+OPTIONS: broken-links:t +$0
\ No newline at end of file |
