total_bytes = array_sum(array_map(fn(Language $language): int => $language->bytes(), parent::all())); } public function percent(Language $language, int $mode = PHP_ROUND_HALF_UP): int { return round(($language->bytes() / $this->total_bytes) * 100, 0, $mode); } public function percent_string(Language $language): string { return ($this->percent($language) > 1 ? $this->percent($language) : "<1") . "%"; } public function bytes_si_string(Language $language): string { // Calculate factor for unit $factor = floor((strlen($language->bytes()) - 1) / 3); // Divide by radix 10 $format = $language->bytes() / pow(1000, $factor); return round($format) . " " . FORGEJO_SI_BYTE_MULTIPLE[$factor]; } }; $coffee = new class extends Stats { public function week_average_string(): string { $diff = $this->week() - $this->week_average(); return match (true) { $diff < 1 => "less than", $diff === 1 => "the same as", $diff > 1 => "more than" }; } }; ?>

Victor Westerlund

I​'m a full-stack web developer from Sweden, and welcome to my little personal corner of the Internet!

I used to list the <programming/markup/command/whatever>-languages here that I use the most and order them by guesstimating how much I use each one. But then I thought it would be better to just show you instead using this chart that automatically pulls the total bytes for each language from my public repos on Forgejo.

Some other noteworthy techologies that I work a decent amount with are: Debian, MariaDB, SQLite, DNS, Redis, and probably a few others as well.

percent_string($language) ?> id ?>
(bytes() ?> bytes)
percent_string($language) ?> id ?>
(bytes() ?> bytes)

This website

This site and all of its components, including texts and graphics have been created by me and are all 100% free and open source. Feel free to use anything you see on this website in your own projects as long as it's under the same GNU GPLv3-or-later license. The website is designed by me on top of my own web framework and API framework.

You will never find cookies or trackers on this site. The only information I have about you are in the standard NGINX web server logs, which get overwritten automatically after some time.

Personal

One thing that most people know about me is that I like coffee.. lots of coffee. In fact, I've had week() ?> cupweek() === 1 ? "" : "s" ?> of coffee in the last 7 days! That's week_average_string() ?> my average of week_average() ?> per week, impressive! Even though you just read that.. I don't consider myself too much of a coffee snob! As long as it's dark roast and warm, I'm probably happy to have it.

At times, I become a true, amateur, armchair detective for a variety of your typical-nerdy topics that I find interesting and you can bet I spend way more time reading about those things than I will ever have use for in life.

My coding happens almost exclusivly in code-server, which is a fork of VSCode that runs entirely in the browser. I keep my development environment tucked away in a lightweight Debian VA that I can tote around to whatever host machine I happen to work on. If I can't do that for whatever reason, I have my dotfiles ready to get things set up the way I like it.

Another silent passion of mine that comes out every few years is building computers and fiddling with networking stuff.

Projects

Here are some projects I'm working on right now:

* Vegvisir: A web navigation framework for PHP.

* Reflect: A REST API framework for PHP developers.

Check out this timeline for a somewhat complete list of everything I have done.


GitHub

I have given up GitHub and moved most of my free software to Codeberg. You can still find my GitHub profile here but I don't use it for source control anymore.


Let's work on something together or just have a chat? Write me a line!