Initial commit; WIP

This commit is contained in:
askiiart 2024-08-25 22:52:09 -05:00
commit e29d3651fd
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30
20 changed files with 4721 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4071
bee-movie.txt Normal file

File diff suppressed because it is too large Load diff

82
blog/blendos.html Normal file
View file

@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
<link rel="icon" href="/assets/askiiart.gif" type="image/icon">
<title>Checking out blendOS</title>
<link href="/style.css" type="text/css" rel="stylesheet" />
<link href="/prism.css" type="text/css" rel="stylesheet" />
</head>
<body class="line-numbers">
<h1 id="checking-out-blendos">Checking out blendOS</h1>
<p>blendOS is self-described as "Arch Linux, made declarative,
immutable and atomic." And yeah, that's a pretty good
description of what it is. But you can never <em>really</em>
tell what a distro is like without trying it, so...</p>
<h2 id="installation">Installation</h2>
<p>I decided to just run blendOS in a virtual machine; I had a
bunch of data I hadn't backed up yet and was actively working
on, and didn't feeling like switching yet given I had no
experience with blendOS v4[^1] - I've actually tried blendOS v3
before, back when v4 was in alpha, but it had practically zero
documentation, not even <code>man</code> pages, so I gave up on
it very quickly. But with v4, hopefully it's improved since
then.</p>
<h2 id="first-use">First use</h2>
<p>Upon first boot, blendOS drops you into a pretty standard
GNOME session, on account of the <code>/system.yaml</code> file
by default:</p>
<div class="sourceCode" id="cb1"><pre
class="language-yaml"><code class="language-yaml"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">impl</span><span class="kw">:</span><span class="at"> http://github.com/blend-os/tracks/raw/main</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">repo</span><span class="kw">:</span><span class="at"> https://pkg-repo.blendos.co</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="fu">track</span><span class="kw">:</span><span class="at"> default-gnome</span></span></code></pre></div>
<p>At first I wasn't sure what impl is doing, but it seems to be
combined with the track to get the URL for the raw
<code>yaml</code> file[^1].</p>
<p>This is actually a really interesting bit <em>which isn't
documented</em>, as it means you can just, say, host your own
track(s) for all your computers in a Git repo, and they can each
inherit from other configs[^2] or be overridden locally; this
actually seems like a very interesting and viable way to
centrally manage many computers running Linux, and given I'm
constantly switching between several computers; I can just put
my config(s) in one repo, and pull from that.</p>
<h2 id="configuration">Configuration</h2>
<p>It's quite basic, but blendOS actually works very well for
me; I already have a Git repo of <a
href="https://git.askiiart.net/askiiart/configs">all my
configs</a>, which are intended to be run from a clean
installation automatically, so for blendOS I just have to put
those scripts into the yaml file and adapt it so the packages
are listed in the YAML rather than being installed with
<code>pacman</code> or <code>yay</code>.</p>
<h2 id="problems">Problems</h2>
<p>Biggest of all blendOS's problems is how slow it is to
rebuild. It doesn't save "layers" of packages like <a
href="https://github.com/coreos/rpm-ostree"><code>rpm-ostree</code></a>
(as used by Fedora atomic)</p>
<h2 id="wishlist">Wishlist</h2>
<h2 id="sources">Sources</h2>
<ul>
<li>[1] <a href="https://blendos.co/">blendOS homepage</a></li>
<li>[2] <a
href="https://blendos.co/install/post-install/intro/">blendOS
post-install intro</a></li>
</ul>
<h2 id="footnotes">Footnotes</h2>
<ul>
<li>[^1] That is,
<code>http://github.com/blend-os/tracks/raw/main</code> +
<code>/</code> + <code>default-gnome</code> +
<code>.yaml</code></li>
<li>[^2] In the provided <code>blend-os/tracks</code> repo,
<code>default-gnome</code> actually inherits from the
<code>gnome</code> track.</li>
</ul>
<iframe src="https://john.citrons.xyz/embed?ref=askiiart.net" style="margin-left:auto;display:block;margin-right:auto;max-width:732px;width:100%;height:94px;border:none;"></iframe>
<script src="/prism.js"></script>
</body>
<footer>
<p><a href="https://git.askiiart.net/askiiart/engl-2311-blog">code</a>&emsp;<a href="/feed.xml">RSS</a></p>
</footer>
</html>

70
blog/blendos.md Normal file
View file

