Codebase for my homepage.
git clone git://vcs.sapka.me/michal-sapka-me
Log | Files | Refs

commit 23c2f6faa70341bef737ea14a5c859f676208117
parent 5e0ff20fcd6e6ce30a8c0b45eee601c87abbf17c
Author: Michał Sapka <michal@sapka.me>
Date:   Sun,  8 Jan 2023 16:23:14 +0100

feat: add new content

A:w | 17+++++++++++++++++
Mconfig.toml | 1+
Acontent/about.md | 8++++++++
Mcontent/buffers_splits_tabs/index.md | 1+
Mcontent/gnu_stow.md | 1+
Acontent/i-now-host-my-own-code.md | 32++++++++++++++++++++++++++++++++
Acontent/resolutions-for-2023.md | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/why-does-this-site-exist.md | 18++++++++++++++++++
Mlayouts/_default/baseof.html | 21++++++++++++++-------
Mlayouts/_default/list.html | 2+-
Mlayouts/_default/single.html | 2++
Mstatic/style.css | 39++++++++++++++++++++++++++++++++++++++-
12 files changed, 189 insertions(+), 9 deletions(-)

diff --git a/:w b/:w @@ -0,0 +1,17 @@ +{{ define "main" }} +{{- range where .Pages "Params.category" "blog"}} + <article class="list"> + <a href="{{ .Page.Permalink }}"> + {{ .Page.Title }} + </a> + ({{ .PublishDate.Format "January 2nd, 2006" }}) + <div> + {{ .Page.Summary }} + </div> + {{- if .Page.Truncated }} + <a href="{{ .Page.Permalink }}">More</a> + </div> + {{ end }} + </article> + {{ end }} +{{ end }} diff --git a/config.toml b/config.toml @@ -1,5 +1,6 @@ baseURL = 'https://michal.sapka.me' languageCode = 'en-us' title = "Michal's website" +tagline = "a" diff --git a/content/about.md b/content/about.md @@ -0,0 +1,8 @@ +--- +title: "About" +category: "pages" +date: 2023-01-08T13:58:33+01:00 +draft: false +tags: [] +--- + diff --git a/content/buffers_splits_tabs/index.md b/content/buffers_splits_tabs/index.md @@ -1,5 +1,6 @@ --- title: "Buffers, splits and tabs in Vim" +category: vim date: 2022-04-05T22:56:47+02:00 draft: false --- diff --git a/content/gnu_stow.md b/content/gnu_stow.md @@ -1,5 +1,6 @@ --- date: 2022-06-09T19:10:00+02:00 +category: linux draft: fale type: productivity title: Managing dotfiles with GNU Stow diff --git a/content/i-now-host-my-own-code.md b/content/i-now-host-my-own-code.md @@ -0,0 +1,32 @@ +--- +title: "I Now Host My Own Code" +category: "blog" +date: 2023-01-08T16:08:51+01:00 +draft: false +tags: ["git", "self-host", "github", "gitlab", "gitea", "cgit", "stagit"] +--- +tldr: you can can go to [https://git.sapka.me](git.sapka.me). + +For years the first step towards every project was to create a GitHub repository. Rightfully so, as Github was the place for open source. They were years ahead of their competition when they launched. Heck, back then, git wasn't even the standard it is now. Time has changed. Microsoft bought them as another coy that would put them back in the minds of developers. + +Nowadays, Github is just another social network. Pull requests, issues, and all that following shenanigans puts you further from the code by showing all that social coys in your face. Some even consider (and I am guilty too) of thinking about GitHub as the de-facto resume. We have put ourselves at the recruiter's mercy. + +But the most significant cost of their hegemony is the transfer of code ownership. You may think that we still own everything you commit there. There are licenses! GPL! Well, ChatGPT may have clouded our memory, but just a few months ago, everything changed when Microsoft used this trust as a tool when they scanned the codebases to train their AI. Do we have any means to block them from doing it? Some even say that Microsoft ignored licenses and closed-source codebases were used. They have entirely breached trust. GitHub, a closed-source software owned by one of the biggest companies on Earth, used the good-heartedness of people worldwide for their own gain. No surprise that their AI will not be free - be it in a monetary or philosophical sense. + +There is GitLab. GitLab is cool, is open source, and is based in Ukraine. They offer superior products while being a much nicer company. The entire FOSS community should move there. At least as long as GitLab stays open-source. We must be vigilant of any company, as they tend to become maleficent. Google was one of the good guys just a few years ago! + +But I don't need all those shiny things that the big guys provide. Instead, I want to share my code. Everything else is extra and can easily be achieved on a small scale. Want a pull request? Just email me a diff. Issue? Hey, here's my email. Some pipeline? Since I own the server (aka "I have root access"), there is no problem with adding some hook with bash commands. + +Having your own Git server is extremely easy. One thing to keep in mind: GitHub has though us to think of Git as a centric system. We think of GitHub as a server and our machines as clients. But this is contrary to how Git works. There is no magical, turbo-important copy of the codebase. Every copy is as important as the other. We've given GitHub (and other providers) the master (main, or whatever we call it now) position. + +This view has lots of practical pluses. If we want to cooperate, we need to decide who has the source of the truth. But it also made it more difficult to challenge the status quo of GitHub. Why bother when everything is already there? + +But enough rambling. Setting it all up takes about 10 minutes. Just follow the [official guide](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server). If you want to have a permissions layer, you can use [Gitosis](https://github.com/tv42/gitosis) or [Gitolite](https://github.com/sitaramc/gitolite). I don't. + +You may also want to have a web interface. Three solutions are very often recommended: +[Gitea](https://gitea.io/en-us/), which is a self-hosted GitHub +[CGit](https://git.zx2c4.com/cgit/), which I now use but am very Stagit-curious. +[Stagit](https://codemadness.org/stagit.html), for all the ultra-neckbeards out there. It's used by [Suckless software](https://git.suckless.org/). +CGit installation is also quite simple. Just follow the [guide](https://wiki.archlinux.org/title/cgit) on Arch Wiki. + +I will migrate all my repositories to [https://git.sapka.me](git.sapka.me) and treat GitHub as another company-mandated account. diff --git a/content/resolutions-for-2023.md b/content/resolutions-for-2023.md @@ -0,0 +1,56 @@ +--- +title: "Resolutions for 2023" +category: "blog" +date: 2023-01-01T01:01:48+01:00 +draft: false +tags: ["meta", "facebook", "phone", "iphone", "freedom-of-speech", "irc", "internet", "spotify", "google", "apple", "memes"] +--- +In no particular order +<!--more--> + +### Remove mobile phones from my life as much as possible + +Mobile phones are a great toy, but everything has worsened since they became the defacto internet devices. The Internet is worse. Our lives are worse. And the world as well. Yet, I can't leave the house without one (or even a room, for that matter). The device itself is an excellent idea, but the usage patterns and people behind them are not. I'd love to return my mind to a state where going for a walk without a phone in my pocket won't feel anxious. + +Also, I use an iPhone, which I am growing to hate. + +### Use a computer more + +A real computer has all the benefits of a phone (internet access) but none of the disadvantages (better input, better screen, better posture, personalization, lack of addiction-driven applications). I don't want to leave the Internet, but instead to move my consumption from a phone to a real computer. + +## Be less self-censoring + +We live in lousy times for freedom of speech. No matter what, someone will get offended. I am guilty of not speaking my mind, afraid of this, and this sucks. And people need to be challenged to grow! How will I ever learn if no one points out how wrong I am? + +### Be more optimistic and less hot-headed + +The last few years were far from good for me. It seems like everything is fine, and then boom - everyone around you is ill. This has taken a toll on me. I want to be happier and calmer. I want to give a generally more optimistic view of the future. + +### Increase my internet presence + +When I was growing up, internet communities were a magical place where I could find like-minded people who shared my interests. Not viewpoints, mind you, so current social media are no substitute for it. I want to rejoin the Internet with one crucial caveat - no company can be behind it. Not Meta, but an internet board. Not Discord, but IRC. + +I also want o invest much more in this site. Previously, I wanted this to be more of a PR stunt than an actual personal website (hello again, terrible modern Internet). But even before that, when I was creating it, I wanted this to be an intimate place where I could vent and do some cool things. Is a link a proper blog post? Not, but it will be! + +### Decrease my internet trail + +I have nearly 300 online accounts gathered over a quarter of a century of online life. I have marked half of them as "to be deleted," but it's complicated. It turns out companies don't want me to leave them! So, this year I want to keep only those accounts I use. + +I also want to remove my reliance on the cloud. I pay Apple, Google, and Spotify. This year I'm bringing as much as I can into the house! + +### Continue to remove reliance on subscriptions to media + +This is self-explanatory. My only social media accounts are Facebook (for Messenger) and Youtube. The first one is impossible to remove from my life, as some refuse to use anything else. But I will continue to refrain from using the main product. The latter one? On the one hand, I want to start posting there. But, on the other, I don't want to use it to find stuff and feed the algorithm. + +## Start a side business + +Yup, a little software gig has not hurt anyone! + +### Improve my meme game + +This is already in progress - https://memes.sapka.me. + +### Continue to ignore the existence of our office + +Before the pandemic, I could not imagine myself working at home. Now I can't imagine going back to the office. My personal limit is to be there once per quarter max. And, of course, try to be as annoying as possible by questioning the raison d'etre of every meeting. + diff --git a/content/why-does-this-site-exist.md b/content/why-does-this-site-exist.md @@ -0,0 +1,18 @@ +--- +title: "Why Does This Site Exist?" +category: "blog" +date: 2023-01-03T13:23:13+01:00 +draft: false +tags: ['meta', 'self-hosting', 'hugo'] +--- + +This site exists due to two reasons. +First of all, I hate social media and what it has done to the internet. +Second, having a website is something I have always enjoyed as it is simply cool as ice. +<!--more--> +Everyone should have a website. Not a Facebook fan page, Instagram, or whatever is cool now but an actual website on the open internet. This is also why I didn't enjoy having a medium-based blog and never posted anything there or anywhere. I will repost some articles there, but owning my platform (ehhh, wording worthy of The Verge) is great. It's simply so much fun for me. It's like Vim or Arch - you don't do it to be more productive or for any practical reason but for the sheer joy of it. So, therefore, I can add "btw, I have a website" to by "btw" list. + +This website is also simple. It's just HTML files generated via Hugo and uploaded using rsync. The previous version was a monster born from React and Next.js and running on Vercel. It is was a cool experiment, but I don't want to live in a world where we complicate the simplest things. + +Here you go: this site exists for me to be a self-centered neckbeard. + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html @@ -35,13 +35,20 @@ <header> {{ $image := resources.Get "logo.png" }} {{ $image := $image.Resize "x45" }} - <a href="/"> - <img alt="logo" src="{{ $image.Permalink }}" width={{$image.Width}} height={{$image.Height}}/> - <div> + <nav> + <a href="/">Home</a> + <a href="/about">About</a> + <a href="https://memes.sapka.me">Memes</a> + <a href="https://git.sapka.me">Git</a> + </nav> + <div id="logo-space"> + <a href="/"> + <div id="logo"> + <img alt="logo" id="logo" src="{{ $image.Permalink }}" width={{$image.Width}} height={{$image.Height}}/> + </div> <h1>{{ .Site.Title }}</h1> - (because giphy sucks) - </div> - </a> + </a> + </div> </header> {{ end }} <main> @@ -55,7 +62,7 @@ </main> <footer> <div> - <a href="https://github.com/michalsapka/website" target="_blank">Source code is available</a>. Theme is temporary. Only glory of Satan is eternal. + <a href="https://git.sapka.me/michal-sapka-me.git/" target="_blank">Source code is available</a>. Theme is temporary. Only glory of Satan is eternal. <BR><BR> Unless stated otherwise, all content Copyright 2022, 2023 Michał Sapka. Unauthorized use under penalty of watching a random Netflix show or a fine of one million dolars. diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -1,5 +1,5 @@ {{ define "main" }} - {{ range .Pages }} +{{- range where .Pages "Params.category" "!=" "pages"}} <article class="list"> <a href="{{ .Page.Permalink }}"> {{ .Page.Title }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -2,6 +2,8 @@ {{ end }} {{ define "main" }} +{{ .Page.Content }} +<BR> added on {{ .PublishDate.Format "January 2, 2006" }} {{- if isset .Params "tags" -}} {{- $tagsLen := len .Params.tags -}} diff --git a/static/style.css b/static/style.css @@ -9,11 +9,20 @@ width: auto; height: auto; } + a:hover { + text-decoration: underline; + } + a { + text-decoration: none; + } main, header, footer { - width: 800px; + width: 600px; max-width: 95%; margin-left: auto; margin-right: auto; + background-color: #ff0000; + + } footer { text-align: center; @@ -22,4 +31,32 @@ } article { margin-bottom: 20px; + padding: 10px; + } + header nav { + display: flex; + } + header a { + color: #000000; + } + header nav a { + flex-grow: 1; + text-align: center; + } + #logo-space a { + display: flex; + flex-direction: row; + width: 100%; + } + #logo-space img { + align-self: center; } + #logo-space h1 { + display: flex; + flex-grow: 2; + } + #logo-space #logo { + display: flex; + flex: 0 0 45px; + } +