build sh part 2

This commit is contained in:
yosh 2023-11-13 00:03:02 -05:00
parent ab5c46d14f
commit 9d7a7fd02c
29 changed files with 264 additions and 181 deletions

100
build.sh
View File

@ -2,87 +2,73 @@
set -euf
BASE="$PWD"
export RESDIR="${RESOURCEDIR:-"${BASE}/include"}"
export BUILDDIR="${BUILDDIR:-"${BASE}/build"}"
export SRCDIR="${SRCDIR:-"${BASE}/src"}"
export _INCDIR="${_INCDIR:-"${BASE}/include"}"
export _BUILDDIR="${_BUILDDIR:-"${BASE}/build"}"
export _SRCDIR="${_SRCDIR:-"${BASE}/src"}"
cleanup() {
[ -f "${inter:-}" ] && rm "$inter"
[ -f "${tmp:-}" ] && rm "$tmp"
[ -f "${filetmp:-}" ] && rm "$filetmp"
true
}
# process an html formatted file
# if a second argument is given, that is the output file
# otherwise, the output file is $BUILDDIR/<filepath>
# process an html formatted file and output to stdout
process_html() {
tmp="$(mktemp)"
# only one use of grep to be efficient
i="$(grep -Ece '<!--sh[[:space:]]+' "$1")"
while [ $i -gt 0 ]; do
awk -v FS='<!--sh[[:space:]]+' -v RS='[[:space:]]+-->' \
'NF > 1 {print $NF; exit}' "$1" \
| sh -s | \
awk '
BEGIN {
RS="\a"
getline var
RS="<!--sh[[:space:]]+"
FS="[[:space:]]+-->"
OFS=" -->"
ORS=""
}
FNR == 2 {
printf substr(var, 1, length(var)-1)
for (i = 2; i < NF; i++)
print $i " -->"
print $i
RS="\a"
}
FNR == 1
FNR > 2 { print "<!--sh " $0 }
' - "$1" > "$tmp"
mv -f "$tmp" "$1"
i=$((i-1))
__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
;;
*) echo "$__LINE" ;;
esac
fi
if [ -n "$__SH_FLAG" ]; then
eval "${__LINE%%\?>*}"
case "$__LINE" in
*"?>"*)
printf '%s' "${__LINE##*\?>}"
__SH_FLAG=""
;;
*) ;;
esac
fi
done
)
# SUBSHELL END #
}
# process a pure markdown file
# uses a special file in RESDIR, `markdown-template.sh` to create the html
# 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() {
tmpmd="$(mktemp)"
lowdown --html-no-skiphtml --html-no-escapehtml -o "$tmpmd" "$1"
mv "$tmpmd" "$1"
process_html "$1"
lowdown --html-no-skiphtml --html-no-escapehtml "${1:--}" | process_html
}
trap 'cleanup' INT HUP QUIT EXIT
filetmp="$(mktemp -u)"
# 99% of the time you probably want to be here
cd "$RESDIR"
find "$SRCDIR" -type d -exec sh -c 'for d; do mkdir -p "$BUILDDIR"/"${d#"$SRCDIR"}"; done' sh {} +
cd "$_INCDIR"
find "$_SRCDIR" -type d -exec sh -c 'for d; do mkdir -p "$_BUILDDIR"/"${d#"$_SRCDIR"}"; done' sh {} +
while read -r file; do
filetmp="$(mktemp)"
cp -p "$file" "$filetmp"
case "$file" in
*.[hH][tT][mM][lL]) process_html "$filetmp" ;;
*.[mM][dD]) process_md "$filetmp" ;;
*) ;;
*.[hH][tT][mM][lL]) process_html < "$file" > "$filetmp" ;;
*.[mM][dD]) process_md < "$file" > "$filetmp" ;;
*) cp "$file" "$filetmp" ;;
esac
if ! cmp -s "$filetmp" "$BUILDDIR"/"${file#"$SRCDIR"}"; then
mv "$filetmp" "$BUILDDIR"/"${file#"$SRCDIR"}"
if ! cmp -s "$filetmp" "$_BUILDDIR"/"${file#"$_SRCDIR"}"; then
mv "$filetmp" "$_BUILDDIR"/"${file#"$_SRCDIR"}"
fi
cleanup
done <<-EOF
$(find "$SRCDIR" -type f)
$(find "$_SRCDIR" -type f)
EOF

3
include/bootstrap.sh Normal file
View File

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

View File

@ -0,0 +1,85 @@
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
}

11
include/functions.sh Normal file
View File

@ -0,0 +1,11 @@
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

View File

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

View File