@ -0,0 +1,70 @@
# Checking out blendOS
blendOS is self-described as "Arch Linux, made declarative, immutable and atomic." And yeah, that's a pretty good description of what it is. But you can never *really* tell what a distro is like without trying it, so...
## Installation
I decided to just run blendOS in a virtual machine; I had a bunch of data I hadn't backed up yet and was actively working on, and didn't feeling like switching yet given I had no experience with blendOS v4[^1] - I've actually tried blendOS v3 before, back when v4 was in alpha, but it had practically zero documentation, not even `man` pages, so I gave up on it very quickly. But with v4, hopefully it's improved since then.
## First use
Upon first boot, blendOS drops you into a pretty standard GNOME session, on account of the `/system.yaml` file by default:
```yaml
impl: http://github.com/blend-os/tracks/raw/main
repo: https://pkg-repo.blendos.co
track: default-gnome
```
At first I wasn't sure what impl is doing, but it seems to be combined with the track to get the URL for the raw `yaml` file[^1].
This is actually a really interesting bit *which isn't documented*, as it means you can just, say, host your own track(s) for all your computers in a Git repo, and they can each inherit from other configs[^2] or be overridden locally; this actually seems like a very interesting and viable way to centrally manage many computers running Linux, and given I'm constantly switching between several computers; I can just put my config(s) in one repo, and pull from that.
## Configuration
blendOS's configuration is really simple:
```yaml
impl: http://github.com/blend-os/tracks/raw/main
repo: https://pkg-repo.blendos.co
track: default-gnome
arch-repo: 'https://repo-goes-here.example'
packages:
- 'fish'
aur-packages:
- 'EVEN-MORE-FISH'
services:
- 'service-goes-here'
user-services:
- 'user-service-goes-here'
package-repos:
- name: 'repo name'
repo-url: 'https://repo.url'
commands:
'echo hiiiiiii > /home/user/helloooooo'
```
It's quite basic, but blendOS actually works very well for me; I already have a Git repo of [all my configs](https://git.askiiart.net/askiiart/configs), which are intended to be run from a clean installation automatically, so for blendOS I just have to put those scripts into the yaml file and adapt it so the packages are listed in the YAML rather than being installed with `pacman` or `yay`.
## Problems
Biggest of all blendOS's problems is how slow it is to rebuild. It doesn't save "layers" of packages like [`rpm-ostree`](https://github.com/coreos/rpm-ostree) (as used by Fedora atomic)
## Wishlist
## Sources
- \[1\] [blendOS homepage](https://blendos.co/)
- \[2\] [blendOS post-install intro](https://blendos.co/install/post-install/intro/)
## Footnotes
- [^1] That is, `http://github.com/blend-os/tracks/raw/main` + `/` + `default-gnome` + `.yaml`
- [^2] In the provided `blend-os/tracks` repo, `default-gnome` actually inherits from the `gnome` track.

11
feed.xml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>askiiart.net</title>
<description>The feed for askiiart.net, I guess</description>
<link>https://askiiart.net</link>
<lastBuildDate>Sun, 25 Aug 2024 16:56:47 +0000</lastBuildDate>
</channel>
</rss>

17
generate-rss.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Makes RSS feed (feed.xml)
# Currently missing description and pubDate
# Based off https://en.wikipedia.org/wiki/RSS, particularly the example
printf "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n\n<channel>\n <title>eng.askiiart.net</title>\n <description>This is the feed for engl.askiiart.net, I guess</description>\n <link>https://askiiart.net</link>\n <lastBuildDate>$(TZ='UTC' date --rfc-2822)</lastBuildDate>" >feed.xml
find . -path ./error -prune -o -name '*.html' -print | while read -r item; do
# Skip template.html, wishlist.html, resume.html, and portfolio.html
if [[ ${item} == "./index.html" || ${item} == "./template.html" ]]; then
continue
fi
item="${item%.*}"
item="${item#./}"
TITLE=$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)
printf "\n <item>\n <title>${TITLE}</title>\n <link>https://engl.askiiart.net/${item}.html</link>\n </item>" >>feed.xml
done
printf "\n\n</channel>\n</rss>" >>feed.xml

30
generate-sitemap.sh Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
### Stolen from TCCD-CompSci-and-Coding-Club/website on Codeberg (also written by me)
# Taken from here and modified: https://www.lostsaloon.com/technology/how-to-create-an-xml-sitemap-using-wget-and-shell-script/
# (https://web.archive.org/web/20231202193251/https://www.lostsaloon.com/technology/how-to-create-an-xml-sitemap-using-wget-and-shell-script/) (https://archive.ph/qtdMP)
sitedomain=https://engl.askiiart.net/
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
wget --spider --recursive --level=inf --output-file=$dir/linklist.txt $sitedomain
# greps for the relevant lines, gets the URLs, gets only the lines for $sitedomain, and sorts them
# wget's output changed, so this line had to be updated
# also, not sure why it ends up working, since there's a leading space in the lines after `awk` runs, but it works soooo i'mnot gonna mess with it
grep "Adding URL:" $dir/linklist.txt | awk -F 'Adding URL:' '{print $2}' | grep "$sitedomain" | sort -u >$dir/sortedurls.txt
header='<?xml version="1.0" encoding="UTF-8"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'
echo $header >sitemap.xml
while read p; do
case "$p" in
*/ | *.html | *.htm)
echo '<url><loc>'$p'</loc></url>' >>sitemap.xml
;;
*) ;;
esac
done <$dir/sortedurls.txt
echo "</urlset>" >>sitemap.xml
rm $dir/linklist.txt
rm $dir/sortedurls.txt

