the refactor to end all refactors

This commit is contained in:
yosh 2023-11-16 23:10:51 -05:00
parent 9d7a7fd02c
commit 358459a678
73 changed files with 1161 additions and 1136 deletions

120
build.sh
View File

@ -1,74 +1,112 @@
#!/bin/sh
set -euf
BASE="$PWD"
export _INCDIR="${_INCDIR:-"${BASE}/include"}"
export _BUILDDIR="${_BUILDDIR:-"${BASE}/build"}"
export _SRCDIR="${_SRCDIR:-"${BASE}/src"}"
__NL="
"
cleanup() {
[ -f "${filetmp:-}" ] && rm "$filetmp"
__cleanup() {
[ -f "${__FILE_TMP:-}" ] && rm "$__FILE_TMP"
true
}
# process an html formatted file and output to stdout
process_html() {
__SH_FLAG=""
# SUBSHELL START #
cat "${1:--}" | (
while read -r __LINE; do
if [ -z "$__SH_FLAG" ]; then
case "$__LINE" in
*"<?sh"*)
printf '%s' "${__LINE%%<\?sh*}"
__LINE="${__LINE#*<\?sh}"
__SH_FLAG=1
# process an html formatted file from stdin and output to stdout
__process_shp() {
__SHLVL=$((__SHLVL + 1))
eval '__SH_FLAG'$__SHLVL'=""
__LINE_EXEC_'$__SHLVL'=""
while read -r __LINE'$__SHLVL'; do
if [ -z "$__SH_FLAG'$__SHLVL'" ]; then
case "$__LINE'$__SHLVL'" in
*"<?shp"*)
printf "%s" "${__LINE'$__SHLVL'%%<\?shp*}"
__LINE'$__SHLVL'="${__LINE'$__SHLVL'#*<\?shp}"
__SH_FLAG'$__SHLVL'=1
;;
*) echo "$__LINE" ;;
*) echo "$__LINE'$__SHLVL'" ;;
esac
fi
if [ -n "$__SH_FLAG" ]; then
eval "${__LINE%%\?>*}"
case "$__LINE" in
if [ -n "$__SH_FLAG'$__SHLVL'" ]; then
__LINE_EXEC_'$__SHLVL'="$__LINE_EXEC_'$__SHLVL'$__NL$__LINE'$__SHLVL'"
case "$__LINE'$__SHLVL'" in
*"?>"*)
printf '%s' "${__LINE##*\?>}"
__SH_FLAG=""
eval "${__LINE_EXEC_'$__SHLVL'%%\?>*}"
printf "%s" "${__LINE'$__SHLVL'##*\?>}"
__SH_FLAG'$__SHLVL'=""
__LINE_EXEC_'$__SHLVL'=""
;;
*) ;;
esac
fi
done
)
# SUBSHELL END #
[ $__SH_FLAG'$__SHLVL' ] && eval "$__LINE_EXEC_'$__SHLVL'"'
__SHLVL=$((__SHLVL - 1))
}
__lowdown() { lowdown --html-no-num-ent --html-no-skiphtml --html-no-escapehtml "$@"; }
# process a pure markdown file
# uses a special file in _INCDIR, `markdown-template.sh` to create the html
# TODO: finish this
# for now, port the rest of unix.dog
process_md() {
lowdown --html-no-skiphtml --html-no-escapehtml "${1:--}" | process_html
__process_md() {
[ -f mdmeta ] && set_md_metadata "$1"
. "$_INCDIR"/_markdown-template.sh <<-EOF
$(__lowdown "$1")
EOF
}
trap 'cleanup' INT HUP QUIT EXIT
trap '__cleanup' INT HUP QUIT EXIT
__FILE_TMP="$(mktemp -u)"
filetmp="$(mktemp -u)"
# 99% of the time you probably want to be here
cd "$_INCDIR"
find "$_SRCDIR" -type d -exec sh -c 'for d; do mkdir -p "$_BUILDDIR"/"${d#"$_SRCDIR"}"; done' sh {} +
while read -r file; do
case "$file" in
*.[hH][tT][mM][lL]) process_html < "$file" > "$filetmp" ;;
*.[mM][dD]) process_md < "$file" > "$filetmp" ;;
*) cp "$file" "$filetmp" ;;
# standard library
include() {
# if the path contains a slash, then treat it as-is
# else, try getting it from $_INCDIR
case "$1" in
*/*.md) __lowdown "$1" ;;
*.md) __lowdown "$_INCDIR"/"$1" ;;
*/*) __process_shp < "$1" ;;
*) __process_shp < "$_INCDIR"/"$1" ;;
esac
if ! cmp -s "$filetmp" "$_BUILDDIR"/"${file#"$_SRCDIR"}"; then
mv "$filetmp" "$_BUILDDIR"/"${file#"$_SRCDIR"}"
}
set_md_metadata() {
__MD_BASE="${1##*/}"
while read -r __MD_LINE; do
case "$__MD_LINE" in
"$__MD_BASE") __MD_FLAG="1" ;;
"" ) [ -n "$__MD_FLAG" ] && break ;;
*) [ -n "$__MD_FLAG" ] && __MD_EXEC="$__MD_EXEC$__NL$__MD_LINE" ;;
esac
done < mdmeta
__MD_FLAG=""
eval "$__MD_EXEC"
}
escape() {
sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/"/\&quot;/g' -e "s/'/\\&#39/g" <<-EOF
$*
EOF
}
__SHLVL=0
while read -r __FILE; do
cd "${__FILE%/*}"
__OUTFILE="$_BUILDDIR/${__FILE#"$_SRCDIR"}"
case "${__FILE##*/}" in
*.[hH][tT][mM][lL]) ( __process_shp ) < "$__FILE" > "$__FILE_TMP" ;;
*.[mM][dD]) ( __process_md "$__FILE" ) > "$__FILE_TMP"; __OUTFILE="${__OUTFILE%.*}.html" ;;
mdmeta) continue ;;
*) cp -p "$__FILE" "$__FILE_TMP" ;;
esac
if ! cmp -s "$__FILE_TMP" "$__OUTFILE"; then
mv "$__FILE_TMP" "$__OUTFILE"
fi
done <<-EOF
$(find "$_SRCDIR" -type f)
EOF
[ -f "$_INCDIR/_postbuild.sh" ] && . "$_INCDIR/_postbuild.sh"

View File

@ -0,0 +1,20 @@
include header-unified.shp
echo "<main>"
# metadata processed before this will generate the titlebar
gen_titlebar
# my post titles will always be the first thing, so this is fine
read -r __post_title
echo "$__post_title"
# date below title
[ -n "$POST_TIME" ] && echo "<p>posted <time>$POST_TIME</time></p>"
# rest of stdin is the formatted markdown
cat
echo '</main>'
include footer.shp

45
include/_postbuild.sh Normal file
View File

@ -0,0 +1,45 @@
# generate feed.atom for blog
cd "$_SRCDIR/blog"
# feed path, last 10 entries
feed="$_BUILDDIR/blog/feed.atom"
last10="$(find . -type f -name "*.md" | sort -nr | head)"
max_secs=0
while read -r entry; do
html="$(__lowdown "$entry")"
title="$(head -n 1 <<-EOF
$html
EOF
)"
title="${title#*>}"
title="${title%<*}"
entry="${entry##*/}"
set_md_metadata "$entry"
secs="$(stat -c %Y "$entry")"
[ "$secs" -gt "$max_secs" ] && max_secs="$secs"
entry_date="$(date -u -d "@$secs" '+%Y-%m-%dT%R:%SZ')"
entries="$entries"'
<entry>
<title>'"$title"'</title>
<link rel="alternate" href="'"/~yosh/blog/${entry%.md}.html"'"/>
<id>urn:uuid:'"$FEED_UUID"'</id>
<published>'"$POST_TIME"'</published>
<updated>'"$entry_date"'</updated>
<content>'"$(__lowdown "$entry")"'</content>
</entry>'
done <<-EOF
$last10
EOF
header='<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>yosh'\''s blog</title>
<link href="https://unix.dog/~yosh/blog"/>
<author><name>yosh</name></author>
<updated>'"$(date -u -d "@$max_secs" '+%Y-%m-%dT%R:%SZ')"'</updated>
<id>urn:uuid:ab54972a-c095-4177-8a36-b77d48d86bec</id>'
printf '%s\n%s\n</feed>' "$header" "$entries" > "$feed"

View File

@ -0,0 +1,4 @@
<?shp
# future proofing
include functions.inc.shp

View File

@ -1,3 +0,0 @@
# future-proofing
. functions.sh

5
include/footer.sh → include/footer.shp Executable file → Normal file
View File

@ -1,6 +1,7 @@
cat <<EOF
<footer>
<?shp gen_titlebar "footer" random ?>
<p>this site is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a><br>
see the <a href="https://git.unix.dog/yosh/website">source code repository</a></p>
</footer>
EOF
</body>
</html>

View File

@ -1,85 +0,0 @@
gen_sidebar() {
for i; do
case "$i" in
top)
echo '<section class="lbartop">'
TB_TITLE="navigation" TB_COLOR="pink" gen_titlebar
echo '<nav>
<h2>navigation</h2>
<ul>
<li><a href="/~yosh/index.html">home</a></li>
<li><a href="/~yosh/info.html">information</a></li>
<li><a href="/~yosh/blog/">blog</a></li>
<li><a href="/~yosh/cool-stuff/">cool stuff</a></li>
<li><a href="/~yosh/random-info/">random info</a></li>
<li><a href="/~yosh/links.html">links</a></li>
<li><a href="/~yosh/credits.html">credits</a></li>
</ul>
</nav>
</section>'
;;
bottom)
echo '<section class="lbarbot bunny">'
TB_TITLE="miscellaneous!!" TB_COLOR="lblue" gen_titlebar
echo '<ul class="displist sbgridlist" aria-hidden="true">
<li><a href="https://digboye.newgrounds.com/"><img src="/~yosh/img/buttons/boyslife_button.gif" alt="boyslife"></a></li>
</ul>
<hr>
<ul class="displist sbgridlist" aria-hidden="true">
<li><img src="/~yosh/img/buttons/tosviolation.gif" alt="this page is a tos violation"></li>
<li><img src="/~yosh/img/buttons/anybrowser.gif" alt="best viewed with any browser"></li>
</ul>
</section>'
;;
bottom-void)
echo '<section class="lbarbot">'
TB_TITLE="void linux" TB_COLOR="lblue" gen_titlebar
echo '<h2>void linux</h2>
<nav>
<ul class="s">
<li><a href="installation.html">installation</a></li>
<ul class="s">
<li><a href="installation.html#fde">full disk encryption + efistub</a></li>
</ul>
<li><a href="setup.html">basic system setup</a></li>
<ul class="s">
<li><a href="setup.html#users">user(s)</a></li>
<li><a href="setup.html#time">time</a></li>
<li><a href="setup.html#internet">internet</a></li>
<ul class="s">
<li><a href="setup.html#internet-wifi">wifi (wpa_supplicant)</a></li>
<li><a href="setup.html#internet-eduroam">eduroam</a></li>
</ul>
<li><a href="setup.html#sudo">replacing sudo</a></li>
<li><a href="setup.html#xdg">XDG variables</a></li>
</ul>
<li><a href="xorg.html">xorg</a></li>
<ul class="s">
<li><a href="xorg.html#local-services">local services</a></li>
<li><a href="xorg.html#pipewire">pipewire(-pulse)</a></li>
<li><a href="xorg.html#xscreensaver">xscreensaver</a></li>
</ul>
<li><a href="mail.html">mail</a></li>
<ul class="s">
<li><a href="mail.html#claws">claws mail</a></li>
<li><a href="mail.html#aerc">fdm+aerc+msmtp</a></li>
</ul>
<li><a href="software.html">misc. software</a></li>
<ul class="s">
<li><a href="software.html#vim">vim</a></li>
<li><a href="software.html#quiterss">quiterss</a></li>
</ul>
<li><a href="rescuing.html">rescuing a system: the basics</a></li>
<li><a href="xdg.html">forcing XDG (nearly) everywhere</a></li>
<li><a href="addendums.html">addendums</a></li>
<ul class="s">
<li><a href="addendums.html#hw-workarounds">hardware workarounds</a></li>
</ul>
</ul>
</nav>
</section>'
;;
*) ;;
esac
done
}

16
include/functions.inc.shp Normal file
View File

@ -0,0 +1,16 @@
<?shp
gen_titlebar() {
__tb_title="${1:-${TB_TITLE:-untitled}}"
__tb_color="${2:-${TB_COLOR:-random}}"
# make sure this matches /src/style/titlebars.css
set -- teal brown lgrey dgrey lblue purple white lblue dblue green pink
if [ "$__tb_color" = "random" ]; then
__d="8$(tr -Cd '[:digit:]' < /dev/urandom | dd bs=1 count=2 2>/dev/null)"
eval '__tb_color=${'$((__d % $# + 1))'}'
fi
printf '<div class="titlebar tb-%s" aria-hidden="true">
<span class="tbl" title="%s"></span>
<span class="tbr"></span>
</div>' "$__tb_color" "$__tb_title"
}

View File

@ -1,11 +0,0 @@
gen_titlebar() {
cat <<EOF
<div class="titlebar tb-${TB_COLOR:-green}" aria-hidden="true">
<span class="tbl" title="${TB_TITLE:-${TITLE:-untitled}}"></span>
<span class="tbr"></span>
</div>
EOF
}
# gen_sidebar [top|bottom|bottom-void]
. functions-sidebar.sh

4
include/head.sh → include/head.shp Executable file → Normal file
View File

@ -1,11 +1,9 @@
cat <<EOF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf8">
<title>${TITLE:-~yosh}</title>
<title><?shp printf '%s' "${TITLE:-~yosh}" ?></title>
<link rel="stylesheet" href="/~yosh/style/style.css">
<link rel="alternate" type="application/atom+xml" title="blog atom feed" href="/~yosh/blog/feed.atom">
</head>
EOF

View File

@ -0,0 +1,13 @@
<?shp
include bootstrap.inc.shp
include head.shp
echo '<body>'
include header.shp
SIDEBARS="${SIDEBARS:-"top bot"}"
for i in $SIDEBARS; do
include "sidebar-$i.shp"
done

View File

@ -1,3 +0,0 @@
echo '<header>
~yosh@unix.dog
</header>'

3
include/header.shp Normal file
View File

@ -0,0 +1,3 @@
<header>
~yosh@unix.dog
</header>

View File

@ -1,3 +0,0 @@
TITLE="$(grep -m 1 -e '^#[^#]' "$1" | sed -e 's/^#[[:blank:]]*//' -e 's/[[:blank:]]*$//') | ~yosh"
sh ./head.sh

View File

@ -0,0 +1,53 @@
<section class="lbarbot">
<?shp gen_titlebar "void linux" green ?>
<h2>void linux</h2>
<nav>
<ul>
<li><a href="installation.html">installation</a>
<ul>
<li><a href="installation.html#full-disk-encryption-efistub">full disk encryption + efistub</a></li>
</ul>
</li>
<li><a href="setup.html">basic system setup</a>
<ul>
<li><a href="setup.html#users">user(s)</a></li>
<li><a href="setup.html#time">time</a></li>
<li><a href="setup.html#internet">internet</a>
<ul>
<li><a href="setup.html#wifi-wpa_supplicant">wifi (wpa_supplicant)</a></li>
<li><a href="setup.html#eduroam">eduroam</a></li>
</ul>
</li>
<li><a href="setup.html#replacing-sudo">replacing sudo</a></li>
<li><a href="setup.html#xdg-variables">XDG variables</a></li>
</ul>
</li>
<li><a href="xorg.html">xorg</a>
<ul>
<li><a href="xorg.html#local-services">local services</a></li>
<li><a href="xorg.html#pipewire-pulse">pipewire(-pulse)</a></li>
<li><a href="xorg.html#xscreensaver">xscreensaver</a></li>
</ul>
</li>
<li><a href="mail.html">mail</a>
<ul>
<li><a href="mail.html#claws-mail">claws mail</a></li>
<li><a href="mail.html#fdm-aerc">fdm+aerc</a></li>
</ul>
</li>
<li><a href="software.html">misc. software</a>
<ul>
<li><a href="software.html#vim">vim</a></li>
<li><a href="software.html#quiterss">quiterss</a></li>
</ul>
</li>
<li><a href="rescuing.html">rescuing a system: the basics</a></li>
<li><a href="xdg.html">forcing XDG (nearly) everywhere</a></li>
<li><a href="addendums.html">addendums</a>
<ul>
<li><a href="addendums.html#hardware-workarounds">hardware workarounds</a></li>
</ul>
</li>
</ul>
</nav>
</section>

11
include/sidebar-bot.shp Normal file
View File

@ -0,0 +1,11 @@
<section class="lbarbot bunny">
<?shp gen_titlebar 'miscellaneous!!' random ?>
<ul class="displist sbgridlist" aria-hidden="true">
<li><a href="https://digboye.newgrounds.com/"><img src="/~yosh/img/buttons/boyslife_button.gif" alt="boyslife"></a></li>
</ul>
<hr>
<ul class="displist sbgridlist" aria-hidden="true">
<li><img src="/~yosh/img/buttons/tosviolation.gif" alt="this page is a tos violation"></li>
<li><img src="/~yosh/img/buttons/anybrowser.gif" alt="best viewed with any browser"></li>
</ul>
</section>

15
include/sidebar-top.shp Normal file
View File

@ -0,0 +1,15 @@
<section class="lbartop">
<?shp gen_titlebar 'navigation' random ?>
<nav>
<h2>navigation</h2>
<ul>
<li><a href="/~yosh/index.html">home</a></li>
<li><a href="/~yosh/info.html">information</a></li>
<li><a href="/~yosh/blog/">blog</a></li>
<li><a href="/~yosh/my-things.html">my things</a></li>
<li><a href="/~yosh/random-info/">random info</a></li>
<li><a href="/~yosh/links/">links</a></li>
<li><a href="/~yosh/credits.html">credits</a></li>
</ul>
</nav>
</section>

View File

@ -1,44 +0,0 @@
bar_top() {
cat <<EOF
<section class="lbartop">
$(TB_TITLE="navigation" TB_COLOR="pink" sh titlebar.sh)
<nav>
<h2>navigation</h2>
<ul>
<li><a href="/~yosh/index.html">home</a></li>
<li><a href="/~yosh/info.html">information</a></li>
<li><a href="/~yosh/blog/">blog</a></li>
<li><a href="/~yosh/cool-stuff/">cool stuff</a></li>
<li><a href="/~yosh/random-info/">random info</a></li>
<li><a href="/~yosh/links.html">links</a></li>
<li><a href="/~yosh/credits.html">credits</a></li>
</ul>
</nav>
</section>
EOF
}
bar_bottom() {
cat <<EOF
<section class="lbarbot bunny">
$(TB_TITLE="miscellaneous!!" TB_COLOR="lblue" sh titlebar.sh)
<ul class="displist sbgridlist" aria-hidden="true">
<li><a href="https://digboye.newgrounds.com/"><img src="/~yosh/img/buttons/boyslife_button.gif" alt="boyslife"></a></li>
</ul>
<hr>
<ul class="displist sbgridlist" aria-hidden="true">
<li><img src="/~yosh/img/buttons/tosviolation.gif" alt="this page is a tos violation"></li>
<li><img src="/~yosh/img/buttons/anybrowser.gif" alt="best viewed with any browser"></li>
</ul>
</section>
EOF
}
while [ $# -gt 0 ]; do
case "$1" in
top) bar_top ;;
bottom) bar_bottom ;;
*) ;;
esac
shift
done

