commit cd003b3385d5dacdd47e3c288ce6666b46b0a646
parent 1a85d03b486a7dc74e607d2ffc538b52656a4519
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date: Thu, 10 Feb 2022 23:52:38 -0800
Move things, fix most site rendering problems in posts/
Diffstat:
9 files changed, 166 insertions(+), 19 deletions(-)
diff --git a/content/partials/figlet.handlebars b/content/partials/figlet.handlebars
@@ -0,0 +1,15 @@
+<pre id="main-page-title">
+
+ ____ _
+| _ \ _ _ __ _ _ __ ( )___
+| |_) | | | |/ _` | '_ \|// __|
+| _ <| |_| | (_| | | | | \__ \
+|_| \_\\__, |\__,_|_| |_| |___/
+ |___/
+ _ _
+| | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___
+| |_| |/ _ \| '_ ` _ \ / _ \ '_ \ / _` |/ _` |/ _ \
+| _ | (_) | | | | | | __/ |_) | (_| | (_| | __/
+|_| |_|\___/|_| |_| |_|\___| .__/ \__,_|\__, |\___|
+ |_| |___/
+</pre>
diff --git a/content/partials/front.handlebars b/content/partials/front.handlebars
@@ -0,0 +1,23 @@
+<p>This site is a celebration of old computers and technology (or, what is old and
+ nostalgic to me). Everything here is designed to look like a late 2000's
+ or early 2010's Linux desktop since that was the last time you could still feel
+ 90's era optimism about technology (or the future in general).
+<br>
+</p>
+
+<p>
+ In current year it's impossible to feel anything but disgust and disappointment
+ over the state of technology. Social media has enabled conformism in a way
+ never before thought possible. Every electronic device is a government surveillance
+ machine. Unix is <span class="underline">still</span> using X11. Perhaps
+ the Vi guy was right <a href="https://www.wired.com/2000/04/joy-2/">to go full AnPrim</a>.
+</p>
+
+<p>
+ But this site at www.ryanmj.xyz <span class="underline">is not</span> about that.
+ Instead, this is a place to LARP and pretend it's still 2008.
+</p>
+
+<p>
+ <a href="https://openlibrary.org/works/OL2286765W/Atomised?edition=atomised00houe">This website is dedicated to mankind.</a>
+</p>
diff --git a/content/partials/posts/manjaro_sucks.handlebars b/content/partials/posts/manjaro_sucks.handlebars
@@ -0,0 +1,36 @@
+<h3>Manjaro Sucks (Linux these days...)</h3>
+
+<p>
+Created: Oct 31, 2021 Last Updated: Feb 7, 2022
+</p>
+
+<p>
+ Friend of mine installed M*njaro Linux about a year ago and hasn't used it since.
+ He called me for help when his system just failed to boot. Being a Linux user for
+ many years I thought it would be pretty easy to diagnose and fix the issue, especially
+ since my friend is a Linux noob and so would most likely have a stock, unconfigured install.
+</p>
+
+<p>
+ To make this post brief I'll just say that debugging the system took hours because
+ of various annoyances and bizzare idiosyncrasies. There was no boot output because the
+ Linux kernel is called with "quiet" option. This one is baffling to me because there's
+ no downside to seeing the kernel's boot messages but every distro turns them off by
+ default these days. I guess they're afraid of scaring the normies.
+</p>
+
+<p>
+ Also the Linux kernel and Nvidia drivers are managed seperately from other packages.
+ This I'm pretty sure caused the problem in the first place. Something nvidia related
+ got updated but the driver did not. This caused a black screen, but the system kept
+ trying to restart X over and over, so not even switching to a different TTY worked.
+ We were able to fix the problem by getting Linux to use the free noveau drivers via
+ GRUB. From there, we were able to fix Manjaro's package issues.
+</p>
+
+<p>
+ Manjaro's bizzare way of managing the kernel has casued me problems as well. Years ago,
+ when trying manjaro for the first time, my system became unbootable because my kernel was
+ updated but Linux-Firmware was not... very normie friendly!
+</p>
+
diff --git a/content/partials/software.handlebars b/content/partials/software.handlebars
diff --git a/public/bkgs/index.html b/public/bkgs/index.html
@@ -0,0 +1,3 @@
+<ul>
+ <li><a href="/bkgs/movementInSquares">Movement in Squares by Bridget Riley</a></li>
+</ul>
diff --git a/src/main/rmjxyz/app.cljs b/src/main/rmjxyz/app.cljs
@@ -89,7 +89,9 @@
:lsList (ls-list dir ext paths)})
;; Cat.
([the-path trim-path] {:args (if trim-path (get-file-name the-path) the-path)
- :markup (get-file-name the-path)}))
+ :markup (if trim-path
+ (get-file-name the-path)
+ the-path)}))
(defn create-ls
"Create a ls-listing from a pre-existing set of files."
@@ -113,17 +115,13 @@
(.. res (status 200) (render template obj))))
-(defn serve-file-to
- "Serve file to res asynchronously."
- [file res]
- (go
- (try
- (<p! (.readFile fs file "utf8" (fn [err buf]
- (if err
- (js/console.log "Error when looking for item " file)
- (serve-200 "post" res #js{ :text buf })))))
- ;; TOTO internal error.
- (catch js/Error err (js/console.error err)))))
+
+(defn index-information
+ "Make a JS object for use in index.handlebars."
+ [window-list]
+ (clj->js (merge window-list
+ {:bkgScript (.join path "/site-bkgs/bin/" (rand-nth @all-bkg-scripts))})))
+
(defn init-server
"Set the server's routes."
@@ -141,18 +139,16 @@
;; Server paths.
(.get server "/posts/:post" (fn [^js req res next]
(let [post (.toLowerCase (.-post (.-params req)))]
- (js/console.log (clj->js (get @post-items :content)))
(if (some #(= post (get % :basename)) (get @post-items :content))
- (serve-200 "index" res (clj->js (merge (create-windows [[(create-command (.join path "posts" post) true)]])
- {:bkgScript (.join path "/site-bkgs/bin/" (rand-nth @all-bkg-scripts))})))
+ (serve-200 "index" res (index-information
+ (create-windows [[(create-command (.join path "posts" post) false)]])))
(serve-404 post res)))))
(.get server "/posts" (fn [^js req res next]
- (serve-200 "index" res (clj->js (merge @post-windows
- {:bkgScript (.join path "/site-bkgs/bin/" (rand-nth @all-bkg-scripts))})))))
+ (serve-200 "index" res (index-information @post-windows))))
(.get server "/:item" (fn [^js req res next]
(let [item (.toLowerCase (.-item (.-params req)))]
- (if (some #(= item %) (ls-list "." ".html" ["software"]))
- (serve-file-to item res)
+ (if (some #(= item %) (ls-list "." ".handlebars" ["software"]))
+ (serve-200 item res (index-information (create-windows [[(create-command post) false]])))
(serve-404 item res)))))
(.get server "/" (fn [^js req res next]
(serve-200 "index" res (clj->js (merge @index-items
diff --git a/views/partials/figlet.handlebars b/views/partials/figlet.handlebars
@@ -0,0 +1,15 @@
+<pre id="main-page-title">
+
+ ____ _
+| _ \ _ _ __ _ _ __ ( )___
+| |_) | | | |/ _` | '_ \|// __|
+| _ <| |_| | (_| | | | | \__ \
+|_| \_\\__, |\__,_|_| |_| |___/
+ |___/
+ _ _
+| | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___
+| |_| |/ _ \| '_ ` _ \ / _ \ '_ \ / _` |/ _` |/ _ \
+| _ | (_) | | | | | | __/ |_) | (_| | (_| | __/
+|_| |_|\___/|_| |_| |_|\___| .__/ \__,_|\__, |\___|
+ |_| |___/
+</pre>
diff --git a/views/partials/front.handlebars b/views/partials/front.handlebars
@@ -0,0 +1,23 @@
+<p>This site is a celebration of old computers and technology (or, what is old and
+ nostalgic to me). Everything here is designed to look like a late 2000's
+ or early 2010's Linux desktop since that was the last time you could still feel
+ 90's era optimism about technology (or the future in general).
+<br>
+</p>
+
+<p>
+ In current year it's impossible to feel anything but disgust and disappointment
+ over the state of technology. Social media has enabled conformism in a way
+ never before thought possible. Every electronic device is a government surveillance
+ machine. Unix is <span class="underline">still</span> using X11. Perhaps
+ the Vi guy was right <a href="https://www.wired.com/2000/04/joy-2/">to go full AnPrim</a>.
+</p>
+
+<p>
+ But this site at www.ryanmj.xyz <span class="underline">is not</span> about that.
+ Instead, this is a place to LARP and pretend it's still 2008.
+</p>
+
+<p>
+ <a href="https://openlibrary.org/works/OL2286765W/Atomised?edition=atomised00houe">This website is dedicated to mankind.</a>
+</p>
diff --git a/views/partials/posts/manjaro_sucks.handlebars b/views/partials/posts/manjaro_sucks.handlebars
@@ -0,0 +1,36 @@
+<h3>Manjaro Sucks (Linux these days...)</h3>
+
+<p>
+Created: Oct 31, 2021 Last Updated: Feb 7, 2022
+</p>
+
+<p>
+ Friend of mine installed M*njaro Linux about a year ago and hasn't used it since.
+ He called me for help when his system just failed to boot. Being a Linux user for
+ many years I thought it would be pretty easy to diagnose and fix the issue, especially
+ since my friend is a Linux noob and so would most likely have a stock, unconfigured install.
+</p>
+
+<p>
+ To make this post brief I'll just say that debugging the system took hours because
+ of various annoyances and bizzare idiosyncrasies. There was no boot output because the
+ Linux kernel is called with "quiet" option. This one is baffling to me because there's
+ no downside to seeing the kernel's boot messages but every distro turns them off by
+ default these days. I guess they're afraid of scaring the normies.
+</p>
+
+<p>
+ Also the Linux kernel and Nvidia drivers are managed seperately from other packages.
+ This I'm pretty sure caused the problem in the first place. Something nvidia related
+ got updated but the driver did not. This caused a black screen, but the system kept
+ trying to restart X over and over, so not even switching to a different TTY worked.
+ We were able to fix the problem by getting Linux to use the free noveau drivers via
+ GRUB. From there, we were able to fix Manjaro's package issues.
+</p>
+
+<p>
+ Manjaro's bizzare way of managing the kernel has casued me problems as well. Years ago,
+ when trying manjaro for the first time, my system became unbootable because my kernel was
+ updated but Linux-Firmware was not... very normie friendly!
+</p>
+