24
index.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
<link rel="icon" href="/assets/askiiart.gif" type="image/icon">
<title>Computers and stuff</title>
<link href="/style.css" type="text/css" rel="stylesheet" />
<link href="/prism.css" type="text/css" rel="stylesheet" />
</head>
<body class="line-numbers">
<h1 id="computers-and-stuff">Computers and stuff</h1>
<p>This is a site! Doing... stuff with computers. Interesting
and sometimes funny stuff, at least to me.</p>
<h2 id="pages">Pages</h2>
<ul>
<li><a href="/blog/blendos.html">Checking out blendOS</a></li>
</ul>
<iframe src="https://john.citrons.xyz/embed?ref=askiiart.net" style="margin-left:auto;display:block;margin-right:auto;max-width:732px;width:100%;height:94px;border:none;"></iframe>
<script src="/prism.js"></script>
</body>
<footer>
<p><a href="https://git.askiiart.net/askiiart/engl-2311-blog">code</a>&emsp;<a href="/feed.xml">RSS</a></p>
</footer>
</html>

7
index.md Normal file
View file

@ -0,0 +1,7 @@
# Computers and stuff
This is a site! Doing... stuff with computers. Interesting and sometimes funny stuff, at least to me.
## Pages
- [Checking out blendOS](/blog/blendos.html)

11
md2html.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
find . -name "*.md" | while read -r item; do
item="${item%.*}"
echo "Currently processing ${item}"
pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o ${item}.html ${item}.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)"
sed -i s/sourceCode\ /language-/g ${item}.html
python3 $dir/regex-chicanery.py ${item}.html
done

219
prism.css Normal file
View file

@ -0,0 +1,219 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+bash+css-extras+csv+docker+excel-formula+git+java+javadoc+javadoclike+javastacktrace+json+json5+log+markdown+nginx+nix+python+rust+sql+yaml&plugins=line-numbers+show-language+toolbar+copy-to-clipboard */
code[class*=language-],
pre[class*=language-] {
color: #f8f8f2;
background: #0e0f0f;
text-shadow: 0 1px rgba(0, 0, 0, .3);
font-family: 'FiraCode', 'Nimbus Mono PS', 'Liberation Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', 'Lucida Console', monospace;
font-size: 0.95em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: .3em
}
:not(pre)>code[class*=language-],
pre[class*=language-] {
background: #0e0f0f
}
:not(pre)>code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}
.token.cdata,
.token.comment,
.token.doctype,
.token.prolog {
color: #8292a2
}
.token.punctuation {
color: #f8f8f2
}
.token.namespace {
opacity: .7
}
.token.constant,
.token.deleted,
.token.property,
.token.symbol,
.token.tag {
color: #f92672
}
.token.boolean,
.token.number {
color: #ae81ff
}
.token.attr-name,
.token.builtin,
.token.char,
.token.inserted,
.token.selector,
.token.string {
color: #a6e22e
}
.language-css .token.string,
.style .token.string,
.token.entity,
.token.operator,
.token.url,
.token.variable {
color: #f8f8f2
}
.token.atrule,
.token.attr-value,
.token.class-name,
.token.function {
color: #e6db74
}
.token.keyword {
color: #66d9ef
}
.token.important,
.token.regex {
color: #fd971f
}
.token.bold,
.token.important {
font-weight: 700
}
.token.italic {
font-style: italic
}
.token.entity {
cursor: help
}
pre[class*=language-].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber
}
pre[class*=language-].line-numbers>code {
position: relative;
white-space: inherit
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em;
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.line-numbers-rows>span {
display: block;
counter-increment: linenumber
}
.line-numbers-rows>span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: .8em;
text-align: right
}
div.code-toolbar {
position: relative
}
div.code-toolbar>.toolbar {
position: absolute;
z-index: 10;
top: .3em;
right: .2em;
transition: opacity .3s ease-in-out;
opacity: 0
}
div.code-toolbar:hover>.toolbar {
opacity: 1
}
div.code-toolbar:focus-within>.toolbar {
opacity: 1
}
div.code-toolbar>.toolbar>.toolbar-item {
display: inline-block
}
div.code-toolbar>.toolbar>.toolbar-item>a {
cursor: pointer
}
div.code-toolbar>.toolbar>.toolbar-item>button {
background: 0 0;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none
}
div.code-toolbar>.toolbar>.toolbar-item>a,
div.code-toolbar>.toolbar>.toolbar-item>button,
div.code-toolbar>.toolbar>.toolbar-item>span {
color: #bbb;
font-size: .8em;
padding: 0 .5em;
background: #f5f2f0;
background: rgba(224, 224, 224, .2);
box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2);
border-radius: .5em
}
div.code-toolbar>.toolbar>.toolbar-item>a:focus,
div.code-toolbar>.toolbar>.toolbar-item>a:hover,
div.code-toolbar>.toolbar>.toolbar-item>button:focus,
div.code-toolbar>.toolbar>.toolbar-item>button:hover,
div.code-toolbar>.toolbar>.toolbar-item>span:focus,
div.code-toolbar>.toolbar>.toolbar-item>span:hover {
color: inherit;
text-decoration: none
}