View File

@ -1,6 +0,0 @@
cat <<EOF
<div class="titlebar tb-${TB_COLOR:-green}" aria-hidden="true">
<span class="tbl" title="${TB_TITLE:-${TITLE:-untitled}}"></span>
<span class="tbr"></span>
</div>
EOF

View File

@ -1,34 +0,0 @@
<?sh TITLE="intimacy via jankiness | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="intimacy via jankiness" TB_COLOR="lblue" ./titlebar.sh ?>
<h1>intimacy via jankiness</h1>
<time>2023-07-10</time>
<p>there's something I like about jankiness. I don't necessarily want to say unmaintainability or poor quality, but jankiness</p>
<h2 id="this-website">this website</h2>
<p>if you've known me for any amount of mine, then you probably know that I <a href="https://git.unix.dog/yosh/agetar">love</a> <a href="https://git.unix.dog/yosh/misc-scripts">to</a> <a href="https://git.unix.dog/yosh/mimix">shell</a> <a href="https://github.com/yoshiyoshyosh/flacconv">script</a>. shell scripts are janky. <a href="https://eklitzke.org/bash-$%2A-and-$@">shell is a weird language</a>. shell has many caveats, ranging from the simple-yet-often-overlooked <a href="https://stackoverflow.com/questions/10067266/when-to-wrap-quotes-around-a-shell-variable">quoting all your variables</a> to the cvs receipt length monster that is the <a href="https://mywiki.wooledge.org/BashPitfalls">bash pitfalls page</a> (though, only a subset of these apply to POSIX shell, the dialect that <a href="https://j3s.sh/thought/write-posix-shell.html">I like to use</a>).</p>
<p>so why do I like writing it so much? why do I use systems that are built on the foundation of shell scripts, like <a href="https://voidlinux.org/">void linux</a>?</p>
<p>the truth is, I really don't know. it feels weirdly intimate for me--learning all the little quirks and sidesteps for something as complex and unintuitive as shell. it's incredibly effective when used right, and something I've internalized enough that I <a href="https://git.unix.dog/yosh/website/src/branch/master/build.sh">build this site with one shell script</a>. I write most of this site manually, and implement "include templates" by inserting <code>&lt;!--RES f=&lt;file&gt; --&gt;</code> on a line, probably much to the agony of people like <a href="https://cendyne.dev/posts/2023-07-10-a-precious-side-project.html">cendyne</a> or <a href="https://xeiaso.net/talks/how-my-website-works">xe</a></p>
<p>but I do it because it's fun. it makes me feel nice. I like writing my site like this, even if it means dealing with a bit of jankiness. at least the jankiness comes from me</p>
<h2 id="celeste">celeste</h2>
<p>I <a href="https://www.youtube.com/@Yoshiyosh/videos">really like the game celeste</a>. I think it has the best movement system of any 2d platformer, ever. this might strike as an odd inclusion in this post--something this refined and fluid in a post about jankiness. it's not about the base game, but about the <a href="https://gamebanana.com/games/6460">huge modding scene</a></p>
<p>it's incredible how many custom maps exist for celeste. all-time classics like <a href="https://gamebanana.com/mods/150453">glyph</a> shine even today; collabs like <a href="https://gamebanana.com/mods/424541">strawberry jam</a> push the bounds of modding ever more</p>
<p>those aren't the mods I want to talk about</p>
<p>the hardest achievement I have accomplished in the game, and what remains as one of the hardest achievements done in modded celeste, is <a href="https://www.youtube.com/watch?v=FnIztI2lu48">obtaining the golden strawberry</a> for <a href="https://gamebanana.com/mods/317954">strawberry hunter</a> while collecting every strawberry, a challenge so infamous for being long and "jank" that I got $70 for doing it</p>
<img src="2023-07-10_shfcg.png" alt="a screenshot of parrot_dash saying &quot;shfcg bounty growing stronger&quot;, with the total value being $70">
<p>I've made a name for myself in the celeste community by doing these "jank" maps. stuff like <a href="https://www.youtube.com/watch?v=XfXKkU1DGzA">floating oil rig full clear gold</a> or <a href="https://www.youtube.com/watch?v=JE27w0ZtBh0">etselec max%</a> remain unmatched as of the time of writing this post (edit: <a href="https://www.youtube.com/watch?v=_iPulCHTeIA">spki got floating oil rig fcg on 21 july 2023. congrats to them!</a>). maps considered "out there" are sometimes labeled "yoshi maps", something I find quite funny</p>
<p>again, I don't know why I have that draw. it's the same thing as I said before--the learning of every little intricate detail, workaround, and strategy for mastering a map like that makes me feel good, an achievement I hold more dear than, say, if I got <a href="https://www.youtube.com/watch?v=bNYQUqV6_TQ">7DG</a> or whatever</p>
<h2 id="music">music</h2>
<p>as I write this post, I am listening to <a href="https://www.youtube.com/playlist?list=PLl85lImy0ZF0-kqBW8YrF49zRkrMD_Ont">all of life's mysteries</a>, by renard, now known under the all-encompassing <a href="https://lapfox.bandcamp.com/">halley labs</a>
<p>it's no real secret that I like lapfox. there's a little picture of renard in the bottom right of this site, in fact. throughout the years, <a href="https://heckscaper.com">emma essex</a> has done wonders to their music, refining the intricate details of their sound design with each release</p>
<p>but again, I find myself drawn towards the early works</p>
<p>I'm not talking about all-time classics like <a href="https://www.youtube.com/playlist?list=PLDPdqi0iT5A586LvF-flIXgzEG31pN6FG">this place will grow ep</a>, which is probably my favorite release ever. I'm talking really early, such as, as mentioned before, all of life's mysteries. the level of sound design pales in comparison to modern albums. that's not to say there aren't hints of experimentation there--the chop patterns are pretty damn good; sound design and pattern composing seep out in tiny bits in tracks like <a href="https://www.youtube.com/watch?v=Px0S_axJ8CI&list=PLl85lImy0ZF0-kqBW8YrF49zRkrMD_Ont&index=28">worth more than 40 seconds</a>, and I think that's what I love about the album</p>
<p>it's the amateurish sound that I enjoy, a sound that I loosely dub "the sound of experimentation". it's the sound of someone trying something, even if it may be jank in retrospect. that's the kind of sound that I like, and it's the same thing that reflects in the other two sections of this post</p>
<p><a href="index.html">back</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,41 @@
# intimacy via jankiness
there's something I like about jankiness. I don't necessarily want to say unmaintainability or poor quality, but jankiness
## this website
if you've known me for any amount of time, then you probably know that I [love to shell script](http://localhost:8002/~yosh/my-things.html#shell-scripts). shell scripts are janky. [shell is a weird language](https://eklitzke.org/bash-$%2A-and-$@). shell has many caveats, ranging from the simple-yet-often-overlooked [quoting all your variables](https://stackoverflow.com/questions/10067266/when-to-wrap-quotes-around-a-shell-variable) to the cvs receipt length monster that is the [bash pitfalls page](https://mywiki.wooledge.org/BashPitfalls) (though, only a subset of these apply to POSIX shell, the dialect that [I like to use](https://j3s.sh/thought/write-posix-shell.html)).
so why do I like writing it so much? why do I use systems that are built on the foundation of shell scripts, like [void linux](https://voidlinux.org/)?
the truth is, I really don't know. it feels weirdly intimate for me--learning all the little quirks and sidesteps for something as complex and unintuitive as shell. it's incredibly effective when used right, and something I've internalized enough that I [build this site with one shell script](https://git.unix.dog/yosh/website/src/branch/master/build.sh). I write most of this site manually, and implement "include templates" by inserting `<!--RES f=<file> -->` on a line, probably much to the agony of people like [cendyne](https://cendyne.dev/posts/2023-07-10-a-precious-side-project.html) or [xe](https://xeiaso.net/talks/how-my-website-works)
\* *update from the future: I've refined this to be a much more robust system. more about that in... a future blog! when I release it I'll link it here*
but I do it because it's fun. it makes me feel nice. I like writing my site like this, even if it means dealing with a bit of jankiness. at least the jankiness comes from me
## celeste
I [really like the game celeste](https://www.youtube.com/@Yoshiyosh/videos). I think it has the best movement system of any 2d platformer, ever. this might strike as an odd inclusion in this post--something this refined and fluid in a post about jankiness. it's not about the base game, but about the [huge modding scene](https://gamebanana.com/games/6460)
it's incredible how many custom maps exist for celeste. all-time classics like [glyph](https://gamebanana.com/mods/150453) shine even today; collabs like [strawberry jam](https://gamebanana.com/mods/424541) push the bounds of modding ever more
those aren't the mods I want to talk about
the hardest achievement I have accomplished in the game, and what remains as one of the hardest achievements done in modded celeste, is [obtaining the golden strawberry](https://www.youtube.com/watch?v=FnIztI2lu48) for [strawberry hunter](https://gamebanana.com/mods/317954) while collecting every strawberry, a challenge so infamous for being long and "jank" that I got $70 for doing it
![a screenshot of parrot\_dash saying "shfcg bounty growing stronger", with the total value being about $70](2023-07-10_shfcg.png)
I've made a name for myself in the celeste community by doing these "jank" maps. stuff like [floating oil rig full clear gold](https://www.youtube.com/watch?v=XfXKkU1DGzA) or [etselec max%](https://www.youtube.com/watch?v=JE27w0ZtBh0) remain unmatched as of the time of writing this post (edit: [spki got floating oil rig fcg on 21 july 2023. congrats to them!](https://www.youtube.com/watch?v=_iPulCHTeIA)). maps considered "out there" are sometimes labeled "yoshi maps", something I find quite funny
again, I don't know why I have that draw. it's the same thing as I said before--the learning of every little intricate detail, workaround, and strategy for mastering a map like that makes me feel good, an achievement I hold more dear than, say, if I got [7DG](https://www.youtube.com/watch?v=bNYQUqV6_TQ) or whatever
## music
as I write this post, I am listening to [all of life's mysteries](https://www.youtube.com/playlist?list=PLl85lImy0ZF0-kqBW8YrF49zRkrMD_Ont), by renard, now known under the all-encompassing [halley labs](https://lapfox.bandcamp.com/)
it's no real secret that I like lapfox. there's a little picture of renard in the bottom right of this site, in fact. throughout the years, [emma essex](https://heckscaper.com) has done wonders to their music, refining the intricate details of their sound design with each release
but again, I find myself drawn towards the early works
I'm not talking about all-time classics like [this place will grow ep](https://www.youtube.com/playlist?list=PLDPdqi0iT5A586LvF-flIXgzEG31pN6FG), which is probably my favorite release ever. I'm talking really early, such as, as mentioned before, all of life's mysteries. the level of sound design pales in comparison to modern albums. that's not to say there aren't hints of experimentation there--the chop patterns are pretty damn good; sound design and pattern composing seep out in tiny bits in tracks like [worth more than 40 seconds](https://www.youtube.com/watch?v=Px0S_axJ8CI&list=PLl85lImy0ZF0-kqBW8YrF49zRkrMD_Ont&index=28), and I think that's what I love about the album
it's the amateurish sound that I enjoy, a sound that I loosely dub "the sound of experimentation". it's the sound of someone trying something, even if it may be jank in retrospect. that's the kind of sound that I like, and it's the same thing that reflects in the other two sections of this post
[back](index.html)

View File

@ -1,21 +0,0 @@
<?sh TITLE="discourse | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="discourse" TB_COLOR="pink" ./titlebar.sh ?>
<h1>discourse</h1>
<time>2023-07-18</time>
<p>discourse is really tiring</p>
<p>I know. real bold thing to say. fighting over useless shit on the internet has been <a href="https://en.wikipedia.org/wiki/Godwin%27s_law">a staple since usenet</a>, and I'm sure people like godwin also were tired of it back then</p>
<p>I try to avoid discourse whenever I can. I rarely encountered it on my timeline when on twitter, and still rarely encounter Discourse:tm: on my fediverse timeline. but even then, it takes one person posting a link to a hyper-condensed 240 character tweet in a friend group I'm in before the chat has a book's worth of pages on everyone's individual opinion that differs in slightly different ways, yet all reinforcing their thoughts even more about a topic I never have the energy to truly discuss</p>
<p>it's not like I don't have opinions. I do, and on most discourse topics, I want to believe that my opinions come from my own morals and personal thoughts, rather than trying to parrot the views of another. I hope so</p>
<p>I just never have the energy to discuss that kind of thing. my mouth screams to throw my hat in the ring--the two cents of my opinion on the chat, yet my brain never wants to. I'm usually simultaneously in places and circles on opposite sides of internal subculture wars, wars on topics that mean nothing in the grand scheme of things</p>
<p>it's just tiring. I bite my tongue and hold back on voicing my opinion, because I know that in the end, nobody will change their mind--that's just how it is. I could have a friend group start looking at me weird by me not adequately explaining my very complex thoughts on meaningless, yet complex topics clearly through text, because that is also hard</p>
<p>I'd rather just stay away and not deal with it all. whatever</p>
<p><a href="index.html">back</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,16 @@
# discourse
discourse is really tiring
I know. real bold thing to say. fighting over useless shit on the internet has been [a staple since usenet](https://en.wikipedia.org/wiki/Godwin%27s_law), and I'm sure people like godwin also were tired of it back then
I try to avoid discourse whenever I can. I rarely encountered it on my timeline when on twitter, and still rarely encounter Discourse:tm: on my fediverse timeline. but even then, it takes one person posting a link to a hyper-condensed 240 character tweet in a friend group I'm in before the chat has a book's worth of pages on everyone's individual opinion that differs in slightly different ways, yet all reinforcing their thoughts even more about a topic I never have the energy to truly discuss
it's not like I don't have opinions. I do, and on most discourse topics, I want to believe that my opinions come from my own morals and personal thoughts, rather than trying to parrot the views of another. I hope so
I just never have the energy to discuss that kind of thing. my mouth screams to throw my hat in the ring--the two cents of my opinion on the chat, yet my brain never wants to. I'm usually simultaneously in places and circles on opposite sides of internal subculture wars, wars on topics that mean nothing in the grand scheme of things
it's just tiring. I bite my tongue and hold back on voicing my opinion, because I know that in the end, nobody will change their mind--that's just how it is. I could have a friend group start looking at me weird by me not adequately explaining my very complex thoughts on meaningless, yet complex topics clearly through text, because that is also hard
I'd rather just stay away and not deal with it all. whatever
[back](index.html)

View File

@ -1,31 +0,0 @@
<?sh TITLE="dreams of form | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="dreams of form" TB_COLOR="pink" ./titlebar.sh ?>
<h1>dreams of form</h1>
<time>2023-08-16</time>
<p>the moments are short, at least that's how they feel</p>
<p>a small couple of times, invoked thus far only in worlds I enter through rest, have those moments took shape</p>
<p>I look around and notice a setting devoid of an earth, of a world without atmosphere. a world made artificially</p>
<p>the walls glisten, yet the polish appears to be waning. it ought to be replaced soon, but perhaps more important jobs are to be done</p>
<p>down I peer, met with not skin but feathers, sensations of ruffling them creeping along my body, across some new form I have taken shape</p>
<p>I feel myself rise, perhaps on instinct, perhaps on surprise, and a delicate balancing act ensues. trying to stand on toes is quite difficult</p>
<p>yet I manage, and my mind seems to notice. the floor should be cold--this is space, after all--yet no tinge of chill meets my nerves</p>
<p>more I walk along, meeting with a few similar beings. in my mind I speak, but my ears hear chirps</p>
<p>I'm shown a sign with glyphs I've never seen before, yet with words I can perfectly read. a language given only a faux imitation of its beauty in the before life</p>
<p>only now does the reflection in the polish strike me. I guess poor eyesight can do that to a self-image</p>
<p>but the world gets stolen from me, as quickly as it was given, separated once again from a reality where I still felt like myself</p>
<hr/>
<p>in here, I guess I can imitate the feeling</p>
<p>it won't be the same, but it'll be close enough</p>
<p>and maybe one day can that form truly be me</p>
<p>or any other form, really</p>
<p>I'm not picky</p>
<p><a href="index.html">back</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,34 @@
# dreams of form
the moments are short, at least that's how they feel
a small couple of times, invoked thus far only in worlds i enter through rest, have those moments took shape
i look around and notice a setting devoid of an earth, of a world without atmosphere. a world made artificially
the walls glisten, yet the polish appears to be waning. it ought to be replaced soon, but perhaps more important jobs are to be done
down i peer, met with not skin but feathers, sensations of ruffling them creeping along my body, across some new form i have taken shape
i feel myself rise, perhaps on instinct, perhaps on surprise, and a delicate balancing act ensues. trying to stand on toes is quite difficult
yet i manage, and my mind seems to notice. the floor should be cold--this is space, after all--yet no tinge of chill meets my nerves
more i walk along, meeting with a few similar beings. in my mind i speak, but my ears hear chirps
i'm shown a sign with glyphs i've never seen before, yet with words i can perfectly read. a language given only a faux imitation of its beauty in the before life
only now does the reflection in the polish strike me. i guess poor eyesight can do that to a self-image
but the world gets stolen from me, as quickly as it was given, separated once again from a reality where i still felt like myself
in here, i guess i can imitate the feeling
it won't be the same, but it'll be close enough
and maybe one day can that form truly be me
or any other form, really
i'm not picky
[back](index.html)

View File

@ -1,23 +0,0 @@
<?sh TITLE="github avoidance | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="github" TB_COLOR="white" ./titlebar.sh ?>
<h1>moving away from github</h1>
<time>2023-09-06</time>
<p>I started moving away from github a bit. <a href="https://ratfactor.com/leaving-github">this blog post by ratfactor</a> echoes a lot of my sentiments why</p>
<p>I won't be moving away 100% completely. I still have to use github for a few things:</p>
<ul>
<li><p>contributing to existing open source projects (most notably <a href="https://github.com/void-linux/void-packages">void-packages</a>)</p></li>
<li><p>frictionless collaboration with friends for team projects (most notably <a href="https://github.com/yoshiyoshyosh/goldberries">goldberries</a>)</p></li>
</ul>
<p>but I won't be hosting my own projects there any more, opting to rather develop them on <a href="https://git.unix.dog/yosh">unix.dog</a>. of course, I didn't be a complete bastard and remove all my repositories without a care in the world. any repository that looked "important" (had at least 1 star. you guys are the best) I archived with a pointer to unix.dog and deleted the rest (in retrospect, I probably should have kept mimix. oh well)</p>
<p>if you don't have a unix.dog account, you can email patches or issues to my unix.dog email, just like the good old days</p>
<p>here's to a broken software supply chain, free from the grasp of any one organization</p>
<p><a href="index.html">back</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,15 @@
# moving away from github
I started moving away from github a bit. [this blog post by ratfactor](https://ratfactor.com/leaving-github) echoes a lot of my sentiments why
I won't be moving away 100% completely. I still have to use github for two main things:
- contributing to existing open source projects. most notably, this is [void-packages](https://github.com/void-linux/void-packages), but other various projects are included here too
- frictionless collaboration with friends for team projects (most notably [goldberries](https://github.com/yoshiyoshyosh/goldberries))
but I won't be hosting my own projects there any more, opting to rather develop them on [unix.dog](https://git.unix.dog/yosh). of course, I didn't be a complete bastard and remove all my repositories without a care in the world. any repository that looked "important" (had at least 1 star. you guys are the best) I archived with a pointer to unix.dog and deleted the rest (in retrospect, I probably should have kept mimix. oh well)
if you don't have a unix.dog account, you can email patches or issues to my unix.dog email, just like the good old days
here's to a broken software supply chain, free from the grasp of any one organization
[back](index.html)

View File

@ -1,20 +0,0 @@
<?sh TITLE="mysterious world | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="the thought window" TB_COLOR="white" ./titlebar.sh ?>
<h1>there are things that I will never understand</h1>
<time>2023-10-16</time>
<p>I type this post while I sit idle in <a href="https://resonite.com">resonite</a>. I'm listening to someone--someone as a part of multiple--talk about their experience in a system</p>
<p>I don't understand how it works. I don't think I can ever understand it. I hear experiences, I hear explanations, I hear causes, and yet I will never understand. I don't have those experiences. it's something incredibly human--experiencing your own mind--that nobody who is outside that bubble can ever understand. that includes me</p>
<p>it confuses me, yet it oddly soothes me too. their experiences are what make them unique as a form--unique in this world</p>
<p>the thoughts and feelings of others I can never truly know myself. I can at least listen to them, though. I like listening</p>
<p>there are things that I will never understand</p>
<p>and I wouldn't have it any other way</p>
<p><a href="index.html">back</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,14 @@
# there are things that I will never understand
I type this post while I sit idle in [resonite](https://resonite.com). I'm listening to someone--someone as a part of multiple--talk about their experience being a system
I don't understand how it works. I don't think I can ever understand it. I hear experiences, I hear explanations, I hear causes, and yet I will never understand. I don't have those experiences. it's something incredibly personal--experiencing your own mind--that nobody who is outside that bubble can ever understand. that includes me
it confuses me, yet it oddly soothes me too. their experiences are what make them unique as a form--unique in this world
the thoughts and feelings of others I can never truly know myself. I can at least listen to them, though. I like listening to people talk
there are things that I will never understand
and I wouldn't have it any other way
[back](index.html)

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>yosh's blog</title>
<link href="https://unix.dog/~yosh/blog"/>
<updated>2023-07-18T05:55:00Z</updated>
<author>
<name>yosh</name>
</author>
<id>urn:uuid:ab54972a-c095-4177-8a36-b77d48d86bec</id>
<entry>
<title>intimacy via jankiness</title>
<link rel="alternate" href="/~yosh/blog/2023-07-10_intimacy-via-jankiness.html"/>
<id>urn:uuid:366ccb73-5e9b-4c31-b8c2-2f93887f970b</id>
<updated>2023-07-10T19:30:00Z</updated>
<summary>a collection of thoughts on my weird relationship with liking things that might be "jank" to others</summary>
</entry>
<entry>
<title>discourse</title>
<link rel="alternate" href="/~yosh/blog/2023-07-18_discourse.html"/>
<id>urn:uuid:7051f435-4aae-4121-8774-be41dbce9b90</id>
<updated>2023-07-18T05:55:00Z</updated>
<summary>a little rant on me finding discourse tiring</summary>
</entry>
<entry>
<title>dreams of form</title>
<link rel="alternate" href="/~yosh/blog/2023-08-16_dreams-of-form.html"/>
<id>urn:uuid:212025c9-1f85-4b81-8553-d863ed798fcb</id>
<updated>2023-08-16T03:00:00Z</updated>
<summary>feathers feel nicer than hair</summary>
</entry>
<entry>
<title>moving away from github</title>
<link rel="alternate" href="/~yosh/blog/2023-09-06_moving-away-from-github.html"/>
<id>urn:uuid:f843b7c3-c27b-447b-bedc-2b1d4a2f7714</id>
<updated>2023-09-07T04:00:00Z</updated>
<summary>status update on my open source projects</summary>
</entry>
<entry>
<title>there are things that I will never understand</title>
<link rel="alternate" href="/~yosh/blog/2023-10-16_things-i-dont-understand.html"/>
<id>urn:uuid:935ddb27-4ca5-4840-bec9-934f39af198c</id>
<updated>2023-10-16T05:30:00Z</updated>
<summary>but I can listen</summary>
</entry>
</feed>

View File

@ -1,20 +1,24 @@
<?sh TITLE="blog | ~yosh" ./head.sh ?>
<?shp
TITLE="blog | ~yosh"
include header-unified.shp
?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="blog" ./titlebar.sh ?>
<h1>blog</h1>
<p>this will get updated very sporadically. I write only when really compelled to. as such, it might be good to follow this <a href="feed.atom">atom feed</a> with your favorite reader. I'm also updating it manually so bear with me</p>
<ul>
<li><time>2023-07-10</time> - <a href="2023-07-10_intimacy-via-jankiness.html">intimacy via jankiness</a></li>
<li><time>2023-07-18</time> - <a href="2023-07-18_discourse.html">discourse</a></li>
<li><time>2023-08-16</time> - <a href="2023-08-16_dreams-of-form.html">dreams of form</a></li>
<li><time>2023-09-06</time> - <a href="2023-09-06_moving-away-from-github.html">moving away from github</a></li>
<li><time>2023-10-16</time> - <a href="2023-10-16_things-i-dont-understand.html">there are things that I will never understand</a></li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>
<main>
<?shp gen_titlebar "blog" green ?>
<h1>blog</h1>
<p>here's posts I make. you can read them if you want. follow <a href="feed.atom">atom feed</a> if you really want to</p>
<ul>
<?shp
for md in *.md; do
# title is always on first line always separated by a space
read -r title < "$md"
title="${title#* }"
set_md_metadata "$md"
printf '<li><p><time>%s</time> - <a href="%s">%s</a></li>\n' \
"${POST_TIME%%T*}" "${md%.md}.html" "$title"
done
?>
</ul>
</main>

31
src/blog/mdmeta Normal file
View File

@ -0,0 +1,31 @@
2023-07-10_intimacy-via-jankiness.md
TITLE="intimacy via jankiness | ~yosh"
TB_TITLE="intimacy via jankiness"
POST_TIME=2023-07-10T19:30:00Z
FEED_UUID=urn:uuid:366ccb73-5e9b-4c31-b8c2-2f93887f970b
2023-07-18_discourse.md
TITLE="discourse | ~yosh"
TB_TITLE="discourse"
POST_TIME=2023-07-18T05:55:00Z
FEED_UUID=urn:uuid:7051f435-4aae-4121-8774-be41dbce9b90
2023-08-16_dreams-of-form.md
TITLE="dreams of form | ~yosh"
TB_TITLE="dreams of form"
POST_TIME=2023-08-16T03:00:00Z
FEED_UUID=urn:uuid:212025c9-1f85-4b81-8553-d863ed798fcb
2023-09-07_moving-away-from-github.md
TITLE="moving away from github | ~yosh"
TB_COLOR=white
TB_TITLE=github
POST_TIME=2023-09-07T04:00:00Z
FEED_UUID=urn:uuid:f843b7c3-c27b-447b-bedc-2b1d4a2f7714
2023-10-16_things-i-dont-understand.md
TITLE="things I don't understand | ~yosh"
TB_COLOR=white
TB_TITLE="the unknowable"
POST_TIME=2023-10-16T05:30:00Z
FEED_UUID=urn:uuid:935ddb27-4ca5-4840-bec9-934f39af198c

View File

@ -1,20 +0,0 @@
<?sh TITLE="cool stuff | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="cool stuff!!!" TB_COLOR="lblue" ./titlebar.sh ?>
<h1>cool stuff</h1>
<h2>scripts</h2>
<p>I really like shell scripting; I do it to a pretty high degree. here's some standalone scripts I like using</p>
<ul>
<li><a href="https://github.com/yoshiyoshyosh/flacconv">flacconv</a> - convert flac files to opus/mp3 (by me!!!)</li>
<li><a href="https://github.com/yoshiyoshyosh/backlightctl">backlightctl</a> - set backlight values on a laptop to workaround a frustrating issue (by me!!!)</li>
</ul>
<h2>fonts</h2>
<p>I like cool fonts. especially bitmap fonts. they are really cool</p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,13 +0,0 @@
<?sh ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="welcome!" ./titlebar.sh ?>
<h1>credits</h1>
<p>renard background image by <a href="https://www.furaffinity.net/user/squeedgemonster">squeedgemonster</a>
</main>
<?sh ./footer.sh ?>
</body>
</html>

2
src/credits.md Normal file
View File

@ -0,0 +1,2 @@
# credits
renard queenston background image by [squeedgemonster](https://www.furaffinity.net/user/squeedgemonster)

View File

@ -1,16 +1,14 @@
<?sh ./head.sh ?>
<?shp
include header-unified.shp
?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="welcome!" ./titlebar.sh ?>
<h1>welcome!</h1>
<p>yo what up. welcome to my unix.dog page<br>
take a look around!</p>
<p><img alt="under construction" src="/~yosh/img/construction.gif"><br>
very, very much under construction</p>
</main>
<?sh ./footer.sh ?>
</body>
</html>
<main>
<?shp gen_titlebar "welcome!" green ?>
<h1>welcome!</h1>
<p>yo what up. welcome to my unix.dog page<br>
take a look around!</p>
<p><img alt="under construction" src="/~yosh/img/construction.gif"><br>
very, very much under construction</p>
</main>
<?shp include footer.shp ?>

View File

@ -1,41 +1,40 @@
<?sh ./head.sh ?>
<?shp
TITLE="info | ~yosh"
include header-unified.shp
?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="welcome!" ./titlebar.sh ?>
<h1>myself</h1>
<p>I'm yosh. or yoshi. or yoshiyosh... or yoshiyoshiyosh...<br>
my names get taken a lot. wonder why.<br>
I like shell scripting, programming, unix, the look of old UI, archival, anthropomorphic animals, and music. a lot of music<br>
I'm also kinda a video game junkie. I enjoy doing hard stuff in video games I like. this is usually celeste<br>
<h2>site</h2>
<p>this is probably gonna be a more "social" site ??<br>
not sure how to really explain it, but here's where I'll probably put webrings n shit connecting to a bunch of other people in the same vein. who knows<br>
the actual design is more or less something that popped into my head while messing around with twm on my computer. I like the look of it<br>
in a perfect world this site would resemble those kinda "design group" abstract metalheart y2k websites that I adore, but that usually requires making actual images and not just funny html/css. I do not have that skill</p>
<h2>where do I exist?</h2>
I exist on...
<ul>
<li>Resonite: <strong>yosh</strong></li>
<li>irc: usually <strong>yosh</strong>, but sometimes that's taken, which will be indicated. I idle in a few servers, such as... (sorted by most to least generally active)</li>
<ul>
<li><a href="https://libera.chat/">libera.chat</a> (as <strong>yoshiyosh</strong>): ##furry, #voidlinux</li>
<li><a href="https://www.furnet.org/wiki/index.php/Servers">furnet</a>: #softpaws, #linux</li>
<li><a href="https://entropynet.net/">entropynet</a>: #lounge, #furry</li>
</ul>
<li><a href="https://www.youtube.com/channel/UCu1WEIXV1zsD0j474E9-Gxw">youtube</a></li>
<li><a href="https://git.unix.dog/yosh">unix.dog's git forge</a></li>
<li><a href="https://github.com/yoshiyoshyosh">github</a></li>
</ul>
you can contact me with any of these new-fangled fancy "buttons" the kids are using nowadays</p>
<ul class="gridlist displist">
<li><a href="mailto:yosh@unix.dog"><img src="/~yosh/img/buttons/email.gif" alt="e-mail"></a><br><a href="https://latacora.micro.blog/2019/07/16/the-pgp-problem.html">I don't use pgp</a></li>
<li><a rel="me" href="https://wetdry.world/@Yoshi"><img src="/~yosh/img/buttons/mastodon.gif" alt="fediverse"></a></li>
<li><a href="matrix:u/yosh:matrix.orangestar.dev"><img src="/~yosh/img/buttons/matrix.gif" alt="matrix"></a></li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>
<main>
<?shp gen_titlebar "information" lblue ?>
<h1>myself</h1>
<p>I'm yosh. or yoshi. or yoshiyosh... or yoshiyoshiyosh...<br>
my names get taken a lot. wonder why.<br>
I like shell scripting, programming, unix, the look of old UI, archival, anthropomorphic animals, and music. a lot of music<br>
I'm also kinda a video game junkie. I enjoy doing hard stuff in video games I like. this is usually celeste<p>
<h2>site</h2>
<p>this is probably gonna be a more "social" site ?? not sure how to really explain it, but here's where I'll probably put webrings n shit connecting to a bunch of other people in the same vein. who knows</p>
<p>the actual design is more or less something that popped into my head while messing around with twm on my computer. I like the look of it<br>
in a perfect world this site would resemble those kinda "design group" abstract metalheart y2k websites that I adore, but that usually requires making actual images and not just funny html/css. I do not have that skill</p>
<h2>where do I exist?</h2>
<p>I exist on...</p>
<ul>
<li><p>Resonite: <strong>yosh</strong></p></li>
<li><p>irc: usually <strong>yosh</strong>, but sometimes that's taken, which will be indicated. I idle in a few servers, such as... (sorted by most to least generally active)</p>
<ul>
<li><p><a href="https://libera.chat/">libera.chat</a> (as <strong>yoshiyosh</strong>): ##furry, #voidlinux</p></li>
<li><p><a href="https://entropynet.net/">entropynet</a>: #lounge, #furry</p></li>
<li><p><a href="https://www.esper.net/">espernet</a>: #furry</p></li>
</ul>
</li>
<li><p><a href="https://www.youtube.com/channel/UCu1WEIXV1zsD0j474E9-Gxw">youtube</a></p></li>
<li><p><a href="https://git.unix.dog/yosh">unix.dog's git forge</a></p></li>
<li><p><a href="https://github.com/yoshiyoshyosh">github</a> (not really using anymore)</p></li>
</ul>
<p>you can contact me with any of these new-fangled fancy "buttons" the kids are using nowadays</p>
<ul class="gridlist displist">
<li><p><a href="mailto:yosh@unix.dog"><img src="/~yosh/img/buttons/email.gif" alt="e-mail"></a><br><a href="https://latacora.micro.blog/2019/07/16/the-pgp-problem.html">I don't use pgp</a></p></li>
<li><p><a rel="me" href="https://wetdry.world/@Yoshi"><img src="/~yosh/img/buttons/mastodon.gif" alt="fediverse"></a></p></li>
<li><p><a href="matrix:u/yosh:matrix.orangestar.dev"><img src="/~yosh/img/buttons/matrix.gif" alt="matrix"></a></p></li>
</ul>
</main>
<?shp include footer.shp ?>

7
src/links/bookmarks.md Normal file
View File

@ -0,0 +1,7 @@
# bookmarks
a random collection of general links I like. no organization or whatever. if a certain category has enough links here then I'll probably separate it into its own page
## the links
- [~sven\_mascheck](https://www.in-ulm.de/~mascheck/) - shell stuff
- [geoguess.games](https://demo.geoguess.games/) - FOSS geoguessr
- [setup php-fpm](https://girders.org/php/2021/10/18/setup-php-fpm/)

View File

@ -0,0 +1,31 @@
# furry internet
a random collection of links to anyone interested in furry sites
## modern sites
### personal sites
- [valycenegative](https://www.valycenegative.it)
## older sites
### general communities
- [0wx.org](https://www.0wx.org/) - some provider of services that... hasn't been touched since 2011, it seems
- [IDS: the fursuit archive](http://fursuit.timduru.org/view/)
- [freepaws](https://www.freepaws.org/) - a site about... going barefoot. probably foot fetish related. probably uncomfortable for most
- [draconic.com](https://www.draconic.com/) - a site for dragon otherkin, also has a link area to many other dragon sites
- [the dragon's world](https://www.thedragonworld.com) - german dragon site (still updated!)
- [dragons united](https://dragonsunited.eu/index.php) - forum for dragons
- [tigerden internet services](http://www.tigerden.com/)
- [tigerden links to other furry sites](http://www.tigerden.com/Sites/furlinks.html) - most are dead, but it's still cool
- [fchan](http://fchan.us/) - furry anonymous imageboard (very much NSFW--they warn you beforehand)
- [furnation reborn](https://furnationreborn.com/furring.html) - an attempt at restoring the old furring webring
- [tigress](https://www.tigress.com/) - a webhome for many furry folk
- [australian furs](http://furry.org.au/)
### irc sites
- [foxie](https://foxie.qfn.bz) - #foxie on furnet
- [transfurs](http://furryhelix.co.uk/~tamber/rules/transfurs) - #transfurs on furnet
### personal sites
- [tomorrowlands](https://tomorrowlands.org/) - personal site of baxil & others
- [s-config](https://www.s-config.com/) - super old site that's still updated. guy who runs it gives off some weird vibes though

4
src/links/index.md Normal file
View File

@ -0,0 +1,4 @@
# link pools
- [bookmarks](./bookmarks.html) - an unorganized, random collection of links I like and you may like too
- [various learning topics](./learning.html) - a collection of resources for learning new topics, as I am frustrated at the lack of good routes to find good resources
- [furry internet stuff](./furry-internet.html)

29
src/links/learning.md Normal file
View File

@ -0,0 +1,29 @@
# various learning topics
I have found myself frustrated at how hard it is to find good resources for learning new things. I'm motivated to learn, but picking up conceptual ideas from surface-level youtube videos trying to tie shit together from very dense wikipedia articles and their references just doesn't cut it. here's a random assortment of websites, textbooks, videos, and whatever other resources I have either stashed for my own sake, have looked through enough to consider it satisfactory for describing something I already know, or whatever else I find that seems detailed enough about a topic. who knows
if this gets big enough, I'll make a table of contents or split stuff into separate pages. for now, just ctrl+f
## math
### calculus
- [Differential Equations and Linear Algebra](https://www.d.umn.edu/~mhampton/ODELA/), by Marshall Hampton.
### algebra
- [Differential Equations and Linear Algebra](https://www.d.umn.edu/~mhampton/ODELA/), by Marshall Hampton.
### geometry
- if you want your physics and basic math world to be shattered, try watching [a swift introduction to geometric algebra](https://www.youtube.com/watch?v=60z_hpEAtD8). if you want to learn more, try watching [this playlist](https://www.youtube.com/playlist?list=PLpzmRsG7u_gqaTo_vEseQ7U8KFvtiJY4K) on geometric algebra. it's not terribly important for my studies, so I haven't watched the playlist, but I might in the future
## computer science/engineering
### hardware
- [how does a microprocessor work?](https://fosstodon.org/@BrunoLevy01/110142330588647339) - a thread that leans into creating your own microprocessor and using RISC-V as an instruction set for it
### languages
- [php the right way](https://phptherightway.com) - some best practices for php in the modern day
### misc
- [xxiivv's computing section](https://wiki.xxiivv.com/site/computation.html) - there's some cool stuff and other resources here
- [serious cryptography](https://nostarch.com/seriouscrypto) - allegedly the best book for learning practical modern cryptography. I've been meaning to read it for a while to confirm this notion. its ISBN is `9781593278267`
## physical DIY
- [energy conservation for the home](https://www.builditsolar.com/Projects/Conservation/conservation.htm). this was brought to my attention by it recommending <cite>Insulate and Weatherize</cite> by Bruce Harley as being one of the most technically complete books on the topic. its ISBN is `9781621137030`

13
src/links/mdmeta Normal file
View File

@ -0,0 +1,13 @@
furry-internet.md
TB_TITLE="furry internet"
bookmarks.md
TB_TITLE="bookmarks"
TB_COLOR="white"
index.md
TB_TITLE="links"
learning.md
TB_TITLE="various learning topics"
TB_COLOR="lblue"

7
src/mdmeta Normal file
View File

@ -0,0 +1,7 @@
credits.md
TITLE="credits | ~yosh"
TB_TITLE="credits"
my-things.md
TITLE="my things | ~yosh"
TB_TITLE="my things"

16
src/my-things.md Normal file
View File

@ -0,0 +1,16 @@
# my things
here's just a collection of things that I have made and/or do that I feel is cool enough to post here
## creative works
### game related
- [celeste avali mod](https://gamebanana.com/mods/375726) - a mod for the video game [celeste](https://www.celestegame.com/) where you can play as an avali
## computer stuff
### shell scripts
- [flacconv](https://git.unix.dog/yosh/flacconv) - a very featureful shell script to recursively convert flac files to opus or mp3, including parallelism and many other goodies for options
- [mimix](https://git.unix.dog/yosh/mimix) - a posix shell rewrite of [mimi](https://github.com/BachoSeven/mimi), which is a replacement for xdg-open that simplifies configuration a lot
- [agetar](https://git.unix.dog/yosh/agetar) - a dead-simple wrapper around `tar` and `age` to encrypt files collectively in a tar archive
- [misc-scripts](https://git.unix.dog/yosh/misc-scripts) - a *personal* collection of random scripts that help me do things around my computer
### misc
- [modular-awesomewm-config](https://git.unix.dog/yosh/modular-awesomewm-config) - an opininated split of the default config of [awesomewm](https://awesomewm.org/), allowing for easier configuration than a monofile (todo: rework it so you can "compile" it into a monofile for relaxed memory usage)

View File

@ -1,19 +0,0 @@
<?sh TITLE="bookmarks | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="bookmarks" ./titlebar.sh ?>
<h1>bookmarks</h1>
<p>a random collection of general links I like. no organization or whatever</p>
<h2>the links</h2>
<ul>
<li><a href="https://www.in-ulm.de/~mascheck/">~sven_mascheck</a> - shell stuff</li>
<li><a href="https://demo.geoguess.games/">goeguess.games</a> - FOSS geoguessr</li>
<li><a href="https://girders.org/php/2021/10/18/setup-php-fpm/">setup php-fpm</a></li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,21 +0,0 @@
<?sh TITLE="darktable stuff | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="darktable stuff" TB_COLOR="lblue" ./titlebar.sh ?>
<h1>darktable stuff</h1>
<p>here's some random darktable things I have made note of and want written down</p>
<h2>haze removal</h2>
<p>the haze removal module rules... but it's also super finnicky. many times when I've used it, the exported image does not match the darktable preview, even when at 100%. after some reading and trial-and-error, I've made a few observations:</p>
<ul>
<li>make sure haze removal is before any crop module, since that seems to affect it</li>
<li>the high quality resampling option for exports sometimes causes change. if colors don't come out right, try toggling it on/off</li>
<li>the type of scale used when exporting seems to affect it. try "pixels" at 0 0 instead of "scale" at 1... or vice versa</li>
</ul>
<p><a href="https://github.com/darktable-org/darktable/issues/10283">further reading</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,11 @@
# darktable stuff
here's some random darktable things I have made note of and want written down
## haze removal
the haze removal module rules... but it's also super finnicky. many times when I've used it, the exported image does not match the darktable preview, even when at 100%. after some reading and trial-and-error, I've made a few observations:
- make sure haze removal is before any crop module, since that seems to affect it
- the high quality resampling option for exports sometimes causes change. if colors don't come out right, try toggling it on/off
- the type of scale used when exporting seems to affect it. try "pixels" at 0 0 instead of "scale" at 1... or vice versa
[further reading](https://github.com/darktable-org/darktable/issues/10283)

View File

@ -1,44 +0,0 @@
<?sh TITLE="furry internet | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="furry internet" TB_COLOR="pink" ./titlebar.sh ?>
<h1>furry internet</h1>
<p>a random collection of links to anyone interested in furry sites</p>
<h2>modern sites</h2>
<h3>personal sites</h3>
<ul>
<li><a href="https://www.valycenegative.it/?Section=Main%20Page&Page=0">valycenegative</a></li>
</ul>
<h2>older sites</h2>
<h3>general communities</h3>
<ul>
<li><a href="https://www.0wx.org/">0wx.org</a> - some provider of services that... hasn't been touched since 2011, it seems</li>
<li><a href="http://fursuit.timduru.org/view/">IDS: the fursuit archive</a></li>
<li><a href="https://www.freepaws.org/">freepaws</a> - a site about... going barefoot. likely uncomfortable for most (including me a bit)</li>
<li><a href="https://www.draconic.com/">draconic.com</a> - a site for dragon otherkin, also has a link area to many other dragon sites</li>
<li><a href="https://www.thedragonworld.com">the dragon's world</a> - german dragon site (still updated!)</li>
<li><a href="https://dragonsunited.eu/index.php">dragons united</a> - forum for dragons</li>
<li><a href="http://www.tigerden.com/">tigerden internet services</a></li>
<li><a href="http://www.tigerden.com/Sites/furlinks.html">tigerden links to other furry sites</a> - most are dead, but it's still cool</li>
<li><a href="http://fchan.us/">fchan</a> - furry anonymous imageboard (very much NSFW--they warn you beforehand)</li>
<li><a href="https://furnationreborn.com/furring.html">furnation reborn</a> - an attempt at restoring the old furring webring</li>
<li><a href="https://www.tigress.com/">tigress</a> - a webhome for many furry folk</li>
<li><a href="http://furry.org.au/">australian furs</a></li>
</ul>
<h3>irc sites</h3>
<ul>
<li><a href="https://foxie.qfn.bz">foxie</a> - #foxie on furnet</li>
<li><a href="http://furryhelix.co.uk/~tamber/rules/transfurs">transfers</a> - #transfers on furnet</li>
</ul>
<h3>personal sites</h3>
<ul>
<li><a href="https://tomorrowlands.org/">tomorrowlands</a> - personal site of baxil &amp; others</li>
<li><a href="https://www.s-config.com/">s-config</a> - super old site that's still updated. guy who runs it gives off some weird vibes though</li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,16 +0,0 @@
<?sh TITLE="furry weekend atlanta | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="furry weekend atlanta" TB_COLOR="pink" ./titlebar.sh ?>
<h1>furry weekend atlanta</h1>
<h3>microwaves</h3>
<p>if you don't want cold leftovers, microwaves are at the water fountains next to the women's restroom on the atrium level in the main hotel. that is, if they're still gonna be using that hotel post-2023</p>
<h3>non-good dragon clearance</h3>
<p>the bad dragon booth will probably have a clearance bin where a bunch of merch n shit are all like $5 (at least, this was there in 2023). I missed out on this in 2023 and am still kicking myself about it</p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,12 @@
# furry weekend atlanta
here's some things that I wish I knew during my visit to furry weekend atlanta
## utility
### microwaves
if you don't want cold leftovers, microwaves are at the water fountains next to the women's restroom on the atrium level in the main hotel. that is, if they're still gonna be using that hotel post-2023
## sales
### non-good dragon clearance
the bad dragon booth will probably have a clearance bin where a bunch of merch n shit are all like $5 (at least, this was there in 2023). I missed out on this in 2023 and am still kicking myself about it

View File

@ -1,17 +0,0 @@
<?sh TITLE="fursuit making | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="fursuit making!!" ./titlebar.sh ?>
<h1>fursuit making</h1>
<p>I want to ~eventually~ make my own fursuit. I also know there's 30 million tiny little details in doing so. here's some little "life hacks" I have gathered from people's random twitter posts about fursuit making</p>
<h2>non-electronic</h2>
<ul>
<li><a href="https://twitter.com/ApricityHats/status/1673413767885910023">tiny silicone spatulas</a> made for kitchen use spread hot glue very well (reportedly better than popsicle sticks!). <a href="https://www.amazon.com/dp/B08SL4N33F">amazon link</a></li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,5 @@
# fursuit making
I want to *eventually* make my own fursuit. I also know there's 30 million tiny little details in doing so. here's some little "life hacks" I have gathered from people's random twitter posts about fursuit making
## non-electronic
- [tiny silicone spatulas](https://twitter.com/ApricityHats/status/1673413767885910023) made for kitchen use spread hot glue very well (reportedly better than popsicle sticks!). [amazon link](https://www.amazon.com/dp/B08SL4N33F)

View File

@ -1,34 +0,0 @@
<?sh TITLE="random information | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="random information" ./titlebar.sh ?>
<h1>random information</h1>
<p>here's a bunch of random information about various things I have collected across the years. I made this page to consolidate all the random useful stuff I scattered about bookmarks, group chats, etc. in my times on the internet, as well as documentation that I've wrote myself</p>
<h2>big writeups</h2>
<p>some big writeups by me or other people that might be useful for people</p>
<ul>
<li><a href="./voidlinux/">building a void linux desktop experience from the base</a> - a comprehensive guide to setting up an easily-maintainable, extensible, and nice desktop experience on Void Linux from the very base image. more of an extension of the void handbooks than anything else (by me!!!!)</li>
<li><a href="./ytdl.html">downloading from youtube for fun, archival, and maybe profit</a> - an introductory guide for using <code>yt-dlp</code> to download youtube videos. link to to anyone who wants to download from youtube!</li>
</ul>
<h2>small bits of info and things</h2>
<ul>
<li><a href="./darktable-shenanigans.html">darktable: haze removal and other shenanigans</a></li>
<li><a href="./printers.html">printers.</a></li>
<li><a href="./furry-weekend-atlanta.html">furry weekend atlanta</a></li>
<li><a href="./fursuit-making.html">fursuit making</a></li>
<li><a href="./posix-shell-tips.html">posix shell tips and tricks</a></li>
<li><a href="./resonite-desktop-workflow.html">resonite desktop workflow</a></li>
</ul>
<h2>link pools</h2>
<ul>
<li><a href="./bookmarks.html">bookmarks</a> - an unorganized, random collection of links I like and you may like too</li>
<li><a href="./learning.html">various learning topics</a> - a collection of resources for learning new topics, as I am frustrated at the lack of good routes to find good resources</li>
<li><a href="./furry-internet.html">furry internet stuff</a></li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>

16
src/random-info/index.md Normal file
View File

@ -0,0 +1,16 @@
# random information
here's a bunch of random information about various things I have collected across the years. I made this page to consolidate all the random stuff I scattered about bookmarks, group chats, etc. in my times on the internet, as well as documentation that I've wrote myself
## big writeups
some big writeups by me or other people that might be useful for people
- [building a void linux desktop experience from the base](./voidlinux/) - a comprehensive guide to setting up an easily-maintainable, extensible, and nice desktop experience on Void Linux from the very base image. more of an extension of the void handbooks than anything else
- [downloading from youtube for fun, archival, and maybe profit](./ytdl.html) - an introductory guide for using `yt-dlp` to download youtube videos. link to to anyone who wants to download from youtube!
- [resonite desktop workflow](./resonite-desktop-workflow.html) - a description of the desktop workflow in [resonite](https://resonite.com)
## small bits of info about specific topics
- [darktable: haze removal and other shenanigans](./darktable-shenanigans.html)
- [printers.](./printers.html)
- [furry weekend atlanta](./furry-weekend-atlanta.html)
- [fursuit making](./fursuit-making.html)
- [posix shell tips and tricks](./posix-shell-tips.html)

View File

@ -1,36 +0,0 @@
<?sh TITLE="various resources | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="various learning topics" TB_COLOR="pink" ./titlebar.sh ?>
<h1>various learning topics</h1>
<p>I have found myself frustrated at how hard it is to find good resources for learning new things. I'm motivated to learn, but picking up conceptual ideas from surface-level youtube videos trying to tie shit together from very dense wikipedia articles and their references just doesn't cut it. here's a random assortment of websites, textbooks, videos, and whatever other resources I have either stashed for my own sake, have looked through enough to consider it satisfactory for describing something I already know, or whatever else I find that seems detailed enough about a topic. who knows</p>
<p>if this gets big enough, I'll make a table of contents</p>
<h2>math</h2>
<h3>calculus</h3>
<ul>
<li><a href="https://www.d.umn.edu/~mhampton/ODELA/">Differential Equations and Linear Algebra</a>, by Marshall Hampton.</li>
</ul>
<h3>algebra</h3>
<ul>
<li><a href="https://www.d.umn.edu/~mhampton/ODELA/">Differential Equations and Linear Algebra</a>, by Marshall Hampton.</li>
</ul>
<h3>geometry</h3>
<ul>
<li>if you want your physics and basic math world to be shattered, try watching <a href="https://www.youtube.com/watch?v=60z_hpEAtD8">a swift introduction to geometric algebra</a>. if you want to learn more, try watching <a href="https://www.youtube.com/playlist?list=PLpzmRsG7u_gqaTo_vEseQ7U8KFvtiJY4K">this playlist</a> on geometric algebra. it's not terribly important for my studies, so I haven't watched the playlist, but I might in the future</li>
</ul>
<h2>computing</h2>
<ul>
<li><a href="https://fosstodon.org/@BrunoLevy01/110142330588647339">how does a microprocessor work?</a> - a thread that leans into creating your own microprocessor and using RISC-V as an instruction set for it</li>
<li><a href="https://wiki.xxiivv.com/site/computation.html">xxiivv's computing section</a> - there's some cool stuff and other resources here</li>
<li><a href="https://phptherightway.com">php the right way</a> - some best practices for php in the modern day</li>
</ul>
<h2>physical DIY</h2>
<ul>
<li><a href="https://www.builditsolar.com/Projects/Conservation/conservation.htm">energy conservation for the home</a>. this was brought to my attention by it recommending <cite>Insulate and Weatherize</cite> by Bruce Harley as being one of the most technically complete books on the topic. its ISBN is <code>9781621137030</code>, and I'm sure you'll know where to find it :)</li>
</main>
<?sh ./footer.sh ?>
</body>
</html>

36
src/random-info/mdmeta Normal file
View File

@ -0,0 +1,36 @@
index.md
TITLE="documentation and information | ~yosh"
TB_TITLE="information window"
TB_COLOR="lblue"
darktable-shenanigans.md
TITLE="darktable stuff | ~yosh"
TB_TITLE="darktable information"
furry-weekend-atlanta.md
TITLE="furry weekend atlanta | ~yosh"
TB_TITLE="furry weekend atlanta"
TB_COLOR=purple
fursuit-making.md
TITLE="fursuit making | ~yosh"
TB_TITLE="fursuit making!!"
posix-shell-tips.md
TITLE="posix shell tips | ~yosh"
TB_TITLE="posix shell"
printers.md
TITLE="printers | ~yosh"
TB_TITLE="printers."
TB_COLOR=lblue
resonite-desktop-workflow.md
TITLE="resonite desktop workflow | ~yosh"
TB_TITLE="resonite"
TB_COLOR=purple
ytdl.md
TITLE="downloading from youtube | ~yosh"
TB_TITLE="yt-dlp"
TB_COLOR=pink

View File

@ -1,32 +0,0 @@
<?sh TITLE="posix shell tips | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="posix shell!!" ./titlebar.sh ?>
<h1>posix shell tips and tricks</h1>
<p>there's some very unknown quirky things that you can do with pure posix shell. this will focus on obscure stuff that I've rarely seen documented or talked about elsewhere. if you want some more posix shell tricks, check out the <a href="https://github.com/dylanaraps/pure-sh-bible">pure sh bible</a> by dylan araps</p>
<h3>BASH_REMATCH</h3>
<p><a href="https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-_005b_005b">in bash</a>, <code>BASH_REMATCH</code> is an array that corresponds to the groups that are captured in the last used <code>=~</code> command. this can be emulated in posix shell by a little-known command called <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html">expr</a>. <strong>for almost all use cases, expr is superseded by <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html">test</a> and <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04">arithmetic expansion</a>, which are shell builtins, and you shouldn't use expr</strong>, <em>but</em> one singular operand in <code>expr</code> is unique to it: <code>:</code>. take a look:</p>
<code class="codeblock">
<pre>
#/bin/sh
str="https://example.com/post/120937"
if rematch="$(expr -- "$str" : 'https\{0,1\}://\([^/]\{1,\}\)')"; then
echo "$rematch"
fi
</pre>
</code>
<p>this script will output <code>example.com</code>. if <code>str</code> didn't match the pattern, then <code>expr</code> would return 1, and thus the <code>if</code> statement would not run. this allows one to both test if a string matches a regex pattern and to return a part of the string in one call. there are some caveats to doing this, though. the first is that you must use <a href="https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions">basic regular expressions</a>; the second is that the pattern is by default anchored to the start of the line, which can be remedied by putting <code>.*</code> at the beginning; and the third is that only the first capturing group will be returned, even if you have more than one</p>
<p>if you don't need the rematch at all, then <a href="https://stackoverflow.com/questions/21115121/how-to-test-if-string-matches-a-regex-in-posix-shell-not-bash">here are other ways of matching a string against a pattern, regex or not</a>, and they should usually be preferred over <code>expr</code>. <code>expr</code> just has one singular very niche use case that shines when its time is right, such as <a href="https://git.unix.dog/yosh/mimix/src/branch/main/xdg-open#L118">how I use it in mimix</a></p>
<h3>eval</h3>
<p>there's <a href="https://mywiki.wooledge.org/BashFAQ/048">a lot of scare about <code>eval</code></a>, and for very good reason! it's very powerful yet very dangerous when used in the wrong context</p>
<p>and that's the thing I want to focus on: <strong>in the wrong context</strong>. I usually find <code>eval</code> being referred to as "parsing your code twice", which I think is a bit of a misnomer. for me personally, the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_19">posix definition of <code>eval</code></a> makes it easier to understand. once your outside script parses all the expansions, <code>eval</code> will use the arguments generated from the expansion as shell code, effectively being the same thing as <code>sh -c</code>.</p>
<p>this leads in to how I personally treat <code>eval</code>, and how I feel others should treat <code>eval</code>: <em>if you do not want to give the user of a script a shell, do not pass unfiltered data into <code>eval</code></em>.</p>
<p>if the users of your script are already expected to have a shell, and if the script does not run with elevated privileges, then <code>eval</code> poses no more of a security threat than whatever the user can do in a normal shell they can access, though it can easily still cause headaches to use</p>
<p><code>eval</code> can also be very useful when building command line arguments from user input, so long as you take great care to escape said input. in posix shell, this is as simple as doing <code>escaped_input="'$(printf '%s' "$input" | sed "s/'/'\\\\''/g")'"</code>. this wraps the input in single quotes, where a shell never expands any special characters within except <code>'</code>, which are also dealt with by replacing them with <code>'\''</code>, as one would in a normal shell. I do this in <a href="https://git.unix.dog/yosh/agetar/src/branch/master/agetar#L64">agetar</a></p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,28 @@
# posix shell tips and tricks
there's some very unknown quirky things that you can do with pure posix shell. this will focus on obscure stuff that I've rarely seen documented or talked about elsewhere. if you want some more posix shell tricks, check out the [pure sh bible](https://github.com/dylanaraps/pure-sh-bible) by dylan araps
## BASH\_REMATCH
[in bash](https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-_005b_005b), `BASH_REMATCH` is an array that corresponds to the groups that are captured in the last used `=~` command. this can be emulated in posix shell by a little-known command called [expr](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html). **for almost all use cases, expr is superseded by [test](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html) and [arithmetic expansion](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04), which are shell builtins, and you shouldn't use** `expr`, *but* one singular operand in `expr` is unique to it: `:`. take a look:
```
#/bin/sh
str="https://example.com/post/120937"
if rematch="$(expr -- "$str" : 'https\{0,1\}://\([^/]\{1,\}\)')"; then
echo "$rematch"
fi
```
this script will output `example.com`. if `str` didn't match the pattern, then `expr` would return 1, and thus the `if` statement would not run. this allows one to both test if a string matches a regex pattern and to return a part of the string in one call. there are some caveats to doing this, though. the first is that you must use [basic regular expressions](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions); the second is that the pattern is by default anchored to the start of the line, which can be remedied by putting `.*` at the beginning; and the third is that only the first capturing group will be returned, even if you have more than one
if you don't need the rematch at all, then [here are other ways of matching a string against a pattern, regex or not](https://stackoverflow.com/questions/21115121/how-to-test-if-string-matches-a-regex-in-posix-shell-not-bash), and they should usually be preferred over `expr`. `expr` just has one singular very niche use case that shines when its time is right, such as [how I use it in mimix](https://git.unix.dog/yosh/mimix/src/branch/main/xdg-open#L118)
## eval
there's [a lot of scare about `eval`](https://mywiki.wooledge.org/BashFAQ/048), and for very good reason! it's very powerful yet very dangerous when used in the wrong context
and that's the thing I want to focus on: **in the wrong context**. I usually find `eval` being referred to as "parsing your code twice", which I think is a bit of a misnomer. for me personally, the [posix definition of `eval`](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_19) makes it easier to understand. once your outside script parses all the expansions, `eval` will use the arguments generated from the expansion as shell code, effectively being the same thing as `sh -c`.
this leads in to how I personally treat `eval`, and how I feel others should treat `eval`: *if you do not want to give the user of a script a shell, do not pass unfiltered data into `eval`*.
if the users of your script are already expected to have a shell, and if the script does not run with elevated privileges, then `eval` poses no more of a security threat than whatever the user can do in a normal shell they can access, though it can easily still cause headaches to use
`eval` can also be very useful when building command line arguments from user input, so long as you take great care to escape said input. in posix shell, this is as simple as doing `escaped_input="'$(printf '%s' "$input" | sed "s/'/'\\\\''/g")'"`. this wraps the input in single quotes, where a shell never expands any special characters within except `'`, which are also dealt with by replacing them with `'\''`, as one would in a normal shell. I do this in [agetar](https://git.unix.dog/yosh/agetar/src/branch/master/agetar#L64)

View File

@ -1,20 +0,0 @@
<?sh TITLE="printers | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="printers." TB_COLOR="lblue" ./titlebar.sh ?>
<h1>printers</h1>
<p>we all know printers suck. ugh. here's some collaged info about them:</p>
<h2>hp printers</h2>
<h3><a href="https://news.ycombinator.com/item?id=36104300">bypassing cartridge "security"</a></h3>
<blockquote cite="https://news.ycombinator.com/item?id=36104300">
<p>Put a resistor, about 1kohm, in the power line to the security chip on the cartridge.</p>
<p>Now, whenever the printer tries to read data from the chip, it works. Whenever it tries to record data to the chip (for example, marking the cartridge as empty), that uses more power, and the memory chip doesn't respond.</p>
<p>Amazingly, the whole setup just works and prints forever, saying the cartridges are always full...</p>
</blockquote>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,12 @@
# printers
we all know printers suck. ugh. here's some collaged info about them:
## hp printers
### [bypassing cartridge "security"](https://news.ycombinator.com/item?id=36104300)
<blockquote cite="https://news.ycombinator.com/item?id=36104300">
<p>Put a resistor, about 1kohm, in the power line to the security chip on the cartridge.</p>
<p>Now, whenever the printer tries to read data from the chip, it works. Whenever it tries to record data to the chip (for example, marking the cartridge as empty), that uses more power, and the memory chip doesn't respond.</p>
<p>Amazingly, the whole setup just works and prints forever, saying the cartridges are always full...</p>
</blockquote>

View File

@ -1,50 +0,0 @@
<?sh TITLE="resonite desktop workflow | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="resonite desktop workflow" ./titlebar.sh ?>
<h1>resonite desktop workflow</h1>
<p>this page is meant as a text-based version of a <a href="https://www.youtube.com/watch?v=Erg8EbHHjoY">video</a> I made about my desktop workflow in resonite, because text is king</p>
<p>some of the sections will be replaced with links to the eventual resonite wiki when it releases and has applicable up-to-date information. for now, you can probably look at the <a href="https://wiki.neosvr.com/Basic_Controls#New_desktop_mode_controls">neos page</a> and have these controls carry over</p>
<h2>tools</h2>
<p>the cool thing about desktop mode is that your tools are bound to your number keys on your keyboard. here they are:</p>
<ul>
<li>1 - dequip</li>
<li>2 - dev tip</li>
<li>3 - protoflux tip</li>
<li>4 - material tip</li>
<li>5 - shape tip</li>
<li>6 - light tip</li>
<li>7 - grabbable setter tip</li>
<li>8 - character collider setter tip</li>
<li>9 - microphone</li>
<li>0 - glue tip</li>
</ul>
<h2>ui aligning</h2>
<p>if you control-click on ui elements, which will usually be inspectors or protoflux nodes when working, your view will snap to parallel the ui, which means you don't have to move your entire view when editing ui elements and shit, which is really nice. it's even nicer that there's some controls you can use while in this mode:</p>
<ul>
<li>ctrl + right click - so long as you keep ctrl held, you can drag your mouse and it moves your view in the direction your drag</li>
<li>ctrl + scroll wheel - zoom in or out your view while keeping "aligned" with the same ui element you initially clicked on</li>
<li>ctrl + left click (not on another ui element) - exit ui focus mode</li>
</ul>
<h2>"layers" with protoflux</h2>
<p>another neat thing in ui align mode is when you grab an item and scroll to move its forward/back relative to you, it moves it only relative to your view, which can make for a pseudo-layering system that keeps a protoflux workflow 3d without needing to be in vr, without having spaghetti code everywhere, and without a tool like redprint! how nice!</p>
<p>when I use protoflux, I usually use this sort of layering system to put stuff that isn't part of the "main flow" on the back burner. stuff like constant inputs to a node is a good example of this</p>
<h2>some camera controls</h2>
<p>you can press f5 to go into a "third person" view much akin to like, minecraft. in this view, your camera is pretty freedom when not holding an object and locked when you are holding an object (or if your laser goes over something? unsure exactly). this makes an easy way to see if there's something in the front of your avatar that needs to be looked at without having to get out a mirror</p>
<p>similar to f5 is the completely freeform camera keybind, f6. while in this mode, your character's rotation and position is locked (mostly, more on that later) and you get a freeform camera to mess around with. here's some keybinds in this mode:</p>
<ul>
<li>ctrl + right click - so long as you keep ctrl held, you can use wasd, c, and space to move the freeform camera how you'd expect</li>
<li>left click - holding down left click allows you, along with your camera, to move your character while keeping your view locked. additionally, it allows your avatar to "look" at whereever you click, thus allowing you to rotate yourself</li>
</ul>
<h2>misc useful keybinds</h2>
<ul>
<li>pgUp / pgDown - change locomotion</li>
<li>z - go much slower</li>
</ul>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,43 @@
# resonite desktop workflow
this page is meant as a text-based version of a [video](https://www.youtube.com/watch?v=Erg8EbHHjoY) I made about my desktop workflow in resonite, because text is king
some of the sections will be replaced with links to the eventual resonite wiki when it releases and has applicable up-to-date information. for now, you can probably look at the [neos page](https://wiki.neosvr.com/Basic_Controls#New_desktop_mode_controls) and have these controls carry over
## tools
the cool thing about desktop mode is that your tools are bound to your number keys on your keyboard. here they are:
- 1 - dequip
- 2 - dev tip
- 3 - protoflux tip
- 4 - material tip
- 5 - shape tip
- 6 - light tip
- 7 - grabbable setter tip
- 8 - character collider setter tip
- 9 - microphone
- 0 - glue tip
## ui aligning
if you control-click on ui elements, which will usually be inspectors or protoflux nodes when working, your view will snap to parallel the ui, which means you don't have to move your entire view when editing ui elements and shit, which is really nice. it's even nicer that there's some controls you can use while in this mode:
- ctrl + right click - so long as you keep ctrl held, you can drag your mouse and it moves your view in the direction your drag
- ctrl + scroll wheel - zoom in or out your view while keeping "aligned" with the same ui element you initially clicked on
- ctrl + left click (not on another ui element) - exit ui focus mode
## "layers" with protoflux"
another neat thing in ui align mode is when you grab an item and scroll to move its forward/back relative to you, it moves it only relative to your view, which can make for a pseudo-layering system that keeps a protoflux workflow 3d without needing to be in vr, without having spaghetti code everywhere, and without a tool like redprint! how nice!
when I use protoflux, I usually use this sort of layering system to put stuff that isn't part of the "main flow" on the back burner. stuff like constant inputs to a node is a good example of this
## some camera controls
you can press f5 to go into a "third person" view much akin to like, minecraft. in this view, your camera is pretty freedom when not holding an object and locked when you are holding an object (or if your laser goes over something? unsure exactly). this makes an easy way to see if there's something in the front of your avatar that needs to be looked at without having to get out a mirror
similar to f5 is the completely freeform camera keybind, f6. while in this mode, your character's rotation and position is locked (mostly, more on that later) and you get a freeform camera to mess around with. here's some keybinds in this mode:
- ctrl + right click - so long as you keep ctrl held, you can use wasd, c, and space to move the freeform camera how you'd expect
- left click - holding down left click allows you, along with your camera, to move your character while keeping your view locked. additionally, it allows your avatar to "look" at whereever you click, thus allowing you to rotate yourself
## misc useful keybinds
- pgUp / pgDown - change locomotion
- z - go much slower

View File

@ -1,18 +0,0 @@
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="void linux" ./titlebar.sh ?>
<h1>void linux</h1>
<p><a href="https://voidlinux.org/">void linux</a> is probably my favorite linux distribution. I say probably because it's the only one I have ever used outside of a VM for anything significant. who knows. nonetheless, the point is I like it. I also enjoy to do things ""properly"", and by that I mean set stuff up such that things are stable, don't look "hacky" unless required, and can easily be debugged and extended</p>
<p>recently, I wanted to setup void linux from scratch on my laptop. while my desktop I set up from the base as well, I was kinda figuring things out as I went and while I still ended up with a reasonably well-developed machine, I thought I could do better. then, I realized I should probably document this, as while I was guiding a friend on installing and setting up void on an old laptop (hi hex!), I found myself being very torn on what I should include, how I should explain stuff, and all the like, and I don't think I did a very good job of explaining my ideas all in all</p>
<p>this page will have a general focus on the idea of "software minimalism" and/or "connect a bunch of software that do one thing well", but I think that line of thought has been coined and used by overly pretentious people to justify using obtuse stuff, so I must stress that everything here is how I like to do things, and nothing is definitive. I generally do stuff this way to pick and choose what I like, but I do not follow it tooth and nail. I just can't speak for anything I haven't used</p>
<p>do not think of this as a replacement for <a href="https://docs.voidlinux.org/">the void linux manual</a>. the manual is an incredibly helpful and easy-to-navigate piece of documentation that cannot be replaced. think of it more as an extension of it going more into detail for specific software and my opinionated setup. I guess kind of like the arch wiki? I don't know.</p>
<p>without further ado, here's the guide! :D</p>
<a href="installation.html">installation --&gt;</a>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,12 @@
# void linux
[void linux](https://voidlinux.org/) is probably my favorite linux distribution. I say probably because it's the only one I have ever used outside of a VM for anything significant. who knows. nonetheless, the point is I like it. I also enjoy to do things ""properly"", and by that I mean set stuff up such that things are stable, don't look "hacky" unless required, and can easily be debugged and extended
recently, I wanted to setup void linux from scratch on my laptop. while my desktop I set up from the base as well, I was kinda figuring things out as I went and while I still ended up with a reasonably well-developed machine, I thought I could do better. then, I realized I should probably document this, as while I was guiding a friend on installing and setting up void on an old laptop (hi hex!), I found myself being very torn on what I should include, how I should explain stuff, and all the like, and I don't think I did a very good job of explaining my ideas all in all
this page will have a general focus on the idea of "software minimalism" and/or "connect a bunch of software that do one thing well", but I think that line of thought has been coined and used by overly pretentious people to justify using obtuse stuff, so I must stress that everything here is how I like to do things, and nothing is definitive. I generally do stuff this way to pick and choose what I like, but I do not follow it tooth and nail. I just can't speak for anything I haven't used
do not think of this as a replacement for [the void linux manual](https://docs.voidlinux.org/). the manual is an incredibly helpful and easy-to-navigate piece of documentation that cannot be replaced. think of it more as an extension of it going more into detail for specific software and my opinionated setup. I guess kind of like the arch wiki? I don't know.
without further ado, here's the guide! :D
[installation -->](installation.html)

View File

@ -1,130 +0,0 @@
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="void linux | installation" ./titlebar.sh ?>
<h1>void linux - installation</h1>
<p>I won't restate the already-well-documented-elsewhere. if you want a basic system steup, no fancy efistub or FDE or whatnot, the <a href="https://docs.voidlinux.org/installation/live-images/guide.html">manual</a> and installer script are both very powerful and go a very long way</p>
<h2 id="fde">full disk encryption + efistub</h2>
<p>efistub essentially just means that the kernel image becomes its own bootable device, removing the need for something like GRUB or other intermediary bootloaders. this, of course, is only supported by systems that can boot uefi, which you can check by going into your BIOS or running <code>efibootmgr</code> in a live image. refer to your own computer documentation if needed; everything is different.</p>
<p>full disk encryption means that most of your disk (except the boot partition except in certain circumstances) is encrypted and as such can't be accessed to read data without a key or passphrase. the void manual has <a href="https://docs.voidlinux.org/installation/guides/fde.html">section on installing fde with GRUB</a>, and this allows for an encrypted boot partition. however, the manual does not cover efistub at all, let alone with encryption, so this will serve as a guide. I figured this out from other blog posts for different systems and whatnot, but changed some stuff to fit my liking</p>
<p>you can probably remove all the cryptsetup-related stuff and have a perfectly fine and working efistub system. I am too lazy to make a completely separate guide for this right at this moment, e-mail or DM me if you want me to guide you through it and if I get even one person doing this I'll make a separate guide</p>
<h3>setup</h3>
<p>boot a live image and login to <code>root:voidlinux</code>. run <code>void-installer</code> to setup your keymap, internet connection, and (optionally) your user (this is just the simplest way to do this initial setup)</p>
<p>check which drive you want to install void on with <code>lsblk</code> and run <code>cfdisk -z /dev/&lt;device&gt;</code>. select <code>gpt</code> as the label type. make a partition at least 128M in size (I HIGHLY recommend 256M though) and set its type to <code>EFI System</code>. make another partition with the remaining space of type <code>Linux Filesystem</code></p>
<p>now set up the actual encrypted partition with an lvm volume. in this example, <code>/dev/nvme0n1</code> is the disk, <code>p1</code> is the boot partition, and <code>p2</code> is the other partition</p>
<p>also, a note for this entire guide: words following a <code>#</code> way off to the right are comments, and should not be entered</p>
<code class="codeblock">
<pre>
# mkfs.vfat /dev/nvme0n1p1 # because this is an efi system
# cryptsetup luksFormat --type luks2 --label luks /dev/nvme0n1p2
Enter passphrase and all that jazz...
# cryptsetup luksOpen /dev/nvme0n1p2 cryptroot
Enter passphrase for /dev/nvme0n1p2:
# vgcreate voidvm /dev/mapper/cryptroot
Volume group "voidvm" successfully created</pre>
</code>
<p>now we need to make our actual filesystems. I like having a separate /home partition because... I don't know really. I don't "distrohop", but I guess it's better for backups and migration. 16G as root should be more than enough enough for most systems, but you might want more. refer to the manual for how much swap you should put in. the cool thing about using lvm is that these can easily be resized later in case you need to change something</p>
<code class="codeblock">
<pre>
# lvcreate --name root -L 16G voidvm
Logical volume "root" created.
# lvcreate --name swap -L 8G voidvm
Logical volume "swap" created.
# lvcreate --name home -l 100%FREE voidvm # note the lowercase l here
Logical volume "home" created.
# mkfs.ext4 -L root /dev/voidvm/root # replace with your desired filesystem
# mkfs.ext4 -L home /dev/voidvm/home
# mkswap /dev/voidvm/swap
</pre>
</code>
<p>now time to mount and install the actual system; this is standard procedure</p>
<code class="codeblock">
<pre>
# mount /dev/voidvm/root /mnt
# for dir in dev proc sys run; do mkdir -p /mnt/$dir ; mount --rbind --make-rslave /$dir /mnt/$dir ; done
# mkdir -p /mnt/home
# mount /dev/voidvm/home /mnt/home
# mkdir -p /mnt/boot
# mount /dev/nvme0n1p1 /mnt/boot # N.B: *not* /boot/efi
# mkdir -p /mnt/var/db/xbps/keys
# cp /var/db/xbps/keys/* /mnt/var/db/xbps/keys/
</pre>
</code>
<p>important note: use <a href="https://docs.voidlinux.org/xbps/repositories/index.html#the-main-repository">the correct repository path</a> for your system. the following example is for glibc systems</p>
<code class="codeblock">
<pre>
# xbps-install -Sy -R https://repo-default.voidlinux.org/current -r /mnt base-system lvm2 cryptsetup efibootmgr
</pre>
</code>
<p>time to set up the chroot environment</p>
<code class="codeblock">
<pre>
# chroot /mnt
# chown root:root /
# chmod 755 /
# passwd root # changing root password
# echo your_hostname &gt; /etc/hostname
N.B: glibc systems only
# echo "LANG=en_US.UTF-8" &gt; /etc/locale.conf
# echo "en_US.UTF-8 UTF-8" &gt;&gt; /etc/default/libc-locales
# xbps-reconfigure -f glibc-locales
</pre>
</code>
<p>now you need to configure <code>/etc/fstab</code>. I recommend installing <code>nano</code> (via <code>xbps-install nano</code>) for editing these files right now, unless you're already comfortable with editing files in vi(m). for our current config, fstab will look like the following:</p>
<code class="codeblock">
<pre>
# &lt;file system&gt; &lt;dir&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt;
/dev/nvme0n1p1 /boot vfat defaults 0 2
/dev/voidvm/root / ext4 defaults 0 1
/dev/voidvm/home /home ext4 defaults 0 2
/dev/voidvm/swap swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,nosuid,nodev,noexec 0 0
# note: noexec on /tmp is optional. this *can* break some very specific things
# notably, minecraft LWJGL 3.3.1 extracts its library to /tmp, which you can change with a JVM arg
# you could omit noexec from /tmp. honestly, it's less useful for one-user systems anyway
# but there's no harm in including noexec, so I do so
</pre>
</code>
<p>now we need to create the directory <code>/etc/dracut.conf.d</code> and edit <code>10-cryptoverride.conf</code> in it. honestly I don't know if the second line is needed for this config but you might as well include it</p>
<code class="codeblock">
<pre>
hostonly=yes
install_items+=" /etc/crypttab " # N.B: the spaces between the quotes
</pre>
</code>
<p>the final thing we need to change is <code>/etc/default/efibootmgr-kernel-hook</code>. in here, you need to replace <code>&lt;UUID&gt;</code> with the UUID of the LUKS filesystem. you can find this by running <code>blkid -o value -s UUID /dev/nvme0n1p2</code> (replacing <code>/dev/nvme0n1p2</code> with your LUKS partition of course). unfortunately, you'll have to manually type it in</p>
<code class="codeblock">
<pre>
MODIFY_EFI_ENTRIES=1
OPTIONS="loglevel=4 rd.luks.uuid=&lt;UUID&gt; rd.lvm.vg=voidvm root=/dev/voidvm/root"
DISK="/dev/nvme0n1"
PART=1 # the EFI system partition, *not* root
</pre>
</code>
<p>now reconfigure dracut and the kernel to ensure everything gets updated. replace <code>linux6.1</code> with your current kernel version. you can check this by running <code>xbps-query -s linux</code></p>
<code class="codeblock">
<pre>
# xbps-reconfigure -f dracut linux6.1
</pre>
</code>
<p>finally, exit the chroot and reboot the system</p>
<code class="codeblock">
<pre>
# exit # might need to do this twice if you entered bash
# umount -R /mnt
# reboot
</pre>
</code>
<p>hopefully everything went well. if something didn't go well and you don't reboot successfully, don't panic. don't go through the entire installation process again unless you fucked up something with the encrypted disk and cannot unlock it at all. otherwise, look at <a href="rescuing.html">rescuing a system</a></p>
<p>addendum: if you want to make this setup basically as secure as possible, you also need to use secure boot and sign your own kernel. this varies wildly from system to system, so I cannot give any specific instructions here. I also haven't done it yet. oops</p>
<a href="setup.html">setting up a system --&gt;</a>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,129 @@
# void linux - installation
I won't restate the already-well-documented-elsewhere. if you want a basic system steup, no fancy efistub or FDE or whatnot, the [manual](https://docs.voidlinux.org/installation/live-images/guide.html) and installer script are both very powerful and go a very long way
## full disk encryption + efistub
efistub essentially just means that the kernel image becomes its own bootable device, removing the need for something like GRUB or other intermediary bootloaders. this, of course, is only supported by systems that can boot uefi, which you can check by going into your BIOS or running `efibootmgr` in a live image. refer to your own computer documentation if needed; everything is different.
full disk encryption means that most of your disk (except the boot partition except in certain circumstances) is encrypted and as such can't be accessed to read data without a key or passphrase. the void manual has [section on installing fde with GRUB](https://docs.voidlinux.org/installation/guides/fde.html), and this allows for an encrypted boot partition. however, the manual does not cover efistub at all, let alone with encryption, so this will serve as a guide. I figured this out from other blog posts for different systems and whatnot, but changed some stuff to fit my liking
you can probably remove all the cryptsetup-related stuff and have a perfectly fine and working efistub system. I am too lazy to make a completely separate guide for this right at this moment, e-mail or DM me if you want me to guide you through it and if I get even one person doing this I'll make a separate guide
### setup
boot a live image and login to `root:voidlinux`. run `void-installer` to setup your keymap, internet connection, and (optionally) your user (this is just the simplest way to do this initial setup)
check which drive you want to install void on with `lsblk` and run `cfdisk -z /dev/<device>`. select `gpt` as the label type. make a partition at least 128M in size (I HIGHLY recommend 256M though) and set its type to `EFI System`. make another partition with the remaining space of type `Linux Filesystem`
now set up the actual encrypted partition with an lvm volume. in this example, `/dev/nvme0n1` is the disk, `p1` is the boot partition, and `p2` is the other partition
also, a note for this entire guide: words following a `#` way off to the right are comments, and should not be entered
```
# mkfs.vfat /dev/nvme0n1p1 # because this is an efi system
# cryptsetup luksFormat --type luks2 --label luks /dev/nvme0n1p2
Enter passphrase and all that jazz...
# cryptsetup luksOpen /dev/nvme0n1p2 cryptroot
Enter passphrase for /dev/nvme0n1p2:
# vgcreate voidvm /dev/mapper/cryptroot
Volume group "voidvm" successfully created
```
now we need to make our actual filesystems. I like having a separate /home partition because... I don't know really. I don't "distrohop", but I guess it's better for backups and migration. 16G as root should be more than enough enough for most systems, but you might want more. refer to the manual for how much swap you should put in. the cool thing about using lvm is that these can easily be resized later in case you need to change something
```
# lvcreate --name root -L 16G voidvm
Logical volume "root" created.
# lvcreate --name swap -L 8G voidvm
Logical volume "swap" created.
# lvcreate --name home -l 100%FREE voidvm # note the lowercase l here
Logical volume "home" created.
# mkfs.ext4 -L root /dev/voidvm/root # replace with your desired filesystem
# mkfs.ext4 -L home /dev/voidvm/home
# mkswap /dev/voidvm/swap
```
now time to mount and install the actual system; this is standard procedure
```
# mount /dev/voidvm/root /mnt
# for dir in dev proc sys run; do mkdir -p /mnt/$dir ; mount --rbind --make-rslave /$dir /mnt/$dir ; done
# mkdir -p /mnt/home
# mount /dev/voidvm/home /mnt/home
# mkdir -p /mnt/boot
# mount /dev/nvme0n1p1 /mnt/boot # N.B: *not* /boot/efi
# mkdir -p /mnt/var/db/xbps/keys
# cp /var/db/xbps/keys/* /mnt/var/db/xbps/keys/
```
important note: use [the correct repository path](https://docs.voidlinux.org/xbps/repositories/index.html#the-main-repository) for your system. the following example is for glibc systems
```
# xbps-install -Sy -R https://repo-default.voidlinux.org/current -r /mnt base-system lvm2 cryptsetup efibootmgr
```
time to set up the chroot environment
```
# chroot /mnt
# chown root:root /
# chmod 755 /
# passwd root # changing root password
# echo your_hostname > /etc/hostname
N.B: glibc systems only
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
# xbps-reconfigure -f glibc-locales
```
now you need to configure `/etc/fstab`. I recommend installing `nano` (via `xbps-install nano`) for editing these files right now, unless you're already comfortable with editing files in vi(m). for our current config, fstab will look like the following:
```
# <file system> <dir> <type> <options> <dump> <pass>
/dev/nvme0n1p1 /boot vfat defaults 0 2
/dev/voidvm/root / ext4 defaults 0 1
/dev/voidvm/home /home ext4 defaults 0 2
/dev/voidvm/swap swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,nosuid,nodev,noexec 0 0
# note: noexec on /tmp is optional. this *can* break some very specific things
# notably, minecraft LWJGL 3.3.1 extracts its library to /tmp, which you can change with a JVM arg
# you could omit noexec from /tmp. honestly, it's less useful for one-user systems anyway
# but there's no harm in including noexec, so I do so
```
now we need to create the directory `/etc/dracut.conf.d` and edit `10-cryptoverride.conf` in it. honestly I don't know if the second line is needed for this config but you might as well include it
```
hostonly=yes
install_items+=" /etc/crypttab " # N.B: the spaces between the quotes
```
the final thing we need to change is `/etc/default/efibootmgr-kernel-hook`. in here, you need to replace `<UUID>` with the UUID of the LUKS filesystem. you can find this by running `blkid -o value -s UUID /dev/nvme0n1p2` (replacing `/dev/nvme0n1p2` with your LUKS partition of course). unfortunately, you'll have to manually type it in
```
MODIFY_EFI_ENTRIES=1
OPTIONS="loglevel=4 rd.luks.uuid=<UUID> rd.lvm.vg=voidvm root=/dev/voidvm/root"
DISK="/dev/nvme0n1"
PART=1 # the EFI system partition, *not* root
```
now reconfigure dracut and the kernel to ensure everything gets updated. replace `linux6.1` with your current kernel version. you can check this by running `xbps-query -s linux`
```
# xbps-reconfigure -f dracut linux6.1
```
finally, exit the chroot and reboot the system
```
# exit # might need to do this twice if you entered bash
# umount -R /mnt
# reboot
```
hopefully everything went well. if something didn't go well and you don't reboot successfully, don't panic. don't go through the entire installation process again unless you fucked up something with the encrypted disk and cannot unlock it at all. otherwise, look at [rescuing a system](rescuing.html)
addendum: if you want to make this setup basically as secure as possible, you also need to use secure boot and sign your own kernel. this varies wildly from system to system, so I cannot give any specific instructions here. I also haven't done it yet. oops
[setting up a system -->](setup.html)

View File

@ -0,0 +1,15 @@
index.md
TITLE="void linux | ~yosh"
TB_TITLE="void linux"
TB_COLOR=green
SIDEBARS="top bot-void"
installation.md
TITLE="void linux | ~yosh"
TB_TITLE="void linux | installation"
SIDEBARS="top bot-void"
setup.md
TITLE="void linux | ~yosh"
TB_TITLE="void linux | setup"
SIDEBARS="top bot-void"

View File

@ -1,135 +0,0 @@
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="void linux | setup" ./titlebar.sh ?>
<h1>void linux - setup</h1>
<p>with void now installed, we need to set it up. this setup process will be geared towards people looking for a one-user desktop experience. I do not have enough experience with multi-user servers/desktops to be 100% confident on what to do in terms of security and whatnot, but this setup guide should also be relatively good for multi-user desktop systems as well (i.e. guest accounts), so long as you take modified/additional steps where applicable</p>
<p>as a reminder, <b>this is not exhaustive</b>. the <a href="https://docs.voidlinux.org/config/index.html">manual</a> has much, much more than what is covered here. these are just a few key things I found needed specifics that weren't elaborated on in said manual</p>
<h2 id="users">user(s)</h2>
<p>skip this section if you installed with void-installer. the intricasies of <code>useradd</code> aren't really important for a single-user system, but I think it'd be good to briefly go over them anyway</p>
<p>there are two important files related to adding users: <code>/etc/default/useradd.conf</code> and <code>/etc/login.defs</code>. I've never changed anything in either of those two files, but the options in them are pretty self explanatory. unless you're running an actual mail server, I don't think you should make a mail spool for users. whatever</p>
<p>the <code>/etc/skel</code> directory is a "skeleton" of a new user's home directory. all directories and files inside of it are copied to the <code>/home/USER</code> directory whenever a user is created. for a one-user system, there's no real need to change anything in here</p>
<p>make sure you're in a root shell. add your user with <code>useradd user_name</code>. if you left the config files alone, a new user should be created with a home directory and part of a group of the same name (check with <code>groups user_name</code>). now you need to add said user to some groups. refer to the <a href="https://docs.voidlinux.org/config/users-and-groups.html">manual</a> to see what groups are for what, but my setup puts me in these groups:</p>
<code class="codeblock">
<pre>
# usermod -G user_name,wheel,floppy,audio,video,cdrom,optical,kvm,input,plugdev,xbuilder user_name
</pre>
</code>
<p>these are the same groups you are given when setting up a user with the void-installer script and choosing <code>wheel</code>. whether some of these groups are unnecessary, bad practice, or I am missing some that might be useful, should be directed to my email or the void linux devs</p>
<p>anyway, with groups configured, change the password for yourself with <code>passwd user_name</code>. your user is now setup and you don't necessarily need to be in a root shell anymore, but you probably should stay in one for the remainder of this setup</p>
<h2 id="time">time</h2>
<p>timekeeping is important! luckily, other people also recognize this and have developed cool stuff like "ntp" for keeping time effectively</p>
<p>check your current time with <code>date -u</code>. this will output the date and time in UTC. make sure it's "close enough" (within a minute or so) to the <a href="https://www.timeanddate.com/worldclock/timezone/utc">UTC time</a>. if not, set it with <code>date -u -s "YYYY-MM-DD HH:MM:SS"</code>. again, it doesn't have to be perfect, within a minute or so is good enough for now. obviously the closer the better.</p>
<p>I like to use <code>openntpd</code> for my ntp daemon. I cannot speak for any other daemon. install it and link the service:</p>
<code class="codeblock">
<pre>
# xbps-install openntpd
...
Creating 'ntpd' alternatives group symlink: ntpd -&gt; /usr/bin/openntpd
Creating 'ntpd' alternatives group symlink: ntpd.8 -&gt; /usr/share/man/man8/openntpd.8
Creating 'ntpd' alternatives group symlink: ntpd -&gt; /etc/sv/openntpd
...
# ln -s /etc/sv/ntpd /var/service
</pre>
</code>
<p>you might want to change the config in <code>/etc/ntpd.conf</code> for various reasons (commenting out google, cloudflare if that's something you want, more regional ntp servers, etc., but for most people the defaults should suffice. just make sure you <code>sv restart ntpd</code> after changing it :)</p>
<p>finally, to keep the hwclock continuously synced to the system clock, add the following to <code>/etc/rc.shutdown</code>:</p>
<code class="codeblock">
<pre>
# Default rc.shutdown for void; add your custom commands here.
#
# This is run by runit in stage 3 after the services are stopped
# (see /etc/runit/3).
hwclock --systohc
</pre>
</code>
<p>now your hardware clock will sync with your system clock on shutdown, and your system clock will slowly sync and stay around towards "true" time while powered on</p>
<h4>minor note</h4>
<p>make sure that in <code>/etc/rc.conf</code>, the <code>TIMEZONE</code> variable isn't being set there. comment it out so you can use the <a href="https://docs.voidlinux.org/config/date-time.html">preferred method</a> of changing timezone if needs be</p>
<h2 id="internet">internet</h2>
<p>internet sounds like one of those things that would be a paid to setup, and when it comes to specific networks with weird setups, it can get annoying, but it's mostly really easy</p>
<p>if you use ethernet and your router doesn't have weird 2nd-phase authentication, then you can 99% of the time just plug in an ethernet cord and be on your merry way. routers with authentication for ethernet and whatnot should read onwards</p>
<h3 id="internet-wpa">wpa_supplicant</h3>
<p>I have only ever used <code>wpa_supplicant</code> to connect to networks wirelessly and/or with authentication. for this, the <a href="https://wiki.archlinux.org/title/Wpa_supplicant">archwiki</a> is an invaluable resource here. it explains everything and every edge case much better than I can. the only real recommendation I will give is doing <code>chmod 700 /etc/wpa_supplicant</code> to ensure only root can see and edit the config files</p>
<h3 id="internet-eduroam">eduroam</h3>
<p>god I hate eduroam. I needed to connect to my uni's internet with ethernet and it had zero documentation for what it used past MSCHAPV2 auth that every eduroam network uses. I'll just dump the wired and wireless config for my uni here:</p>
<p>wired:</p>
<code class="codeblock">
<pre>
network={
key_mgmt=IEEE8021X
eap=PEAP
pairwise=CCMP
phase2="auth=MSCHAPV2"
identity="username@university-email.edu"
password="university-password"
ca_cert="/usr/share/ca-certificates/mozilla/USERTrust_RSA_Certification_Authority.crt"
}
</pre>
</code>
<p>wireless:</p>
<code class="codeblock">
<pre>
network={
ssid="eduroam"
key_mgmt=WPA-EAP
eap=PEAP
pairwise=CCMP
phase2="auth=MSCHAPV2"
identity="username@university-email.edu"
password="university-password"
ca_cert="/usr/share/ca-certificates/mozilla/USERTrust_RSA_Certification_Authority.crt"
mesh_fwding=1
}
</pre>
</code>
<p>if this config doesn't work, your next best option is guessing and testing. you might need a different ca_cert; you might not need a ca_cert at all; you might have a different pairwise option, the list goes on. if your uni has official documentation, use that over this 100%. if it doesn't, then good luck. I had to look up like 5 different universities' different documentation before nailing this config for my uni.</p>
<h2 id="sudo">replacing sudo</h2>
<p>this is optional. I just hate sudo's configuration. therefore, I use <code>doas</code>. install the <code>opendoas</code> package.</p>
<p>doas is incredibly easy to configure. <code>man doas.conf</code> is less than 100 lines. here's my recommended config:</p>
<code class="codeblock">
<pre>
# env var
permit setenv { DISPLAY XAUTHORITY LANG LC_ALL } :wheel
# nopass rules
permit nopass :wheel as root cmd xbps-install args -Su
permit nopass :wheel as root cmd xbps-remove args -Oo
permit nopass :wheel as root cmd reboot args
permit nopass :wheel as root cmd shutdown args -h now
# denies
deny :wheel cmd su
</pre>
</code>
<p>then we'll need to remove sudo from the system. however, sudo is a dependency of <code>base-system</code>, so we need to first ignorepkg it</p>
<code class="codeblock">
<pre>
# echo "ignorepkg=sudo" &gt;&gt; /etc/xbps.d/20-user-preferences.conf
# xbps-remove sudo
</pre>
</code>
<p>an important thing to note is that doas by default does not keep environment variables (much like <code>su -</code>), which might trip you up when trying to use stuff like graphical applications. this is what the <code>setenv</code> part addresses. the nopass rules are just standard maintenance commands I use basically every day that would be a hassle to enter a password in for every time</p>
<p>one final thing to note if you utilize doas for calling scripts: the environment variable <code>DOAS_USER</code> is set in the environment doas runs, just in case you need it for anything</p>
<h2 id="xdg">XDG variables</h2>
<p>I'll cover XDG in depth more later, but for now all that you should know is that it's recommended to set these. in <code>/etc/profile.d/00-xdg-variables.sh</code>, add:</p>
<code class="codeblock">
<pre>
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
</pre>
</code>
<p>make sure all these directories exist too so that nothing yells at you when trying to run just yet</p>
<h3>XDG_RUNTIME_DIR</h3>
<p>the <code>XDG_RUNTIME_DIR</code> variable has a specific way it should be implemented according to the spec. before, this guide showed making a tmpdir in /tmp (because the package showed later didn't exist at the time), but that sucks and is probably prone to some dumb shit happening sometimes. idk.</p>
<p>anyway, install the <code>dumb_runtime_dir</code> package and remove the <code>-</code> from the <code>-session optional pam_dumb_runtime_dir.so</code> line in <code>/etc/pam.d/system-login</code></p>
<a href="xorg.html">xorg --&gt;</a>
</main>
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -0,0 +1,146 @@
# void linux - setup
with void now installed, we need to set it up. this setup process will be geared towards people looking for a one-user desktop experience. I do not have enough experience with multi-user servers/desktops to be 100% confident on what to do in terms of security and whatnot, but this setup guide should also be relatively good for multi-user desktop systems as well (i.e. guest accounts), so long as you take modified/additional steps where applicable
as a reminder, **this is not exhaustive**. the [manual](https://docs.voidlinux.org/config/index.html) has much, much more than what is covered here. these are just a few key things I found needed specifics that weren't elaborated on in said manual
## user(s)
skip this section if you installed with void-installer. the intricasies of `useradd` aren't really important for a single-user system, but I think it'd be good to briefly go over them anyway
there are two important files related to adding users: `/etc/default/useradd.conf` and `/etc/login.defs`. I've never changed anything in either of those two files, but the options in them are pretty self explanatory. unless you're running an actual mail server, I don't think you should make a mail spool for users. whatever
the `/etc/skel` directory is a "skeleton" of a new user's home directory. all directories and files inside of it are copied to the `/home/USER` directory whenever a user is created. for a one-user system, there's no real need to change anything in here
make sure you're in a root shell. add your user with `useradd user_name`. if you left the config files alone, a new user should be created with a home directory and part of a group of the same name (check with `groups user_name`). now you need to add said user to some groups. refer to the [manual](https://docs.voidlinux.org/config/users-and-groups.html) to see what groups are for what, but my setup puts me in these groups:
```
# usermod -G user_name,wheel,floppy,audio,video,cdrom,optical,kvm,input,plugdev,xbuilder user_name
```
these are the same groups you are given when setting up a user with the void-installer script and choosing `wheel`. whether some of these groups are unnecessary, bad practice, or I am missing some that might be useful, should be directed to my email or the void linux devs
anyway, with groups configured, change the password for yourself with `passwd user_name`. your user is now setup and you don't necessarily need to be in a root shell anymore, but you probably should stay in one for the remainder of this setup
## time
timekeeping is important! luckily, other people also recognize this and have developed cool stuff like "ntp" for keeping time effectively
check your current time with `date -u`. this will output the date and time in UTC. make sure it's "close enough" (within a minute or so) to the [UTC time](https://www.timeanddate.com/worldclock/timezone/utc). if not, set it with `date -u -s "YYYY-MM-DD HH:MM:SS"`. again, it doesn't have to be perfect, within a minute or so is good enough for now. obviously the closer the better.
I like to use `openntpd` for my ntp daemon. I cannot speak for any other daemon. install it and link the service:
```
# xbps-install openntpd
...
Creating 'ntpd' alternatives group symlink: ntpd -> /usr/bin/openntpd
Creating 'ntpd' alternatives group symlink: ntpd.8 -> /usr/share/man/man8/openntpd.8
Creating 'ntpd' alternatives group symlink: ntpd -> /etc/sv/openntpd
...
# ln -s /etc/sv/ntpd /var/service
```
you might want to change the config in `/etc/ntpd.conf` for various reasons (commenting out google, cloudflare if that's something you want, more regional ntp servers, etc., but for most people the defaults should suffice. just make sure you `sv restart ntpd` after changing it :)
finally, to keep the hwclock continuously synced to the system clock, add the following to `/etc/rc.shutdown`:
```
# Default rc.shutdown for void; add your custom commands here.
#
# This is run by runit in stage 3 after the services are stopped
# (see /etc/runit/3).
hwclock --systohc
```
now your hardware clock will sync with your system clock on shutdown, and your system clock will slowly sync and stay around towards "true" time while powered on
#### minor note
make sure that in `/etc/rc.conf`, the `TIMEZONE` variable isn't being set there. comment it out so you can use the [preferred method](https://docs.voidlinux.org/config/date-time.html) of changing timezone if needs be
## internet
internet sounds like one of those things that would be a paid to setup, and when it comes to specific networks with weird setups, it can get annoying, but it's mostly really easy
if you use ethernet and your router doesn't have weird 2nd-phase authentication, then you can 99% of the time just plug in an ethernet cord and be on your merry way. routers with authentication for ethernet and whatnot should read onwards
### wpa\_supplicant
I have only ever used `wpa_supplicant` to connect to networks wirelessly and/or with authentication. for this, the [archwiki](https://wiki.archlinux.org/title/Wpa_supplicant) is an invaluable resource here. it explains everything and every edge case much better than I can. the only real recommendation I will give is doing `chmod 700 /etc/wpa_supplicant` to ensure only root can see and edit the config files
### eduroam
god I hate eduroam. I needed to connect to my uni's internet with ethernet and it had zero documentation for what it used past MSCHAPV2 auth that every eduroam network uses. I'll just dump the wired and wireless config for my uni here:
wired:
```
network={
key_mgmt=IEEE8021X
eap=PEAP
pairwise=CCMP
phase2="auth=MSCHAPV2"
identity="username@university-email.edu"
password="university-password"
ca_cert="/etc/ssl/certs/USERTrust_RSA_Certification_Authority.pem"
}
```
wireless:
```
network={
ssid="eduroam"
key_mgmt=WPA-EAP
eap=PEAP
pairwise=CCMP
phase2="auth=MSCHAPV2"
identity="username@university-email.edu"
password="university-password"
ca_cert="/etc/ssl/certs/USERTrust_RSA_Certification_Authority.pem"
mesh_fwding=1
}
```
if this config doesn't work, your next best option is guessing and testing. you might need a different ca_cert; you might not need a ca_cert at all; you might have a different pairwise option, the list goes on. if your uni has official documentation, use that over this 100%. if it doesn't, then good luck. I had to look up like 5 different universities' different documentation before nailing this config for my uni.
## replacing sudo
this is optional. I just hate sudo's configuration. therefore, I use `doas`. install the `opendoas` package.
doas is incredibly easy to configure. `man doas.conf` is less than 100 lines. here's my recommended config:
```
# env var
permit setenv { DISPLAY XAUTHORITY LANG LC_ALL } :wheel
# nopass rules
permit nopass :wheel as root cmd xbps-install args -Su
permit nopass :wheel as root cmd xbps-remove args -Oo
permit nopass :wheel as root cmd reboot args
permit nopass :wheel as root cmd shutdown args -h now
# denies
deny :wheel cmd su
```
then we'll need to remove sudo from the system. however, sudo is a dependency of `base-system`, so we need to first ignorepkg it
```
# echo "ignorepkg=sudo" >> /etc/xbps.d/20-user-preferences.conf
# xbps-remove sudo
```
an important thing to note is that doas by default does not keep environment variables (much like `su -`), which might trip you up when trying to use stuff like graphical applications. this is what the `setenv` part addresses. the nopass rules are just standard maintenance commands I use basically every day that would be a hassle to enter a password in for every time
one final thing to note if you utilize doas for calling scripts: the environment variable `DOAS_USER` is set in the environment doas runs, just in case you need it for anything
## XDG Variables
I'll cover XDG in depth more later, but for now all that you should know is that it's recommended to set these. in `/etc/profile.d/00-xdg-variables.sh`, add:
```
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
```
make sure all these directories exist too so that nothing yells at you when trying to run just yet
### XDG\_RUNTIME\_DIR
the `XDG_RUNTIME_DIR` variable has a specific way it should be implemented according to the spec. before, this guide showed making a tmpdir in /tmp (because the package showed later didn't exist at the time), but that sucks and is probably prone to some dumb shit happening sometimes. idk.
anyway, install the `dumb_runtime_dir` package and remove the `-` from the `-session optional pam_dumb_runtime_dir.so` line in `/etc/pam.d/system-login`
[xorg -->](xorg.html)

View File

@ -1,62 +0,0 @@
<?sh TITLE="youtube downloading | ~yosh" ./head.sh ?>
<body>
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<?sh TB_TITLE="youtube downloading" TB_COLOR="pink" ./titlebar.sh ?>
<h1>downloading from youtube for fun, archival, and maybe profit</h1>
<p>this page will guide you through using <a href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a> for downloading videos from not only youtube, but like 30 thousand other sites that it supports. this guide will assume zero prior knowledge on concepts like windows environment variables, using the terminal, ffmpeg, etc. (the *nix instructions will assume basic familiarity with your package manager and the terminal). I made this because a group I'm in recently guided someone through using yt-dlp, and it was slightly disorganized. this should serve as a good introductory guide that you can link to whoever needs to hear it</p>
<h2>I don't want to use yt-dlp</h2>
<p>you can use <a href="https://co.wukko.me/">cobalt</a> or <a href="https://projectlounge.pw/ytdl">projectlounge's web interface</a> if you want to download without getting programs yourself</p>
<h2>obtaining yt-dlp</h2>
<h3>windows</h3>
<p>by far the easiest method to "get and go" yt-dlp, as well as receive automatic updates, is to use a windows package manager. when I used windows, I was very in love with <a href="https://scoop.sh/">scoop</a>, and as such I recommend using it</p>
<p>installing scoop is as simple as two lines in a powershell window, both of which are featured on the scoop website. opening powershell can be done from the start menu by searching "powershell". I don't want to rewrite the links were in the event any change, but the <a href="https://github.com/ScoopInstaller/Install#readme">github</a> should also give you help</a></p>
<p>after scoop is installed, you should be able to open a command prompt window and run <code>scoop</code>. you can open command prompt by start menu -&gt; searching <code>cmd</code>, or windows key + r -&gt; <code>cmd</code></p>
<p>to install yt-dlp from here, run <code>scoop install yt-dlp</code>. in the event youtube breaks something and you feel like yt-dlp needs an update, you can type <code>scoop update yt-dlp</code></p>
<h3>*nix</h3>
<p><a href="https://github.com/yt-dlp/yt-dlp/wiki/Installation#linuxmacos">yt-dlp should be available from your package repositories</a>. if yt-dlp is, for some reason, not packaged for your system, you can install python's <code>pip</code> for your system (name may differ from distribution to distribution), then install yt-dlp with <code>pip install yt-dlp</code>
<h2>obtaining ffmpeg</h2>
<p><a href="https://ffmpeg.org/">ffmpeg</a> is an incredibly powerful command line tool for converting videos from one format to another. it also does much more, but for our purposes, only that part is relevant</p>
<h3>windows</h3>
<p>if you used scoop for installing yt-dlp, you should be able to install ffmpeg via <code>scoop install yt-dlp</code></p>
<h3>*nix</h3>
<p>ffmpeg should be packaged for your system. if it's not, you'll have to either get the binaries from someone else or compile it yourself. that is outside the scope of this page</p>
<h2>running and configuration</h2>
<p>if you wanted, you could start doing <code>yt-dlp video-link-here</code> and start downloading videos right now. however, there's a few configuration options I think you should set first</p>
<h3>configuration</h3>
<p>on windows, the recommended configuration file path is <code>%APPDATA%/yt-dlp/config</code>. open explorer and type <code>%APPDTAA%</code> in the titlebar to go to the appdata folder. make the directory <code>yt-dlp</code> then, inside the directory, make the file <code>config</code>. on *nix, the recommended configuration file path is <code>${XDG_CONFIG_HOME}/yt-dlp/config</code>. by default, unless you have changed <code>XDG_CONFIG_HOME</code> to be something else, this should be <code>~/.config/yt-dlp/config</code>. go ahead and make the file at that path if it isn't there already</p>
<p>in the configuration file, put the following:</p>
<code class="codeblock">
<pre>
-o "%(title).128B [%(id)s].%(ext)s"
--merge-output-format mkv
--yes-playlist
--add-chapters
</pre>
</code>
<p>the first line is a good output filename template; the second line merges videos into the <code>mkv</code> container; the third line by default downloads playlists if you specify a playlist link; and the forth line adds "chapters" to the output video based on metadata on the site</p>
<h2>notes on file formats</h2>
<p>video files, along with some audio files, are secretly two formats in one. there is a "container" format, which is most likely what you're familiar with when you think about a video file. this is the mp4, the webm, the mkv, etc. containers are not what actually make up the video itself, but rather contain metadata that helps serve the video. the second format is the "codec" of the file, which is what actually comprises the video itself. codecs are decoded to pixels by your processor and are what actually put images on your screen. some common codecs are h264/x264 (the most common "supported everywhere" one), h265/x265, vp8 (default for webm container videos), vp9, av1, etc.</p>
<p>youtube currently stores videos in a few formats:</p>
<ul>
<li>webm container, vp9 vcodec, no audio, served via DASH</li>
<li>mp4 container, h264 vcodec, no audio, served via DASH</li>
<li>mp4 container, h264 vcodec, aac acodec, served directly</li>
<li>webm container, no video, opus acodec, served via DASH</li>
<li>m4a container, no video, aac acodec, served via DASH</li>
</ul>
<p>when using your browser, you're probably being served a webm DASH video with a webm DASH audio that are combined together on the fly. this probably has some benefits for google, I don't exactly know, but the point is that all these formats exist</p>
<p>by default, yt-dlp tries to get the best quality possible from a video. this results in it usually downloading the webm vp9 video and the webm opus audio, then combining them together via ffmpeg, preserving the original codecs of both. notice how we set the output format that it merges to to <code>mkv</code>. this is due to the fact that <code>mkv</code> is a very good "general" container, in that it supports a wide range of audio and video codecs, in fact all the ones that youtube serves. the mp4 container is unable to use the vp9 codec, and the webm container is unable to use the h264 codec. this can get pretty frustrating, as some places might not support certain video containers and/or codecs (notably, vp9, the highest quality format youtube serves, isn't really widespread across the board as it's new)</p>
<p>anyway, mkv is a container format that is almost never conventionally "supported" outside of video players like VLC, MPV, etc. that sounds like a horrible thing to merge to, but it saves headaches if you're only using the videos for your own purposes. if you want to learn about transcoding the video, switching containers, or downloading other formats from yt-dlp, read on!</p>
<h2>changing formats</h2>
<p>let's say you only want the audio from a youtube video. to download only audio, you can run <code>yt-dlp -f ba video-link</code>. the <code>-f ba</code> means "download the format that is the best audio". this is usually going to result in a webm file with an opus audio codec. now, webm isn't exactly meant to be an audio-only format, so a lot of sites and programs are going to be really confused if you supply this to them. here is where ffmpeg comes to the rescue!</p>
<p>to change the container of this audio, you can run <code>ffmpeg -i input_file.webm -c:a copy output_file.opus</code>. you should replace <code>input_file</code> with the file you want to transcode (for windows and some *nix terminal emulators, you're able to drag the file into the terminal window and it'll fill it in), and replace <code>output_file</code> with the output path to the video (if you're not too familiar with directories in the terminal, you can just drag the same file into the window, then change a character in the title so that it doesn't overwrite the input file</p>
<p>opus containers are generally more recognized as audio across the board. some services, notably discord, won't "embed" this audio. you can trick these services by simply changing the file extension to <code>ogg</code> since the containers are similar enough</p>
<p>for videos, the recommended "supported" container to put them in is mp4 with an h264 codec. in ffmpeg, this looks like <code>ffmpeg -i input_file output_file.mp4</code> (ffmpeg automatically assumes h264 codec, so no need to specify it)</p>
<p>PLEASE NOTE! every time you change formats <em>without using -c copy</em>, you naturally lose quality as you're converting to a lossy format (the only exceptions to this are when using inherently lossless formats, like flac, or with niche codec stuff you'll never need). please keep this in mind if video quality is important!</p>
</main>
<?sh ./footer.sh ?>
</body>
</html>

75
src/random-info/ytdl.md Normal file
View File

@ -0,0 +1,75 @@
# downloading from youtube for fun, archival, and maybe profit
this page will guide you through using [yt-dlp](https://github.com/yt-dlp/yt-dlp) for downloading videos from not only youtube, but like 30 thousand other sites that it supports. this guide will assume zero prior knowledge on concepts like windows environment variables, using the terminal, ffmpeg, etc. (the \*nix instructions will assume basic familiarity with your package manager and the terminal). I made this because a group I'm in recently guided someone through using yt-dlp, and it was slightly disorganized. this should serve as a good introductory guide that you can link to whoever needs to hear it
## I don't want to use yt-dlp
you can use [cobalt](https://co.wukko.me/) or [projectlounge's web interface](https://projectlounge.pw/ytdl) if you want to download without getting programs yourself. cobalt's pretty damn user friendly and quick
## obtaining yt-dlp
### windows
by far the easiest method to "get and go" yt-dlp, as well as receive automatic updates, is to use a windows package manager. when I used windows, I was very in love with [scoop](https://scoop.sh/), and as such I recommend using it
installing scoop is as simple as two lines in a powershell window, both of which are featured on the scoop website. opening powershell can be done from the start menu by searching "powershell". I don't want to rewrite the links were in the event any change, but the [github](https://github.com/ScoopInstaller/Install#readme) should also give you help
after scoop is installed, you should be able to open a command prompt window and run `scoop`. you can open command prompt by start menu -> searching `cmd`, or windows key + r -> `cmd`
to install yt-dlp from here, run `scoop install yt-dlp`. in the event youtube breaks something and you feel like yt-dlp needs an update, you can type `scoop update yt-dlp`
### \*nix
[yt-dlp should be available from your package repositories](https://github.com/yt-dlp/yt-dlp/wiki/Installation#linuxmacos). if yt-dlp is, for some reason, not packaged for your system, you can install python's `pip` for your system (name may differ from distribution to distribution), then install yt-dlp with `pip install yt-dlp`
## obtaining ffmpeg
[ffmpeg](https://ffmpeg.org/) is an incredibly powerful command line tool for converting videos from one format to another. it also does much more, but for our purposes, only that part is relevant
### windows
if you used scoop for installing yt-dlp, you should be able to install ffmpeg via `scoop install ffmpeg`
### \*nix
ffmpeg should be packaged for your system. if it's not, you'll have to either get the binaries from someone else or compile it yourself. that is outside the scope of this page
## running and configuration
if you wanted, you could start doing `yt-dlp video-link-here` and start downloading videos right now. however, there's a few configuration options I think you should set first
### configuration
on windows, the recommended configuration file path is `%APPDATA%/yt-dlp/config`. open explorer and type `%APPDATA%` in the titlebar to go to the appdata folder. make the directory `yt-dlp` then, inside the directory, make the file `config`. on \*nix, the recommended configuration file path is `${XDG_CONFIG_HOME}/yt-dlp/config`. by default, unless you have changed `XDG_CONFIG_HOME` to be something else, this should be `~/.config/yt-dlp/config`. go ahead and make the file at that path if it isn't there already
in the configuration file, put the following:
```
-o "%(title).128B [%(id)s].%(ext)s"
--merge-output-format mkv
--yes-playlist
--add-chapters
```
the first line is a good output filename template; the second line merges videos into the `mkv` container; the third line by default downloads playlists if you specify a playlist link; and the forth line adds "chapters" to the output video based on metadata on the site
## notes on file formats
video files, along with some audio files, are secretly two formats in one. there is a "container" format, which is most likely what you're familiar with when you think about a video file. this is the mp4, the webm, the mkv, etc. containers are not what actually make up the video itself, but rather contain metadata that helps serve the video. the second format is the "codec" of the file, which is what actually comprises the video itself. codecs are decoded to pixels by your processor and are what actually put images on your screen. some common codecs are h264/x264 (the most common "supported everywhere" one), h265/x265, vp8 (default for webm container videos), vp9, av1, etc.
youtube currently stores videos in a few formats:
- webm container, vp9 vcodec, no audio, served via DASH
- mp4 container, h264 vcodec, no audio, served via DASH
- mp4 container, h264 vcodec, aac acodec, served directly
- webm container, no video, opus acodec, served via DASH
- m4a container, no video, aac acodec, served via DASH
when using your browser, you're probably being served a webm DASH video with a webm DASH audio that are combined together on the fly. this probably has some benefits for google, I don't exactly know, but the point is that all these formats exist
by default, yt-dlp tries to get the best quality possible from a video. this results in it usually downloading the webm vp9 video and the webm opus audio, then combining them together via ffmpeg, preserving the original codecs of both. notice how we set the output format that it merges to to `mkv`. this is due to the fact that `mkv` is a very good "general" container, in that it supports a wide range of audio and video codecs, in fact all the ones that youtube serves. the mp4 container is unable to use the vp9 codec, and the webm container is unable to use the h264 codec. this can get pretty frustrating, as some places might not support certain video containers and/or codecs (notably, vp9, the highest quality format youtube serves, isn't really widespread across the board as it's new)
anyway, mkv is a container format that is almost never conventionally "supported" outside of video players like VLC, MPV, etc. that sounds like a horrible thing to merge to, but it saves headaches if you're only using the videos for your own purposes. if you want to learn about transcoding the video, switching containers, or downloading other formats from yt-dlp, read on!
## changing formats
let's say you only want the audio from a youtube video. to download only audio, you can run `yt-dlp -f ba video-link`. the `-f ba` means "download the format that is the best audio". this is usually going to result in a webm file with an opus audio codec. now, webm isn't exactly meant to be an audio-only format, so a lot of sites and programs are going to be really confused if you supply this to them. here is where ffmpeg comes to the rescue!
to change the container of this audio, you can run `ffmpeg -i input_file.webm -c:a copy output_file.opus`. you should replace `input_file` with the file you want to transcode (for windows and some \*nix terminal emulators, you're able to drag the file into the terminal window and it'll fill it in), and replace `output_file` with the output path to the video (if you're not too familiar with directories in the terminal, you can just drag the same file into the window, then change a character in the title so that it doesn't overwrite the input file
opus containers are generally more recognized as audio across the board. some services, notably discord, won't "embed" this audio. you can trick these services by simply changing the file extension to `ogg` since the containers are similar enough
for videos, the recommended "supported" container to put them in is mp4 with an h264 codec. in ffmpeg, this looks like `ffmpeg -i input_file output_file.mp4` (ffmpeg automatically assumes h264 codec, so no need to specify it)
PLEASE NOTE! every time you change formats *without using -c copy*, you naturally lose quality as you're converting to a lossy format (the only exceptions to this are when using inherently lossless formats, like flac, or with niche codec stuff you'll never need). please keep this in mind if video quality is important!

View File

@ -80,17 +80,14 @@ code {
white-space: nowrap;
}
code.codeblock {
text-align: left;
pre > code {
display: block;
padding: 4px;
margin: 0 16px;
}
code.codeblock > pre {
padding: 0;
margin: 0;
text-align: left;
padding: 0.25em;
margin: 0 1em;
white-space: pre-wrap;
}
blockquote {
text-align: left;
background-color: #2222;
@ -105,6 +102,10 @@ ul, ol {
line-height: 1.5em;
}
ul p, ol p {
margin: 0.25em 0;
}
.displist {
padding: 0;
list-style: none;
@ -142,8 +143,8 @@ header {
grid-area: lbarbot;
height: min-content;
}
.lbarbot ul.s {
padding-left: 14px;
.lbarbot ul {
padding-left: 0.5em;
}
.bunny {
background: url("../img/bunnies.gif") #CCEEDDEE repeat;

View File

@ -4,6 +4,7 @@
background: url("../img/titlebars/img-bg.gif") repeat-x var(--tb-bg) left;
height: 19px;
--tb-img-bg: #f4f0e8;
}
.titlebar > * { background-color: var(--tb-bg); color: var(--tb-fg); }
@ -52,7 +53,14 @@
/* specific colors */
.tb-green { --tb-bg: #5dbc99; --tb-fg: #000000; --tb-img-bg: #f4f0e8; }
.tb-lblue { --tb-bg: #67a2bc; --tb-fg: #000000; --tb-img-bg: #f4f0e8; }
.tb-pink { --tb-bg: #dc9786; --tb-fg: #000000; --tb-img-bg: #f4f0e8; }
.tb-white { --tb-bg: #ffffff; --tb-fg: #000000; --tb-img-bg: #ffffff; }
.tb-teal { --tb-bg: #618888; --tb-fg: #fff; }
.tb-brown { --tb-bg: #a27c66; --tb-fg: #fff; }
.tb-lgrey { --tb-bg: #bfc0c5; --tb-fg: #000; }
.tb-dgrey { --tb-bg: #7b7b7b; --tb-fg: #fff; }
.tb-lblue { --tb-bg: #afbffb; --tb-fg: #000; }
.tb-purple { --tb-bg: #885770; --tb-fg: #fff; }
.tb-white { --tb-bg: #f0eceb; --tb-fg: #000; }
.tb-lblue { --tb-bg: #85c4ed; --tb-fg: #000; }
.tb-dblue { --tb-bg: #5586c3; --tb-fg: #fff; }
.tb-green { --tb-bg: #3f938d; --tb-fg: #fff; }
.tb-pink { --tb-bg: #ef9d9d; --tb-fg: #000; }