depsterr.com

The sources and build system for depsterr.com
git clone git://depsterr.com/git/depsterr.com
Log | Files | Refs | LICENSE

commit 0b250ae964c32193f5d93fbaf18d380fe1434094
parent a398dba3ff63702f28605187d5092939ed57d4bd
Author: depsterr <depsterr@protonmail.com>
Date:   Fri, 26 Jun 2020 00:49:31 +0200

ported old website fully

Diffstat:
Mgit_page.sh | 4++--
Mheader.html | 2+-
Mmake_pages.sh | 5+++++
Ares/clibreboot-holes.jpg | 0
Ares/clibreboot.jpg | 0
Msrc/about.md | 19++++++++++++++++++-
Asrc/blog/2019/libreboot.md | 38++++++++++++++++++++++++++++++++++++++
Asrc/blog/2020/fuck bash.md | 28++++++++++++++++++++++++++++
Dsrc/blog/entry.md | 3---
Dsrc/blog/entry2.md | 3---
Msrc/blog/index.md | 2+-
Msrc/index.md | 4+---
Msrc/irc.md | 6++++--
13 files changed, 98 insertions(+), 16 deletions(-)

diff --git a/git_page.sh b/git_page.sh @@ -54,7 +54,7 @@ body{background:#2e2e2e;} *{font-family: monospace;} h1{color:#e88be0;!important} hr{border-color:#1DDBC9;} -p,tr,td{color:#f5f5f5;} +p,tr,td,pre,code{color:#f5f5f5;} a,a:link,a:visited,a:active{color:#1ddbc9;} a:hover{color:#f7bf65;} EOF @@ -63,7 +63,7 @@ body{background:#2e2e2e;} *{font-family: monospace;} .desc{color:#e88be0;!important} hr{border-color:#1DDBC9;} -p,tr,td{color:#f5f5f5;} +p,tr,td,pre,code{color:#f5f5f5;} a,a:link,a:visited,a:active{color: #1ddbc9;} a:hover{color:#f7bf65;} EOF diff --git a/header.html b/header.html @@ -1 +1 @@ -<!DOCTYPEhtml><html><head><title>depsterr.com</title><linkhref=data:,rel=icon><style>body{background:#2e2e2e;}*{font-family:monospace;}#t{font-size:2.5em;}h1,h2,h3,h4,h6{color:#e88be0;}hr{border-color:#1DDBC9;}p{color:#f5f5f5;}a,a:link,a:visited,a:active{color:#1ddbc9;}a:hover{color:#f7bf65;}</style></head><body><h1 id=t>depsterr.com</h1><hr> +<!DOCTYPEhtml><html><head><title>depsterr.com</title><linkhref=data:,rel=icon><style>body{background:#2e2e2e;}*{font-family:monospace;}#t{font-size:2.5em;}h1,h2,h3,h4,h6{color:#e88be0;}hr{border-color:#1DDBC9;}p,img,li{color:#f5f5f5;max-width:500px;}a,a:link,a:visited,a:active{color:#1ddbc9;}a:hover{color:#f7bf65;}</style></head><body><h1 id=t>depsterr.com</h1><hr> diff --git a/make_pages.sh b/make_pages.sh @@ -22,6 +22,7 @@ cd "$(dirname "$0")" || exit DESTDIR=doc SRCDIR=src +RESDIR=res HEADER="header.html" NAVBAR="navbar.html" @@ -35,6 +36,9 @@ mkdir -p "$DESTDIR" # shellcheck disable=2046 rm -rf $(find "$DESTDIR" -not -name "$DESTDIR" -not -path "*/git*") +# copy resources +cp -r "$RESDIR" "$DESTDIR/res" + # generate pages for file in "$SRCDIR"/*.md; do [ -f "$file" ] || continue @@ -57,6 +61,7 @@ find "$SRCDIR" -type d -not -name "$SRCDIR" -and -not -path "*/git/*" | while re done for file in "$dir"/*.md; do [ -f "$file" ] || continue + echo $file | grep -q "index.md" && continue file="$(basename "${file%.md}.html")" inner="${inner}<li><a href=\"$file\">${file%.html}</a></li>" done diff --git a/res/clibreboot-holes.jpg b/res/clibreboot-holes.jpg Binary files differ. diff --git a/res/clibreboot.jpg b/res/clibreboot.jpg Binary files differ. diff --git a/src/about.md b/src/about.md @@ -1,3 +1,20 @@ # About -This is a little page that I have! +## Who am I? + +I am a Swedish student currently studying at [NTI Johanneberg](https://www.ntigymnasiet.se/johanneberg/). In my spare time I (among other things) enjoy learning about the inner workings of computers, writing code and fiddling with my config files. At the moment I exclusively use Unix based operating systems, my favourite programming language is C and my text editor of choice is vim. + +## What's this site for? + +Not very much. I post about programming and other geek related stuff on the [blog page](/blog/). + +## Site info + +This site was running on [srws](https://github.com/depsterr/srws), my own web server. However it is currently running on [quark](https://tools.suckless.org/quark/). The server computer itself is a self hosted machine running OpenBSD. + +You can find the source of this site (and the creation scripts) under the [depsterr.com git repo](/git/depsterr.com/files.html) + +## Contact Info + +### Email +Personal email: [depsterr@protonmail.com](mailto:depsterr@protonmail.com) diff --git a/src/blog/2019/libreboot.md b/src/blog/2019/libreboot.md @@ -0,0 +1,38 @@ +# Librebooting the macbook 2,1 + +![libreboot boot screen](/res/clibreboot.jpg) + +My macbook showing its libreboot boot screen + +## What and why? + +Recently I've taken interest in [libreboot](https://www.libreboot.org), an open source bios alternative. The main reasons for my interest in libreboot are privacy and it being open source. Now, how could switching your bios effect your privacy? Well, on all modern systems there will be a backdoor of sorts put there by the CPU manufacturer. Intel, which most laptops use, has the Intel management engine, or the ime. The ime is a separate chip constantly running on your computer (even when it's turned off). It has access to your entire system, including the internet, a clear invasion of privacy. + +## The installation process + +Unlike most of the computers that libreboot supports you don't need to physically open the computer to flash libreboot on the macbook 2,1, instead you simply run an installation script from the computer and then reboot. However, installing linux itself on the macbook was a pain. + +At first I tried installation media I had lying around, but neither debian nor arch would boot on the mac. Since mac OS comes on a disc I thought that the reason for my installation media not booting was because of being booted from a USB and not the CD/DVD disk reader. Luckily this wasn't the case and after doing some digging I found [this](https://wiki.debian.org/InstallingDebianOn/Apple/MacBook/2-1) debian wiki page which explained that the computer only boots i386-EFI/32-bit UEFI partitions. Since I knew that after installing libreboot I'd be able to boot other devices I simply searched for a 32-bit UEFI live distro and found a live image for fedora which I could boot on the macbook. + +After this it ran pretty smoothly, the progress that is, not fedora which ran slow as syrup even though I was only working in the tty. Slow speeds are to be expected with live usbs though so I couldn't really complain. Next up I downloaded the libreboot utils and roms using wget from the tty and ran the installation script, which immediately returned an error message. I asked around on [the libreboot irc](https://webchat.freenode.net/#libreboot) and they refered me to [this](https://libreboot.org/faq.html#flashrom-complains-about-devmem-access) part of the libreboot FAQ, and after following the instructions the installer ran flawlessly. After a while of running it showed me the magical message I'd been waiting for: `Verifying flash... VERIFIED.` + +After rebooting my computer I quickly noticed an issue. It didn't boot. At first I thought that I had bricked the mac, which made me feel pretty bummed out, however I once again asked for help in [the libreboot irc](https://webchat.freenode.net/#libreboot) and was advised to try moving the ram sticks around, luckily apple hadn't decided to hide the ram sticks from the user yet back in 2007 so I quickly got to testing. Trying the different combinations and seeing it repeatedly fail made me think that I really had bricked it, however the very last combination worked and the computer booted. Seeing the familiar picture of tux and gnu felt amazing. After this I installed [parabola](https://en.wikipedia.org/wiki/Parabola_GNU/Linux-libre) on the mac, a 100% free (open source) linux distro. + +## Making the macbook a bit more useable + +As I mentioned before, the macbook is far from a dream laptop, however I've tried to make it slightly more useable. The computer is quite slow, this doesn't really affect me since I use i3 in a minimal distro, though something that does bother me is the battery life. I tried installing [tlp](https://wiki.archlinux.org/index.php/TLP) which is a power manager for linux (and one of the best programs ever), however even with tlp the battery only lasts for around two and a half hours. Another problem with the macbook is how hot it gets. To help with this I drilled holes through the bottom in an attempt to improve the airflow. + +![macbook 2,1-with-holes](/res/clibreboot-holes.jpg) + +Bottom side of my macbook showing the holes + +To drill the holes I opened the computer (apple still let you do that in 2007), and removed the CD/DVD reader since I'd never use it and it makes an annoying noise on startup. Then I drilled holes where the CD/DVD reader used to be. This helped a bit with the heating issue, however the CD/DVD reader was of course not what generated the heat, to get a better affect I would have to drill holes under the CPU, though removing the motherboard is a bit to tedious for me to consider it at the moment. + +## Afterthoughts + +In hindsight I made a lot of stupid mistakes that ultimately cost me a lot of time, however I think that the process as a whole has been a valuable experience. The macbook has a horrible battery life and heats up really fast so I don't think I'll use it all that much, but I already knew all that when I bought it. It's been fun learning about the libreboot project, and I plan to buy a thinkpad x200 in the future and libreboot that, since I'd actually be able to use that as my day-to-day laptop. + +<hr> + +* Originally written: 2019-11-30 +* Last edited: 2019-12-02 12:14 diff --git a/src/blog/2020/fuck bash.md b/src/blog/2020/fuck bash.md @@ -0,0 +1,28 @@ +# Fuck bash + +Bash, the Bourne Again Shell, is probably the most popular shell available for modern Unix based operating systems. In fact, bash has become so popular that if you search for "how to do x in shell" or even "how to do x in posix shell" you'll often find nothing but bashisms. + +## The issue(s) + +The point of this article is to highlight some of the issues that arise from this BASH centrism, and cover why I personally dislike bash. + +### Bloat + +The first issue is perhaps the most obvious one, bash is slower than it's more lightweight alternatives. Lighter shells, such as `mksh`, `ash`, or `dash`, are all smaller, simpler, and faster than bash. It's so bad, in fact, that even though Debian uses bash as the user shell it still uses dash for `/bin/sh`. They chose to have 2 shells installed at once than use bash as sh. Unfortunately though, using a posix shell as sh can cause weird issues. + +### "Bash is the standard shell" + +Bash has become so commonplace that people have started to assume that shell == bash. Because of this you'll require have bash to run a lot of scripts. This is not only annoying, but also makes the scripts less portable. But maybe even worse than this is that a lot of bash scripts will be marked with a `#! /bin/sh`, which means that if you're using a posix compatible shell as your sh (as you should), the script will not function, even with bash installed. + +### "Bashisms are good, actually" + +"Internet blogger person", I hear you say "Bash has more features than posix shell, and you can even avoid using programs using the built in features!". This is true, and Emacs also has more ""features"" than Vim. Bash reinvents the wheel by implementing it's own versions of test and seq. Most, if not all bashisms could easily be replaced by posix shell utilities. The one upside of these built in utilities would be performance, however as I've already mentioned, bash falls flat in comparison to other shells when it comes to performance. + +## Conclusion + +Stop using bash. + +<hr> + +* Originally written: 2020-06-19 03:28 +* Last edited: 2020-06-19 03:28 diff --git a/src/blog/entry.md b/src/blog/entry.md @@ -1,3 +0,0 @@ -# My opinion - -Things diff --git a/src/blog/entry2.md b/src/blog/entry2.md @@ -1,3 +0,0 @@ -# My opinion 2 - -another thing diff --git a/src/blog/index.md b/src/blog/index.md @@ -1,2 +1,2 @@ # Blog -welcome to the blog! +This is my blog where I post about various tech related things. Check out the posts by choosing one from the list. diff --git a/src/index.md b/src/index.md @@ -1,3 +1 @@ -# depsterr.com - -home of nothing +> I don't think, therefore, I might be diff --git a/src/irc.md b/src/irc.md @@ -1,3 +1,5 @@ -# Irc +# IRC -[irc.depsterr.com](irc.depsterr.com) +There is an irc server set up at [irc.depsterr.com](irc.depsterr.com). You're more than welcome to drop by the `#main` channel and say hello (if anyone is there). + +Message the user `ADMIN` if you want to notify me!