31
prism.js Normal file

File diff suppressed because one or more lines are too long

14
regex-chicanery.py Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env python3
import re
import sys
# add title attribute to img tags
filename = sys.argv[1]
with open(filename, 'r+') as f:
contents = ''.join(f.readlines())
regexp = re.compile('alt="(.*?)"')
for match in regexp.finditer(contents):
contents = contents.replace(match.group(0), f'title="{match.group(1)}" {match.group(0)}')
with open(filename, 'wt') as f:
f.write(contents)

8
run.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
cd $SCRIPT_DIR
./md2html.sh
./generate-rss.sh
./generate-sitemap.sh

108
style.css Normal file
View file

@ -0,0 +1,108 @@
@font-face {
/* from https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode */
font-family: "FiraCode";
src: url('/FiraCodeNerdFontMono-Regular.woff2');
}
/* from Google Fonts, under the Open Font License */
@font-face {
font-family: "Atkinson Hyperlegible";
src: local('Atkinson Hyperlegible'), url('/AtkinsonHyperlegible-Regular.woff2');
}
@font-face {
font-family: "Atkinson Hyperlegible Bold";
src: local('Atkinson Hyperlegible Bold'), url('/AtkinsonHyperlegible-Bold.woff2');
}
@font-face {
font-family: "Atkinson Hyperlegible Italic";
src: local('Atkinson Hyperlegible Italic'), url('/AtkinsonHyperlegible-Italic.woff2');
}
@font-face {
font-family: "Atkinson Hyperlegible Bold Italic";
src: local('Atkinson Hyperlegible Bold Italic'), url('/AtkinsonHyperlegible-BoldItalic.woff2');
}
body {
color: #dadada;
background: #181a1b;
margin: 1em auto;
max-width: 90vw;
padding: 0 .62em;
}
li {
font-family: 'Atkinson Hyperlegible';
}
p,
footer {
font: 18px/1.35 'Atkinson Hyperlegible', sans-serif;
}
a:link,
a:visited {
color: #80c47b;
}
a:hover,
a:visited:hover {
color: #6bb794
}
h1 {
font: 36px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
}
h2,
h3 {
font: 24px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
}
h4 {
font: 20px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
}
code {
background: #0e0f0f;
border-radius: .2em;
padding: .125em;
}
wrap {
word-wrap: break-word
}
@media (max-device-width: 1200px) {
h1 {
line-height: 1.2;
font-size: 40px;
}
h2 {
line-height: 1.2;
font-size: 30px;
}
body {
font-size: 20px;
}
}
@media print {
body {
max-width: none
}
}
footer {
text-align: center;
}
blockquote {
border-left: 3px solid #59997a;
padding-left: 1em;
margin-left: 0.5;
}

18
template.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
<link rel="icon" href="/assets/askiiart.gif" type="image/icon">
<title>$title$</title>
<link href="/style.css" type="text/css" rel="stylesheet" />
<link href="/prism.css" type="text/css" rel="stylesheet" />
</head>
<body class="line-numbers">
$body$
<iframe src="https://john.citrons.xyz/embed?ref=askiiart.net" style="margin-left:auto;display:block;margin-right:auto;max-width:732px;width:100%;height:94px;border:none;"></iframe>
<script src="/prism.js"></script>
</body>
<footer>
<p><a href="https://git.askiiart.net/askiiart/engl-2311-blog">code</a>&emsp;<a href="/feed.xml">RSS</a></p>
</footer>
</html>