@ -1,10 +1,10 @@
<!--sh TITLE="intimacy via jankiness | ~yosh" ./head.sh -->
<?sh TITLE="intimacy via jankiness | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="intimacy via jankiness" TB_COLOR="lblue" ./titlebar.sh -->
<?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>
@ -29,6 +29,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="discourse | ~yosh" ./head.sh -->
<?sh TITLE="discourse | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="discourse" TB_COLOR="pink" ./titlebar.sh -->
<?sh TB_TITLE="discourse" TB_COLOR="pink" ./titlebar.sh ?>
<h1>discourse</h1>
<time>2023-07-18</time>
<p>discourse is really tiring</p>
@ -16,6 +16,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="dreams of form | ~yosh" ./head.sh -->
<?sh TITLE="dreams of form | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="dreams of form" TB_COLOR="pink" ./titlebar.sh -->
<?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>
@ -26,6 +26,6 @@
<p>I'm not picky</p>
<p><a href="index.html">back</a></p>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="github avoidance | ~yosh" ./head.sh -->
<?sh TITLE="github avoidance | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="github" TB_COLOR="white" ./titlebar.sh -->
<?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>
@ -18,6 +18,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="mysterious world | ~yosh" ./head.sh -->
<?sh TITLE="mysterious world | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="the thought window" TB_COLOR="white" ./titlebar.sh -->
<?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>
@ -15,6 +15,6 @@
<p>and I wouldn't have it any other way</p>
<p><a href="index.html">back</a></p>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="blog | ~yosh" ./head.sh -->
<?sh TITLE="blog | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="blog" ./titlebar.sh -->
<?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>
@ -15,6 +15,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="cool stuff | ~yosh" ./head.sh -->
<?sh TITLE="cool stuff | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="cool stuff!!!" TB_COLOR="lblue" ./titlebar.sh -->
<?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>
@ -15,6 +15,6 @@
<h2>fonts</h2>
<p>I like cool fonts. especially bitmap fonts. they are really cool</p>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,13 +1,13 @@
<!--sh ./head.sh -->
<?sh ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="welcome!" ./titlebar.sh -->
<?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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,16 +1,16 @@
<!--sh ./head.sh -->
<?sh ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="welcome!" ./titlebar.sh -->
<?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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh ./head.sh -->
<?sh ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="welcome!" ./titlebar.sh -->
<?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>
@ -36,6 +36,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="bookmarks | ~yosh" ./head.sh -->
<?sh TITLE="bookmarks | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="bookmarks" ./titlebar.sh -->
<?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>
@ -14,6 +14,6 @@
<li><a href="https://girders.org/php/2021/10/18/setup-php-fpm/">setup php-fpm</a></li>
</ul>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="darktable stuff | ~yosh" ./head.sh -->
<?sh TITLE="darktable stuff | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="darktable stuff" TB_COLOR="lblue" ./titlebar.sh -->
<?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>
@ -16,6 +16,6 @@
</ul>
<p><a href="https://github.com/darktable-org/darktable/issues/10283">further reading</a></p>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="furry internet | ~yosh" ./head.sh -->
<?sh TITLE="furry internet | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="furry internet" TB_COLOR="pink" ./titlebar.sh -->
<?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>
@ -39,6 +39,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,16 +1,16 @@
<!--sh TITLE="furry weekend atlanta | ~yosh" ./head.sh -->
<?sh TITLE="furry weekend atlanta | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="furry weekend atlanta" TB_COLOR="pink" ./titlebar.sh -->
<?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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="fursuit making | ~yosh" ./head.sh -->
<?sh TITLE="fursuit making | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="fursuit making!!" ./titlebar.sh -->
<?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>
@ -12,6 +12,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="random information | ~yosh" ./head.sh -->
<?sh TITLE="random information | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="random information" ./titlebar.sh -->
<?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>
@ -29,6 +29,6 @@
<li><a href="./furry-internet.html">furry internet stuff</a></li>
</ul>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="various resources | ~yosh" ./head.sh -->
<?sh TITLE="various resources | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="various learning topics" TB_COLOR="pink" ./titlebar.sh -->
<?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>
@ -31,6 +31,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="posix shell tips | ~yosh" ./head.sh -->
<?sh TITLE="posix shell tips | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="posix shell!!" ./titlebar.sh -->
<?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>
@ -27,6 +27,6 @@ fi
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="printers | ~yosh" ./head.sh -->
<?sh TITLE="printers | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="printers." TB_COLOR="lblue" ./titlebar.sh -->
<?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>
@ -15,6 +15,6 @@
<p>Amazingly, the whole setup just works and prints forever, saying the cartridges are always full...</p>
</blockquote>
</main>
<!--RES f=footer.html -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="resonite desktop workflow | ~yosh" ./head.sh -->
<?sh TITLE="resonite desktop workflow | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="resonite desktop workflow" ./titlebar.sh -->
<?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>
@ -45,6 +45,6 @@
<li>z - go much slower</li>
</ul>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="void linux | ~yosh" ./head.sh -->
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="void linux" ./titlebar.sh -->
<?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>
@ -13,6 +13,6 @@
<p>without further ado, here's the guide! :D</p>
<a href="installation.html">installation --&gt;</a>
</main>
<!--sh ./footer.sh -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="void linux | ~yosh" ./head.sh -->
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="void linux | installation" ./titlebar.sh -->
<?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>
@ -125,6 +125,6 @@ PART=1 # the EFI system partition, *not* root
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="void linux | ~yosh" ./head.sh -->
<?sh TITLE="void linux | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="void linux | setup" ./titlebar.sh -->
<?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>
@ -130,6 +130,6 @@ export XDG_STATE_HOME="$HOME/.local/state"
<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 -->
<?sh ./footer.sh ?>
</body>
</html>

View File

@ -1,10 +1,10 @@
<!--sh TITLE="youtube downloading | ~yosh" ./head.sh -->
<?sh TITLE="youtube downloading | ~yosh" ./head.sh ?>
<body>
<!--sh ./header.sh -->
<!--sh ./sidebar.sh top bottom -->
<?sh ./header.sh ?>
<?sh ./sidebar.sh top bottom ?>
<main>
<!--sh TB_TITLE="youtube downloading" TB_COLOR="pink" ./titlebar.sh -->
<?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>
@ -57,6 +57,6 @@
<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 -->
<?sh ./footer.sh ?>
</body>
</html>