Compare commits

...

3 commits

Author SHA1 Message Date
f4279c0343 feat: add coffee stats endpoints and counter to about page (#28)
This PR refactors some texts on the about page (again), and also a adds two new endpoints for a database table that I have now made public that tracks the coffee cups I've had. The endpoint itself is not public now but I might make a page (something like `/about/coffee`) that presents it in a not-ugly way.

Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/28
2025-03-13 15:16:53 +00:00
vlw
f76962e2ac feat: version control database seeds (#29)
This PR replaces the database files from Release with VCS in git

Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/29
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
2025-03-13 15:16:31 +00:00
5c7c9d2d3a chore: clean up MORE missed references to battlestation (#31)
Apparently I didn't get em' all in #27

Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/31
2025-03-13 15:16:06 +00:00
35 changed files with 663 additions and 958 deletions

View file

@ -41,9 +41,10 @@ cd /var/www/vlw.se
```
## 4. Import the database templates
There's are two SQL files that you can download from the releases page that has a snapshot of the MariaDB databases I use on my live website. The snapshot data for the website databse is not guaranteed to be up to date; but the database structure will be. Download and import these files into two existing databases. One for the website data, and the other has the Reflect API configurations.
There's are two SQL files in [`/src/Database/Seeds/`](https://codeberg.org/vlw/vlw.se/src/branch/master/src/Database/Seeds) that you can use to initialize the two databases required for this website.
- [Download SQL-snapshots](https://codeberg.org/vlw/vlw.se/releases)
- `vlw` - This database has the website data and should be added to the `db` variable under `server_database` in `/.env.ini`
- `vlw_reflect` - This is the Reflect database that has all the endpoints pre-configured. You'll have to add your own ACL rules.
## 5. Set environment variables
Make a copy of the `.env.example.ini` file called `.env.ini` from the root directory of the repo. There are a few parameters you can change here but the required ones are the following:

38
endpoints/coffee/GET.php Normal file
View file

@ -0,0 +1,38 @@
<?php
use vlw\MySQL\Order;
use Reflect\{Response, Path, Call};
use ReflectRules\{Ruleset, Rules, Type};
use VLW\API\Endpoints;
use VLW\Database\Database;
use VLW\Database\Tables\Coffee\CoffeeTable;
require_once Path::root("src/API/Endpoints.php");
require_once Path::root("src/Database/Database.php");
require_once Path::root("src/Database/Tables/Coffee/Coffee.php");
class GET_Coffee extends Database {
protected readonly Ruleset $ruleset;
public function __construct() {
$this->ruleset = new Ruleset(strict: true);
$this->ruleset->GET([
(new Rules(CoffeeTable::ID->value))
->type(Type::NUMBER)
->min(1)
->max(parent::SIZE_UINT32)
]);
$this->ruleset->validate_or_exit();
parent::__construct();
}
public function main(): Response {
return $this->list(CoffeeTable::NAME, CoffeeTable::values(), [
CoffeeTable::ID->value => Order::DESC
]);
}
}

38
endpoints/coffee/POST.php Normal file
View file

@ -0,0 +1,38 @@
<?php
use Reflect\{Response, Path, Call};
use ReflectRules\{Ruleset, Rules, Type};
use VLW\API\Endpoints;
use VLW\Database\Database;
use VLW\Database\Tables\Coffee\CoffeeTable;
require_once Path::root("src/API/Endpoints.php");
require_once Path::root("src/Database/Database.php");
require_once Path::root("src/Database/Tables/Coffee/Coffee.php");
class POST_Coffee extends Database {
protected Ruleset $ruleset;
public function __construct() {
$this->ruleset = new Ruleset(strict: true);
$this->ruleset->POST([
(new Rules(CoffeeTable::ID->value))
->type(Type::NUMBER)
->min(1)
->max(parent::SIZE_UINT32)
->default(time()),
]);
$this->ruleset->validate_or_exit();
parent::__construct();
}
public function main(): Response {
return $this->db->for(CoffeeTable::NAME)->insert($_POST) === true
? new Response(null, 201)
: new Response("Database error", 500);
}
}

View file

@ -0,0 +1,42 @@
<?php
use vlw\MySQL\Order;
use Reflect\{Response, Path, Call};
use ReflectRules\{Ruleset, Rules, Type};
use VLW\API\Endpoints;
use VLW\Database\Database;
use const VLW\COFFEE_STATS_UPDATE_PARAM;
use VLW\Database\Tables\Coffee\StatsTable;
require_once Path::root("src/Consts.php");
require_once Path::root("src/API/Endpoints.php");
require_once Path::root("src/Database/Database.php");
require_once Path::root("src/Database/Tables/Coffee/Stats.php");
class GET_CoffeeStats extends Database {
protected readonly Ruleset $ruleset;
public function __construct() {
$this->ruleset = new Ruleset(strict: true);
$this->ruleset->GET([
(new Rules(COFFEE_STATS_UPDATE_PARAM))
->type(Type::BOOLEAN)
->default(false)
]);
$this->ruleset->validate_or_exit();
parent::__construct();
}
public function main(): Response {
// Freshen cache if update flag is set
if ($_GET[COFFEE_STATS_UPDATE_PARAM]) {
(new Call(Endpoints::COFFEE_STATS->value))->post();
}
return $this->list(StatsTable::NAME, StatsTable::values());
}
}

View file

@ -0,0 +1,35 @@
<?php
use Reflect\{Response, Path, Call};
use ReflectRules\{Ruleset, Rules, Type};
use VLW\API\Endpoints;
use VLW\Database\Database;
use VLW\Database\Tables\Coffee\{CoffeeTable, StatsTable};
require_once Path::root("src/API/Endpoints.php");
require_once Path::root("src/Database/Database.php");
require_once Path::root("src/Database/Tables/Coffee/Stats.php");
require_once Path::root("src/Database/Tables/Coffee/Coffee.php");
class POST_CoffeeStats extends Database {
protected Ruleset $ruleset;
public function __construct() {
$this->ruleset = new Ruleset(strict: true);
$this->ruleset->validate_or_exit();
parent::__construct();
}
public function main(): Response {
$truncate = $this->db->execute_query("DELETE FROM `" . StatsTable::NAME . "`");
// Add a dummy row to run the MariaDB INSERT AFTER Trigger on the coffee database table
$insert = $this->db->for(CoffeeTable::NAME)->insert([CoffeeTable::ID->value => 0]);
// Remove the dummy row
$remove = $this->db->for(CoffeeTable::NAME)->where([CoffeeTable::ID->value => 0])->delete();
return $truncate && $insert && $remove ? new Response() : new Response("Error", 500);
}
}

View file

@ -1,5 +1,6 @@
<?php
use VLW\Database\Models\Coffee\Stats;
use VLW\Database\Models\About\Language;
use const VLW\{
FORGEJO_HREF,
@ -8,6 +9,7 @@
};
require_once VV::root("src/Consts.php");
require_once VV::root("src/Database/Models/Coffee/Stats.php");
require_once VV::root("src/Database/Models/About/Language.php");
$languages = new class extends Language {
@ -33,7 +35,19 @@
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"
};
}
};
?>
<style><?= VV::css("public/assets/css/pages/about") ?></style>
@ -43,8 +57,9 @@
</section>
<hr aria-hidden="true">
<section class="about">
<p>I&ZeroWidthSpace;'m a full-stack web developer from Sweden.</p>
<p>I used to list the &lt;programming/markup/command/whatever&gt;-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 <a href="https://git.vlw.se/config/vlw.se">automatically pulls the total bytes</a> for each language from my public mirrors and sources on <a href="https://git.vlw.se/vlw">Forgejo</a>.</p>
<p>I&ZeroWidthSpace;'m a full-stack web developer from Sweden, and welcome to my little personal corner of the Internet!</p>
<p>I used to list the &lt;programming/markup/command/whatever&gt;-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 <a href="https://git.vlw.se/vlw">Forgejo</a>.</p>
<p>Some other noteworthy techologies that I work a decent amount with are: Debian, MariaDB, SQLite, DNS, Redis, and probably a few others as well. Check out this page for a comprehensive list of all the tech that I use.</p>
</section>
<section class="languages">
<stacked-bar-chart>
@ -81,30 +96,27 @@
</section>
<section class="about">
<h2>This website</h2>
<p>This site and all of its components are <a href="https://codeberg.org/vlw/vlw.se">100% free and open source software</a>. The website is designed and built by me from the ground up using my <a href="https://vegvisir.vlw.se">web</a> and <a href="https://reflect.vlw.se">API</a> frameworks as the foundation. You will find no cookies or trackers here. The only information I have about you is your public IP-address and which resources on this site your browser requests. None of this data is used for any kind of analytics.</p>
<p><a href="https://srv.vlw.se"><i>See detailed information about all servers/services on this domain</i></a></p>
<p>This site and all of its components, including texts and graphics have been created by me and are all <a href="https://codeberg.org/vlw/vlw.se">100% free and open source</a>. 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 <a href="https://vegvisir.vlw.se">web framework</a> and <a href="https://reflect.vlw.se">API framework</a>.</p>
<p>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.</p>
</section>
<section class="about">
<h2>Personal</h2>
<p>Coffee, of course.. and..</p>
<p>At times, I become a true, amateur, armchair detective for a <span class="interests">variety of your typical-nerdy topics that I find interesting</span>. And will spend a disproportionate to real-world-personal-use amount of time reading about that stuff too.</p>
<p>Another silent passion of mine that comes out every few years is building computers and fiddling with weird networking stuff.</p>
<p>And then of course I don't mind some occational gaming, and watching movies and TV-series.</p>
<p>One thing is true.. Coffee, lots of coffee. In fact, I've had <?= $coffee->week() ?> cup<?= $coffee->week() === 1 ? "" : "s" ?> of coffee in the last 7 days! That's <?= $coffee->week_average_string() ?> my average of <?= $coffee->week_average() ?> per week, impressive! Even though you just read that.. I don't consider myself <i>too much</i> of a coffee snob! As long as it's dark roast and warm, I'm probably happy to have it.</p>
<p>At times, I become a true, amateur, armchair detective for a <span class="interests">variety of your typical-nerdy topics that I find interesting</span> and you can bet I spend way more time reading about those things than I will ever have use for in life.</p>
<p>My coding happens almost exclusivly in <a href="https://github.com/coder/code-server">code-server</a>, 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 <a href="https://codeberg.org/vlw/dotfiles">dotfiles</a> ready to get things set up the way I like it.</p>
<p>Another silent passion of mine that comes out every few years is building computers and fiddling with networking stuff.</p>
</section>
<section class="about">
<h2>Projects</h2>
<p>Here are some projects I'm working on right now:</p>
<p>* <a href="https://vegvisir.vlw.se">Vegvisir</a>: A web navigation framework for PHP.</p>
<p>* <a href="https://reflect.vlw.se">Reflect</a>: A REST API framework for PHP developers.</p>
<p>There is more stuff on my <a href="work">works page</a> and even more stuff on <a href="https://codeberg.org/vlw">my Codeberg profile</a>.</p>
<p><a href="https://git.vlw.se/vlw"><i>and even EVEN more stuff on my Forgejo</i></a></p>
<p>Check out this <a href="/work/timeline">timeline</a> for a somewhat complete list of everything I have done.</p>
</section>
<hr>
<section class="about">
<h3>GitHub</h3>
<p>I have <a href="https://giveupgithub.com" target="_blank" rel="noopener noreferer">given up GitHub</a> for their increasing number of injustices againts its users, last betrayal being GitHub's for-profit "Copilot" product which was illegaly trained on copylefted software on its platform.</p>
<p>I signed up and started using GitHub before I became aware of how opressive to to its users and deceptive their business model is. I wasn't aware of the situation.</p>
<p>While I am a bit skeptical to do this in case history repeats itself; [most of] <a href="https://codeberg.org/vlw">my work is now on Codeberg</a> instead. Unfortunately some things like old pull-requests, issues, and branch archives can not be migrated completely.</p>
<p>I have <a href="https://giveupgithub.com" target="_blank" rel="noopener noreferer">given up GitHub</a> and moved most of my free software to <a href="https://codeberg.org/vlw">Codeberg</a>. You can still find my <a href="https://github.com/VictorWesterlund">GitHub profile here</a> but I don't use it for source control anymore.</p>
</section>
<hr>
<section>

View file

@ -60,10 +60,6 @@ section.about span.interests {
animation: interests-hue 5s infinite linear;
}
section.about p i:not(:hover) {
opacity: .3;
}
/* ## Languages */
section.languages {

View file

@ -1,45 +0,0 @@
/* # Overrides */
:root {
--primer-color-accent: 148, 255, 21;
--color-accent: rgb(var(--primer-color-accent));
}
vv-shell {
display: flex;
flex-direction: column;
gap: var(--padding);
}
/* # Content */
/* ## Title */
section.title {
display: flex;
flex-direction: column;
gap: 5px;
}
/* ## Actions */
section.actions {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--padding);
}
/* # Size quries */
@media (max-width: 800px) {
section.actions {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 600px) {
section.actions {
display: flex;
flex-direction: column;
}
}

View file

@ -1,290 +0,0 @@
/* # Overrides */
:root {
--primer-color-accent: 148, 255, 21;
--color-accent: rgb(var(--primer-color-accent));
}
vv-shell {
display: flex;
flex-direction: column;
gap: var(--padding);
}
/* # Content */
/* ## Title */
section.title {
display: flex;
flex-direction: column;
gap: 5px;
padding: calc(var(--padding) * 1.5);
background-color: rgba(var(--primer-color-accent), .1);
border-radius: 6px;
}
section.title > div {
margin-top: calc(var(--padding) / 2);
display: flex;
gap: var(--padding);
}
/* ## Heading */
section.heading h1::before,
section.heading h1::after {
opacity: .4;
}
section.heading h1::before {
content: "“";
}
section.heading h1::after {
content: "”";
}
/* ## Config */
section.config {
position: relative;
display: grid;
grid-template-columns: 300px 1fr;
gap: calc(var(--padding) * 2);
}
section.config:nth-child(4n+2) {
grid-template-columns: 1fr 300px;
}
section.config:nth-child(4n+2) > svg {
order: 1;
}
/* ### PC */
section.config > svg {
position: sticky;
top: calc(var(--running-size) + var(--padding));
width: 100%;
}
section.config > svg :is(rect, path) {
transition: 300ms;
stroke: white;
}
section.config > svg.active :is(rect, path),
section.config > svg:hover :is(rect, path) {
opacity: .4;
}
section.config > svg g.active rect,
section.config > svg g.active path,
section.config > svg g:not(.group):hover rect,
section.config > svg g:not(.group):hover path {
opacity: 1;
stroke: var(--color-accent);
}
section.config > svg g.active rect,
section.config > svg g:not(.group):hover rect {
filter: drop-shadow(0 0 10px rgba(var(--primer-color-accent), .4));
}
/* #### Case */
section.config g.case:not(:hover, .active) :is(rect, path) {
opacity: .2;
}
section.config > svg g.active path,
section.config > svg g:not(.group):hover path {
fill: var(--color-accent);
}
/* #### Motherboard */
section.config > svg .mb .chips {
opacity: 0;
}
/* #### Active states */
section.config > svg g:not(.group) {
display: none;
}
section.config[data-dram="1"] > svg g.drams g.dram:nth-child(1),
section.config[data-dram="2"] > svg g.drams g.dram:nth-child(3n+1),
section.config[data-dram="3"] > svg g.drams g.dram:nth-child(-n+3),
section.config[data-dram="4"] > svg g.drams g.dram,
section.config[data-drives-mdottwo="1"] > svg g.mdottwo g.drive:nth-child(1),
section.config[data-drives-mdottwo="2"] > svg g.mdottwo g.drive:nth-child(-n+2),
section.config[data-drives-mdottwo="3"] > svg g.mdottwo g.drive:nth-child(-n+3),
section.config[data-drives-twodotfive="1"] > svg g.twodotfive g.drive:nth-child(1),
section.config[data-drives-twodotfive="2"] > svg g.twodotfive g.drive:nth-child(-n+2),
section.config[data-drives-twodotfive="3"] > svg g.twodotfive g.drive:nth-child(-n+3),
section.config[data-drives-threedotfive="1"] > svg g.threedotfive g.drive:nth-child(1),
section.config[data-drives-threedotfive="2"] > svg g.threedotfive g.drive:nth-child(-n+2),
section.config[data-drives-threedotfive="3"] > svg g.threedotfive g.drive:nth-child(-n+3),
section.config[data-mb="1"] > svg g.mb,
section.config[data-psu="1"] > svg g.psu,
section.config[data-gpu="1"] > svg g.gpu,
section.config[data-cpu="1"] > svg g.cpu,
section.config[data-case="1"] > svg g.case {
display: initial;
}
/* ## Specs */
section.config .specs {
position: relative;
display: flex;
flex-direction: column;
gap: calc(var(--padding) / 2);
border-radius: 6px;
}
section.config .specs :is(.spec, .group) {
--border-width: 4px;
transition: 300ms background-color, 300ms border-color, 500ms box-shadow;
padding: calc(var(--padding) - var(--border-width));
border: solid var(--border-width) transparent;
background-color: rgba(255, 255, 255, .03);
border-radius: 6px;
cursor: pointer;
}
section.config .specs :is(.spec, .group) * {
pointer-events: none;
}
/* ### Active state */
section.config .specs.active {
background-color: rgba(255, 255, 255, .03);
}
section.config .specs.active :is(.group, .spec:not(.active)) {
display: none;
}
/* ### Spec */
section.config .specs .spec {
display: flex;
flex-direction: column;
}
section.config .specs .spec:hover {
border-color: rgba(255, 255, 255, .05);
background-color: rgba(255, 255, 255, .1);
box-shadow: 0 0 30px 10px rgba(255, 255, 255, .05);
}
section.config .specs .spec.active {
border-color: var(--color-accent);
background-color: rgba(var(--primer-color-accent), .1);
box-shadow: 0 0 30px 10px rgba(var(--primer-color-accent), .05);
cursor: initial;
}
section.config .specs.active .spec.active {
position: sticky;
top: calc(var(--running-size) + var(--padding));
}
section.config .specs .spec h3 {
color: rgba(255, 255, 255, .3);
}
section.config .specs .spec span {
color: white;
}
section.config .specs .spec > div {
display: none;
grid-template-columns: repeat(2, 1fr);
gap: calc(var(--padding) / 2);
margin-top: var(--padding);
}
section.config .specs .spec.active > div {
display: grid;
}
section.config .specs .spec > div label {
color: var(--color-accent);
}
section.config .specs .spec > svg {
display: none;
height: calc(var(--padding) / 2);
margin: 0 auto;
margin-top: calc(var(--padding) / 2);
fill: var(--color-accent);
}
/* ### Group */
section.config .specs .group {
display: flex;
justify-content: space-between;
align-items: center;
}
section.config .specs .group.active {
background-color: rgba(255, 255, 255, .2);
}
section.config .specs .group:hover {
background-color: rgba(255, 255, 255, .1);
}
section.config .specs .group.active:hover {
background-color: rgba(255, 255, 255, .3);
}
section.config .specs .group > svg {
transition: 300ms transform;
fill: var(--color-accent);
height: 10px;
}
section.config .specs .group.active > svg {
transform: rotateX(180deg);
}
/* #### Collection */
section.config .specs .collection {
display: none;
}
section.config .specs .group.active + .collection {
display: contents;
}
/* # Size quries */
@media (max-width: 700px) {
section.title > div {
flex-direction: column;
}
section.config,
section.config:nth-child(4n+2) {
grid-template-columns: 1fr;
}
section.config > svg {
display: none;
}
}

View file

@ -1,72 +0,0 @@
import { Elevent } from "/assets/js/modules/npm/Elevent.mjs";
new Elevent("click", document.querySelectorAll(".group"), (event) => {
// Collapse self if already active and current target
if (event.target.classList.contains("active")) {
return event.target.classList.remove("active");
}
// Collapse all and open current target
[...event.target.closest(".specs").querySelectorAll(".group")].forEach(element => element.classList.remove("active"));
event.target.classList.add("active");
});
new Elevent("click", document.querySelectorAll(".spec"), (event) => {
event.target.classList.add("active");
event.target.addEventListener("mouseleave", () => event.target.classList.remove("active"));
});
// Bind hover listeners for components in the SVGs
[...document.querySelectorAll("section.config g:not(.group)")].forEach(element => {
element.addEventListener("mouseenter", () => {
// Find an element in the most adjacent speclist and highlighit it
const target = element.closest("section.config").querySelector(`.spec[data-target="${element.dataset.target}"]`);
// Get closest specs wrapper element
const specsElement = target.closest(".specs");
// Spec item is part of a collection, we need to expand the group if that is the case
const collectionElement = target.closest(".collection") ?? null;
// Don't close the group after hove ends
let closeGroupOnLeave = false;
// Set fixed height on .specs wrapper to prevent glitchy page jumping when scrolled
specsElement.style.setProperty("height", `${specsElement.offsetHeight}px`);
target.classList.add("active");
specsElement.classList.add("active");
if (collectionElement) {
// Close the group on leave if the group wasn't active before hovering
closeGroupOnLeave = !collectionElement.previousElementSibling.classList.contains("active");
collectionElement.previousElementSibling.classList.add("active");
}
// Bind hover leave listener
element.addEventListener("mouseleave", () => {
// Reset to initial states
target.classList.remove("active");
specsElement.classList.remove("active");
specsElement.style.removeProperty("height");
// Group was closed prior to hover, let's close it on hover leave
if (closeGroupOnLeave) {
collectionElement.previousElementSibling.classList.remove("active");
}
}, { once: true });
});
});
// Bind event listeners for components in the spec lists
[...document.querySelectorAll("section.config .spec:not(.group)")].forEach(element => {
element.addEventListener("mouseenter", () => {
const svgTarget = element.closest("section.config").querySelector(`svg`);
const target = svgTarget.querySelector(`svg g[data-target="${element.dataset.target}"]`);
svgTarget.classList.add("active");
target.classList.add("active");
element.addEventListener("mouseleave", () => {
svgTarget.classList.remove("active");
target.classList.remove("active");
}, { once: true });
});
});

View file

@ -1,173 +0,0 @@
<svg viewBox="0 0 236 288" xmlns="http://www.w3.org/2000/svg">
<mask fill="#fff" id="a"><path d="M19 269a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1v13Z"></path></mask>
<mask fill="#fff" id="b"><path d="M87 241a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1v-7Z"></path></mask>
<mask fill="#fff" id="c"><path d="M87 251a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1v-7Z"></path></mask>
<mask fill="#fff" id="d"><path d="M179 272.051c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="e"><path d="M191 272.051c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="f"><path d="M179 257.333c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="g"><path d="M191 257.333c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="h"><path d="M179 242.615c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="i"><path d="M191 242.615c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="j"><path d="M133 257.333c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="k"><path d="M145 257.333c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="l"><path d="M133 242.615c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="m"><path d="M145 242.615c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="n"><path d="M133 272.051c0-.58.471-1.051 1.051-1.051h8.898c.58 0 1.051.471 1.051 1.051h-11Z"></path></mask>
<mask fill="#fff" id="o"><path d="M145 272.051c0-.58.471-1.051 1.051-1.051h2.898c.58 0 1.051.471 1.051 1.051h-5Z"></path></mask>
<mask fill="#fff" id="p"><path d="M186 40a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1h-11Z"></path></mask>
<mask fill="#fff" id="q"><path d="M198 40a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1h-5Z"></path></mask>
<mask fill="#fff" id="r"><path d="M186 51a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1h-11Z"></path></mask>
<mask fill="#fff" id="s"><path d="M198 51a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1h-5Z"></path></mask>
<mask fill="#fff" id="t"><path d="M186 62a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1h-11Z"></path></mask>
<mask fill="#fff" id="u"><path d="M198 62a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1h-5Z"></path></mask>
<mask fill="#fff" id="v"><path d="M186 73a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1h-11Z"></path></mask>
<mask fill="#fff" id="w"><path d="M198 73a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1h-5Z"></path></mask>
<mask fill="#fff" id="x"><path d="M129.535 123.781h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="y"><path d="M129.535 115.625h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="z"><path d="M129.535 121.969H129a1 1 0 0 1-1-1v-3.438a1 1 0 0 1 1-1h.535v5.438Z"></path></mask>
<mask fill="#fff" id="A"><path d="M92.535 123.781h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="B"><path d="M92.535 115.625h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="C"><path d="M92.535 121.969H92a1 1 0 0 1-1-1v-3.438a1 1 0 0 1 1-1h.535v5.438Z"></path></mask>
<mask fill="#fff" id="D"><path d="M68 143v-2a1 1 0 0 1 1-1h29a1 1 0 0 1 1 1v2H68Z"></path></mask>
<mask fill="#fff" id="E"><path d="M101 143v-2a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v2h-3Z"></path></mask>
<mask fill="#fff" id="F"><path d="M64 143v-2a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v2h-3Z"></path></mask>
<mask fill="#fff" id="G"><path d="M55.535 123.781h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="H"><path d="M55.535 115.625h-1.082a.453.453 0 0 1 0-.906h1.082v.906Z"></path></mask>
<mask fill="#fff" id="I"><path d="M55.535 121.969H55a1 1 0 0 1-1-1v-3.438a1 1 0 0 1 1-1h.535v5.438Z"></path></mask>
<mask fill="#fff" id="J"><path d="M76 38h1a1 1 0 0 1 1 1v33a1 1 0 0 1-1 1h-1V38Z"></path></mask>
<mask fill="#fff" id="K"><path d="M76 76h1a1 1 0 0 1 1 1v22a1 1 0 0 1-1 1h-1V76Z"></path></mask>
<mask fill="#fff" id="L"><path d="M60 38h1a1 1 0 0 1 1 1v33a1 1 0 0 1-1 1h-1V38Z"></path></mask>
<mask fill="#fff" id="M"><path d="M60 76h1a1 1 0 0 1 1 1v22a1 1 0 0 1-1 1h-1V76Z"></path></mask>
<mask fill="#fff" id="N"><path d="M137 100h-1a1 1 0 0 1-1-1V66a1 1 0 0 1 1-1h1v35Z"></path></mask>
<mask fill="#fff" id="O"><path d="M137 62h-1a1 1 0 0 1-1-1V39a1 1 0 0 1 1-1h1v24Z"></path></mask>
<mask fill="#fff" id="P"><path d="M155 100h-1a1 1 0 0 1-1-1V66a1 1 0 0 1 1-1h1v35Z"></path></mask>
<mask fill="#fff" id="Q"><path d="M155 62h-1a1 1 0 0 1-1-1V39a1 1 0 0 1 1-1h1v24Z"></path></mask>
<g data-target="case" data-index="1" class="case">
<rect height="278" rx="3" stroke="#fff" stroke-width="6" width="230" x="3" y="7"></rect>
<path d="M20.639 216.906a2 2 0 0 1 1.674-.906h192.14a2 2 0 0 1 1.756 1.043l2.18 4c.726 1.333-.239 2.957-1.756 2.957H19.697c-1.589 0-2.543-1.764-1.674-3.094l2.616-4ZM5.451.793A2 2 0 0 1 7.046 0h222.808a2 2 0 0 1 1.692.934l2.521 4c.84 1.331-.118 3.066-1.692 3.066H4.021C2.369 8 1.429 6.11 2.425 4.793l3.026-4Z" fill="#fff"></path>
</g>
<g data-target="psu" class="psu">
<path d="M20 268v-11h-4v11h4Zm-3-12v13h4v-13h-4Zm3 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 10a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#a)"></path>
<path d="M86 242v5h4v-5h-4Zm3 6v-7h-4v7h4Zm-3-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-4a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#b)"></path>
<path d="M86 252v5h4v-5h-4Zm3 6v-7h-4v7h4Zm-3-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-4a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#c)"></path>
<rect height="38" rx="3.5" stroke="#fff" stroke-width="3" width="65" x="20.5" y="234.5"></rect>
</g>
<g class="group drives threedotfive">
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="176" y="263.436"></rect>
<path d="M180.051 273h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4ZM188.949 273a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#d)"></path>
<path d="M192.051 273h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4ZM194.949 273a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#e)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="176" y="248.718"></rect>
<path d="M192.051 258.282h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#g)"></path>
<path d="M180.051 258.282h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#f)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="176" y="234"></rect>
<path d="M192.051 243.564h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#i)"></path>
<path d="M180.051 243.564h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#h)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="130" y="248.718"></rect>
<path d="M134.051 258.282h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#j)"></path>
<path d="M146.051 258.282h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#k)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="130" y="234"></rect>
<path d="M134.051 243.564h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#l)"></path>
<path d="M146.051 243.564h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4Zm-1.051 2.949a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#m)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="9.564" rx="2" stroke="#fff" stroke-width="2" width="41" x="130" y="263.436"></rect>
<path d="M134.051 273h8.898v-4h-8.898v4Zm9.949-2.949h-11v4h11v-4ZM142.949 273a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-8.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#n)"></path>
<path d="M146.051 273h2.898v-4h-2.898v4Zm3.949-2.949h-5v4h5v-4ZM148.949 273a.95.95 0 0 1-.949-.949h4a3.051 3.051 0 0 0-3.051-3.051v4Zm-2.898-4a3.051 3.051 0 0 0-3.051 3.051h4a.95.95 0 0 1-.949.949v-4Z" fill="#fff" mask="url(#o)"></path>
</g>
</g>
<g class="group drives twodotfive">
<g data-target="drive" class="drive">
<rect height="5" rx="2" stroke="#fff" stroke-width="2" width="41" x="183" y="36"></rect>
<path d="M187 41h9v-4h-9v4Zm10-3h-11v4h11v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-9-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#p)"></path>
<path d="M199 41h3v-4h-3v4Zm4-3h-5v4h5v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-3-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#q)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="5" rx="2" stroke="#fff" stroke-width="2" width="41" x="183" y="47"></rect>
<path d="M187 52h9v-4h-9v4Zm10-3h-11v4h11v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-9-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#r)"></path>
<path d="M199 52h3v-4h-3v4Zm4-3h-5v4h5v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-3-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#s)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="5" rx="2" stroke="#fff" stroke-width="2" width="41" x="183" y="58"></rect>
<path d="M187 63h9v-4h-9v4Zm10-3h-11v4h11v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-9-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#t)"></path>
<path d="M199 63h3v-4h-3v4Zm4-3h-5v4h5v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-3-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#u)"></path>
</g>
<g data-target="drive" class="drive">
<rect height="5" rx="2" stroke="#fff" stroke-width="2" width="41" x="183" y="69"></rect>
<path d="M187 74h9v-4h-9v4Zm10-3h-11v4h11v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-9-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#v)"></path>
<path d="M199 74h3v-4h-3v4Zm4-3h-5v4h5v-4Zm-1 3a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Zm-3-4a3 3 0 0 0-3 3h4a1 1 0 0 1-1 1v-4Z" fill="#fff" mask="url(#w)"></path>
</g>
</g>
<g data-target="mb" class="mb">
<rect height="176" rx="3.5" stroke="#fff" stroke-width="3" width="152" x="22.5" y="25.5"></rect>
<path d="m31.19 123.309-.01.007-7.32 5.782c-1.968 1.554-4.86.153-4.86-2.354V42a3 3 0 0 1 3-3h15a3 3 0 0 1 3 3v73.048c0 .931-.432 1.81-1.17 2.377l-7.64 5.884Z" fill="#fff"></path>
<path d="m31.19 123.309-.01.007-7.32 5.782c-1.968 1.554-4.86.153-4.86-2.354V42a3 3 0 0 1 3-3h15a3 3 0 0 1 3 3v73.048c0 .931-.432 1.81-1.17 2.377l-7.64 5.884Z" stroke="#fff" stroke-width="2"></path>
<g class="chips">
<rect fill="#fff" height="13" rx="2" width="13" x="23" y="44"></rect>
<rect fill="#fff" height="13" rx="2" width="13" x="23" y="61"></rect>
<rect fill="#fff" height="13" rx="2" width="13" x="23" y="78"></rect>
</g>
</g>
<g class="group drives mdottwo">
<g data-target="drive" class="drive">
<path d="M129.535 123.781v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4a2.453 2.453 0 0 0-2.453 2.453h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#x)"></path>
<path d="M129.535 115.625v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4a2.453 2.453 0 0 0-2.453 2.453h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#y)"></path>
<path d="M129.535 121.969v2h2v-2h-2Zm0-5.438h2v-2h-2v2Zm0 3.438H129v4h.535v-4Zm.465 1v-3.438h-4v3.438h4Zm-1-2.438h.535v-4H129v4Zm-1.465-2v5.438h4v-5.438h-4Zm2.465 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 2.438a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#z)"></path>
<rect height="12.5" rx="2" stroke="#fff" stroke-width="2" width="29.465" x="130.535" y="113"></rect>
</g>
<g data-target="drive" class="drive">
<path d="M92.535 123.781v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4A2.453 2.453 0 0 0 89 123.328h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#A)"></path>
<path d="M92.535 115.625v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4A2.453 2.453 0 0 0 89 115.172h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#B)"></path>
<path d="M92.535 121.969v2h2v-2h-2Zm0-5.438h2v-2h-2v2Zm0 3.438H92v4h.535v-4Zm.465 1v-3.438h-4v3.438h4Zm-1-2.438h.535v-4H92v4Zm-1.465-2v5.438h4v-5.438h-4Zm2.465 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 2.438a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#C)"></path>
<rect height="12.5" rx="2" stroke="#fff" stroke-width="2" width="29.465" x="93.535" y="113"></rect>
</g>
<g data-target="drive" class="drive">
<path d="M55.535 123.781v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4A2.453 2.453 0 0 0 52 123.328h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#G)"></path>
<path d="M55.535 115.625v2h2v-2h-2Zm0-.906h2v-2h-2v2Zm0-1.094h-1.082v4h1.082v-4Zm-1.082 3.094h1.082v-4h-1.082v4Zm-.918-2v.906h4v-.906h-4Zm2.465.453c0 .854-.693 1.547-1.547 1.547v-4A2.453 2.453 0 0 0 52 115.172h4Zm-1.547-1.547c.854 0 1.547.693 1.547 1.547h-4a2.453 2.453 0 0 0 2.453 2.453v-4Z" fill="#fff" mask="url(#H)"></path>
<path d="M55.535 121.969v2h2v-2h-2Zm0-5.438h2v-2h-2v2Zm0 3.438H55v4h.535v-4Zm.465 1v-3.438h-4v3.438h4Zm-1-2.438h.535v-4H55v4Zm-1.465-2v5.438h4v-5.438h-4Zm2.465 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 2.438a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#I)"></path>
<rect height="12.5" rx="2" stroke="#fff" stroke-width="2" width="29.465" x="56.535" y="113"></rect>
</g>
</g>
<g data-target="gpu" class="gpu">
<path d="M59 148h86" stroke="#fff" stroke-linecap="round"></path>
<path d="M59.5 136a1.5 1.5 0 0 0-3 0h3Zm0 8v-8h-3v8h3Z" fill="#fff"></path>
<path d="M68 143v-2a1 1 0 0 1 1-1h29a1 1 0 0 1 1 1v2H68Z" mask="url(#D)" stroke="#fff" stroke-width="3"></path>
<path d="M101 143v-2a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v2h-3Z" mask="url(#E)" stroke="#fff" stroke-width="3"></path>
<path d="M64 143v-2a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v2h-3Z" mask="url(#F)" stroke="#fff" stroke-width="3"></path>
<path d="M55 147a3 3 0 0 1 3-3h88a3 3 0 0 1 3 3v.525c0 .237-.028.473-.083.703l-2.764 11.474a3.001 3.001 0 0 1-2.917 2.298H58a3 3 0 0 1-3-3v-12Z" stroke="#fff" stroke-width="2"></path>
</g>
<g class="group drams">
<g data-target="dram" class="dram">
<path d="M60 38v-2h-2v2h2Zm0 35h-2v2h2v-2Zm0-33h1v-4h-1v4Zm0-1v33h4V39h-4Zm1 32h-1v4h1v-4Zm1 2V38h-4v35h4Zm-2-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-32a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#L)"></path>
<path d="M60 76v-2h-2v2h2Zm0 24h-2v2h2v-2Zm0-22h1v-4h-1v4Zm0-1v22h4V77h-4Zm1 21h-1v4h1v-4Zm1 2V76h-4v24h4Zm-2-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-21a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#M)"></path>
<rect height="66" rx="2" stroke="#fff" stroke-width="2" width="4" x="55" y="36"></rect>
</g>
<g data-target="dram" class="dram">
<path d="M76 38v-2h-2v2h2Zm0 35h-2v2h2v-2Zm0-33h1v-4h-1v4Zm0-1v33h4V39h-4Zm1 32h-1v4h1v-4Zm1 2V38h-4v35h4Zm-2-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-32a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#J)"></path>
<path d="M76 76v-2h-2v2h2Zm0 24h-2v2h2v-2Zm0-22h1v-4h-1v4Zm0-1v22h4V77h-4Zm1 21h-1v4h1v-4Zm1 2V76h-4v24h4Zm-2-1a1 1 0 0 1 1-1v4a3 3 0 0 0 3-3h-4Zm1-21a1 1 0 0 1-1-1h4a3 3 0 0 0-3-3v4Z" fill="#fff" mask="url(#K)"></path>
<rect height="66" rx="2" stroke="#fff" stroke-width="2" width="4" x="71" y="36"></rect>
</g>
<g data-target="dram" class="dram">
<path d="M137 100v2h2v-2h-2Zm0-35h2v-2h-2v2Zm0 33h-1v4h1v-4Zm0 1V66h-4v33h4Zm-1-32h1v-4h-1v4Zm-1-2v35h4V65h-4Zm2 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 32a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#N)"></path>
<path d="M137 62v2h2v-2h-2Zm0-24h2v-2h-2v2Zm0 22h-1v4h1v-4Zm0 1V39h-4v22h4Zm-1-21h1v-4h-1v4Zm-1-2v24h4V38h-4Zm2 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 21a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#O)"></path>
<rect height="66" rx="2" stroke="#fff" stroke-width="2" transform="rotate(180 142 102)" width="4" x="142" y="102"></rect>
</g>
<g data-target="dram" class="dram">
<path d="M155 100v2h2v-2h-2Zm0-35h2v-2h-2v2Zm0 33h-1v4h1v-4Zm0 1V66h-4v33h4Zm-1-32h1v-4h-1v4Zm-1-2v35h4V65h-4Zm2 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 32a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#P)"></path>
<path d="M155 62v2h2v-2h-2Zm0-24h2v-2h-2v2Zm0 22h-1v4h1v-4Zm0 1V39h-4v22h4Zm-1-21h1v-4h-1v4Zm-1-2v24h4V38h-4Zm2 1a1 1 0 0 1-1 1v-4a3 3 0 0 0-3 3h4Zm-1 21a1 1 0 0 1 1 1h-4a3 3 0 0 0 3 3v-4Z" fill="#fff" mask="url(#Q)"></path>
<rect height="66" rx="2" stroke="#fff" stroke-width="2" transform="rotate(180 160 102)" width="4" x="160" y="102"></rect>
</g>
</g>
<g data-target="cpu" class="cpu">
<path d="M98 56a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1h-3ZM113 56a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1h-3ZM103 56a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1h-3ZM108 56a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1h-3ZM116 82a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1h3ZM101 82a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1h3ZM111 82a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1h3ZM106 82a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1h3ZM120 60a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1v-3ZM120 75a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1v-3ZM120 65a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1v-3ZM120 70a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1v-3ZM94 78a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1v3ZM94 63a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1v3ZM94 73a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1v3ZM94 68a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1v3Z" fill="#fff"></path>
<rect height="24" rx="3" stroke="#fff" stroke-width="2" width="24" x="95" y="57"></rect>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 19 KiB

View file

@ -10,9 +10,11 @@
case WORK = "/work";
case SEARCH = "/search";
case COFFEE = "/coffee";
case MESSAGES = "/messages";
case WORK_TAGS = "/work/tags";
case WORK_ACTIONS = "/work/actions";
case COFFEE_STATS = "/coffee/stats";
case WORK_TIMELINE = "/work/timeline";
case ABOUT_LANGUAGES = "/about/languages";
}

View file

@ -24,6 +24,12 @@
const TIMELINE_PREVIEW_LIMIT_PARAM = "limit";
const TIMELINE_PREVIEW_LIMIT_COUNT = 5;
/**
* # Coffee
* Constants related to the coffee endpoints
*/
const COFFEE_STATS_UPDATE_PARAM = "update";
/**
* # Forgejo
* Constants related to the fetching and caching of real-time prog. language use on Forgejo

View file

@ -0,0 +1,35 @@
<?php
namespace VLW\Database\Models\Coffee;
use \VV;
use \DateTimeImmutable;
use VLW\API\Endpoints;
use VLW\Database\Models\Model;
use VLW\Database\Tables\Coffee\CoffeeTable;
require_once VV::root("src/API/Endpoints.php");
require_once VV::root("src/Database/Models/Model.php");
require_once VV::root("src/Database/Tables/Coffee/Coffee.php");
require_once VV::root("src/Database/Models/Coffee/Coffee.php");
class Coffee extends Model {
public function __construct(public readonly string $id) {
parent::__construct(Endpoints::COFFEE, [
CoffeeTable::ID->value => $this->id
]);
}
public static function all(array $params = []): array {
return array_map(fn(array $item): Coffee => new Coffee($item[CoffeeTable::ID->value]), parent::list(Endpoints::COFFEE, $params));
}
public function timestamp(): int {
return $this->get(CoffeeTable::ID->value);
}
public function datetime(): DateTimeImmutable {
return DateTimeImmutable::createFromFormat("U", $this->timestamp());
}
}

View file

@ -0,0 +1,32 @@
<?php
namespace VLW\Database\Models\Coffee;
use \VV;
use VLW\API\Endpoints;
use VLW\Database\Models\Model;
use VLW\Database\Tables\Coffee\StatsTable;
require_once VV::root("src/API/Endpoints.php");
require_once VV::root("src/Database/Models/Model.php");
require_once VV::root("src/Database/Tables/Coffee/Stats.php");
require_once VV::root("src/Database/Models/Coffee/Stats.php");
class Stats extends Model {
public function __construct() {
parent::__construct(Endpoints::COFFEE_STATS);
}
public static function all(array $params = []): array {
return [];
}
public function week(): int {
return $this->get(StatsTable::COUNT_WEEK->value) ?? 0;
}
public function week_average(): int {
return $this->get(StatsTable::COUNT_WEEK_AVERAGE->value) ?? 0;
}
}

282
src/Database/Seeds/vlw.sql Normal file
View file

@ -0,0 +1,282 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
CREATE TABLE `about_languages` (
`id` varchar(255) NOT NULL,
`bytes` int(10) UNSIGNED NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `coffee` (
`id` int(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
DELIMITER $$
CREATE TRIGGER `after_coffee_insert` AFTER INSERT ON `coffee` FOR EACH ROW BEGIN
DECLARE count_recent INT;
DECLARE count_average INT;
-- Clear the stats table --
DELETE FROM coffee_stats;
-- Count the number of rows with timestamp less than 7 days ago
SELECT COUNT(*) INTO count_recent
FROM coffee
WHERE id > UNIX_TIMESTAMP(NOW() - INTERVAL 7 DAY);
-- Calculate the average count of rows for each week
SELECT COUNT(*) / COUNT(DISTINCT YEAR(FROM_UNIXTIME(id)), WEEK(FROM_UNIXTIME(id)))
INTO count_average
FROM coffee;
-- Insert the count into the stats table
INSERT INTO coffee_stats (count_week, count_week_average) VALUES (count_recent, count_average);
END
$$
DELIMITER ;
CREATE TABLE `coffee_stats` (
`count_week` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
`count_week_average` smallint(5) UNSIGNED NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `messages` (
`email` varchar(255) DEFAULT NULL,
`message` text NOT NULL,
`timestamp_created` int(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `search` (
`query` varchar(2048) NOT NULL,
`id` char(10) NOT NULL,
`title` varchar(2048) DEFAULT NULL,
`summary` varchar(2048) NOT NULL,
`category` enum('WORK') DEFAULT NULL,
`href` varchar(2048) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `work` (
`id` varchar(255) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`summary` text NOT NULL,
`created` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `work` (`id`, `title`, `summary`, `created`) VALUES
('deltaco/asyncapp', 'Campaign pages for Deltaco', 'From design mock-ups created by the SweDeltaco marketing team, I built various web pages for campagins and special events for the nordic IT-distributor\'s website using a custom content injection framework for SharePoint that would later inspire my other project, Vegvisir.', '2020-10-18'),
('deltaco/distit', 'WordPress modules for DistIT', 'Maintenance of a web server for DistIT\'s WordPress website. DistIT is the parent company of SweDeltaco where I was employed for a few years. In addition to server maintenance, I also wrote a few custom WordPress modules for the site, and helped update DistIT\'s custom WordPress theme with new content when required.', '2021-01-21'),
('deltaco/e-charge', 'Product guide for Deltaco E-Charge', 'Front- and back-end for a product configurator from a design mock-up created by one of SweDeltaco\'s graphics designers. The configurator was for Deltaco\'s \"E-charge\"-line of EV-charger products.', '2021-04-06'),
('deltaco/office', 'Product guide for Deltaco Office', 'Product configurator of my own design for Deltaco\'s \"Deltaco Office\"-line of products. The configurator is open source and was implemented by various big-name brands of resellers across the nordics.', '2020-09-04'),
('deltaco/pdf-generator', 'PDF datasheet generator for Deltaco', 'Custom PDF generator for SharePoint 2013', '2020-09-04'),
('deltaco/reseller-form', 'Customer registration form for Deltaco', 'Custom web form which integrated with existing back-end infrastructure to handle new authorized resellers of Deltaco\'s assortment.', '2020-08-04'),
('icellate/genemate', 'Website for GeneMate by iCellate Medical', 'Together with copy written by the marketing team at iCellate, and a new brand new appearance for the company, I helped design a new website and underlying systems for their GeneMate product.', '2022-11-07'),
('icellate/website', 'Website for iCellate Medical', 'Together with the iCellate team, I created a new front-end for the biopharma startup using my Vegvisir framework as the foundation.', '2023-04-19'),
('itg/lan', 'Reservation website for ITG-Sundbyberg', 'Redesign of IT-Gymnasiet Sundbyberg\'s seat reservation system, tournament registration, and information website for their yearly LAN events.', '2014-09-02'),
('itg/upload', 'Web project upload for ITG-Sundbyberg', 'Special school assignment for my Web programming course at IT-Gymnasiet Sundbyberg', '2014-06-11'),
('vlw/camera-obscura', 'cameraobscura.gr', 'Portable front-end website for Camera Obscura GR', '2018-04-25'),
('vlw/collage', 'vlw/collage', 'Create an image where each \"pixel\" is a smaller image of similar color to the original image.', '2021-03-21'),
('vlw/dediprison', 'DediPrison', 'Public Minecraft server project together with a friend that had around 20-30 active monthly players.', '2015-10-13'),
('vlw/disneyplus-pip', 'vlw/disneyplus-pip', 'Enable (or rather disable Disney\'s block of) picture-in-picture on disneyplus.com for Chrome.', '2021-01-31'),
('vlw/edkb', 'vlw/edkb', 'Printable keyboard overlay for some controls in Elite Dangerous.', '2021-03-18'),
('vlw/elevent', 'vlw/elevent', 'A small npm module that is intended to add more control over event listeners on HTMLElements with JavaScript. Kind of a superset of addEventListener.', '2024-11-11'),
('vlw/eyeart', 'eyeart.me', 'Website designed by me for the Greek/Swedish photographer, eyeart. The website features albums, a blog, and news pages.', '2014-03-02'),
('vlw/ion-musik', 'Website for ION Musik', 'Portable front-end website for Greek musican, ION Musik.', '2015-06-11'),
('vlw/labylib', 'LabyLib', 'Library for controlling LabyMod cosmetics programmatically in Python.', '2020-11-11'),
('vlw/labylib-animated-cape', 'vlw/labylib-animated-cape', 'Minecraft cosmetics scripts for my labylib library that cycles between a set of Labymod capes, creating a (slow) animation.', '2020-11-15'),
('vlw/labylib-chattycape', 'vlw/labylib-chattycape', 'Minecraft cosmetics update script for my labylib library that drew a picture of the last person who sent something in chat.', '2020-11-15'),
('vlw/misskey-microblogger', 'vlw/misskey-microblogger', 'Bot program for Misskey (and compatible forks) that simulates a whole community of independent microbloggers with posts, reactions, and replies. Users have unique personalities, friend groups, partners, and even enemies to whom they will act and respond differently to, sometimes not at all.', '2024-11-09'),
('vlw/monkeydo', 'MonkeyDo', 'A multi-threaded keyframe animation library for JavaScript.', '2021-10-08'),
('vlw/php-age', 'vlw/php-age', 'Asymmetric encryption and decryption of files from PHP with this wrapper for the age command line tool.', '2023-08-22'),
('vlw/php-functionflags', 'vlw/php-functionflags', '', '2023-03-16'),
('vlw/php-globalsnapshot', 'vlw/php-globalsnapshot', '\"Proxy\" PHP superglobals by taking snapshots of current values. The snapshotted state can then be restored at any point.', '2024-04-18'),
('vlw/php-mime-types', 'vlw/php-mime-types', 'Library for resolving a RFC 4288-compatible MIME-type list. After loading a list, files on disk can be queried for types and extensions.', '2024-10-27'),
('vlw/php-mysql', 'vlw/php-mysql', 'Yet another abstraction library for the php-mysql extension. For this library, I was willing to sacrifice most of MySQL\'s flexibility that comes with string interpolation in favor of method chaining that adheres to an SQL-like syntax. For simple DML operations I think it\'s pretty intuitive.', '2023-04-08'),
('vlw/php-sqlite', 'vlw/php-sqlite', 'Abstraction library for common DML queries on an SQLite database with php-sqlite3.', '2023-04-18'),
('vlw/php-xenum', 'vlw/php-xenum', 'Adds a variety of missing quality-of-life methods to PHP 8.0 Enums.', '2023-06-12'),
('vlw/pysheeter', 'Pysheeter', 'Sprite sheet generator for PNGs in Python.', '2020-11-20'),
('vlw/reflect', 'Reflect', 'A weird framework for building REST APIs in PHP with focus on native internal request routing and proxying.', '2022-11-18'),
('vlw/stadia-avatar', 'vlw/stadia-avatar', '', '2021-02-03'),
('vlw/still-alive', 'vlw/still-alive', '', '2021-10-12'),
('vlw/vegvisir', 'Vegvisir', 'Web navigation framework for PHP websites that does on the fly MPA-to-SPA routing between pages on the [open] web seas.', '2022-11-26'),
('vlw/vlw.se', 'vlw.se', 'Can I put my own website here, is that cheating? Maybe, but I think this site counts as the most important thing I\'ve personally created. I\'ve only used my own libraries and frameworks to create this website, so it kind of works as a live demonstration of many of my web projects bundled together.', '2023-06-13');
CREATE TABLE `work_actions` (
`ref_work_id` varchar(255) NOT NULL,
`icon_prepended` varchar(255) DEFAULT NULL,
`icon_appended` varchar(255) DEFAULT NULL,
`order_idx` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
`display_text` varchar(255) NOT NULL,
`href` varchar(255) DEFAULT NULL,
`class_list` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `work_actions` (`ref_work_id`, `icon_prepended`, `icon_appended`, `order_idx`, `display_text`, `href`, `class_list`) VALUES
('vlw/collage', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/collage', NULL),
('vlw/disneyplus-pip', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/disneyplus-pip', NULL),
('vlw/edkb', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/edkb', NULL),
('vlw/labylib', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/labylib', NULL),
('vlw/monkeydo', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/monkeydo', NULL),
('vlw/php-age', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-age', NULL),
('vlw/php-mysql', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-mysql', NULL),
('vlw/php-xenum', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-xenum', NULL),
('vlw/pysheeter', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/pysheeter', NULL),
('vlw/vlw.se', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/vlw.se', NULL),
('vlw/elevent', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/elevent', NULL),
('vlw/misskey-microblogger', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/misskey-microblogger', ''),
('vlw/php-mime-types', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-mime-types', NULL),
('vlw/php-globalsnapshot', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-globalsnapshot', NULL),
('vlw/php-sqlite', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/php-sqlite', NULL),
('vlw/php-functionflags', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/functionflags', NULL),
('vlw/still-alive', 'codeberg.svg', NULL, 0, 'view source', 'https://codeberg.org/vlw/still-alive', NULL),
('vlw/still-alive', 'star.svg', NULL, 0, 'open demo', 'https://victorwesterlund.github.io/still-alive/', NULL);
CREATE TABLE `work_tags` (
`ref_work_id` varchar(255) NOT NULL,
`label` enum('VLW','RELEASE','WEBSITE','REPO') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `work_tags` (`ref_work_id`, `label`) VALUES
('vlw/eyeart', 'WEBSITE'),
('itg/upload', 'WEBSITE'),
('itg/lan', 'WEBSITE'),
('vlw/dediprison', 'VLW'),
('vlw/dediprison', 'WEBSITE'),
('vlw/ion-musik', 'WEBSITE'),
('vlw/camera-obscura', 'WEBSITE'),
('deltaco/asyncapp', 'REPO'),
('deltaco/reseller-form', 'WEBSITE'),
('deltaco/pdf-generator', 'REPO'),
('deltaco/office', 'WEBSITE'),
('deltaco/distit', 'WEBSITE'),
('deltaco/e-charge', 'WEBSITE'),
('vlw/labylib', 'VLW'),
('vlw/labylib', 'REPO'),
('vlw/edkb', 'VLW'),
('vlw/collage', 'VLW'),
('vlw/collage', 'REPO'),
('vlw/monkeydo', 'VLW'),
('vlw/monkeydo', 'REPO'),
('vlw/disneyplus-pip', 'VLW'),
('vlw/disneyplus-pip', 'REPO'),
('vlw/php-mysql', 'VLW'),
('vlw/php-mysql', 'REPO'),
('vlw/pysheeter', 'VLW'),
('vlw/pysheeter', 'REPO'),
('vlw/php-age', 'VLW'),
('vlw/php-age', 'REPO'),
('vlw/php-xenum', 'VLW'),
('vlw/php-xenum', 'REPO'),
('vlw/reflect', 'VLW'),
('vlw/reflect', 'REPO'),
('vlw/vegvisir', 'VLW'),
('vlw/vegvisir', 'REPO'),
('icellate/website', 'WEBSITE'),
('icellate/genemate', 'WEBSITE'),
('vlw/elevent', 'VLW'),
('vlw/elevent', 'REPO'),
('vlw/misskey-microblogger', 'VLW'),
('vlw/misskey-microblogger', 'REPO'),
('vlw/php-mime-types', 'VLW'),
('vlw/php-mime-types', 'REPO'),
('vlw/php-globalsnapshot', 'VLW'),
('vlw/php-globalsnapshot', 'REPO'),
('vlw/php-sqlite', 'VLW'),
('vlw/php-sqlite', 'REPO'),
('vlw/php-functionflags', 'VLW'),
('vlw/php-functionflags', 'REPO'),
('vlw/still-alive', 'VLW'),
('vlw/still-alive', 'WEBSITE'),
('vlw/stadia-avatar', 'VLW'),
('vlw/stadia-avatar', 'REPO'),
('vlw/labylib-chattycape', 'VLW'),
('vlw/labylib-chattycape', 'REPO'),
('vlw/labylib-animated-cape', 'VLW'),
('vlw/labylib-animated-cape', 'REPO');
CREATE TABLE `work_timeline` (
`ref_work_id` varchar(255) NOT NULL,
`year` smallint(5) UNSIGNED NOT NULL,
`month` tinyint(3) UNSIGNED NOT NULL,
`day` tinyint(3) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `work_timeline` (`ref_work_id`, `year`, `month`, `day`) VALUES
('deltaco/asyncapp', 2020, 10, 18),
('deltaco/distit', 2021, 1, 21),
('deltaco/e-charge', 2021, 4, 6),
('deltaco/office', 2020, 9, 4),
('deltaco/pdf-generator', 2020, 9, 4),
('deltaco/reseller-form', 2020, 8, 4),
('icellate/genemate', 2022, 11, 7),
('icellate/website', 2023, 4, 19),
('itg/lan', 2014, 9, 2),
('itg/upload', 2014, 6, 11),
('vlw/camera-obscura', 2018, 4, 25),
('vlw/collage', 2021, 3, 21),
('vlw/dediprison', 2015, 10, 13),
('vlw/disneyplus-pip', 2021, 1, 31),
('vlw/edkb', 2021, 3, 18),
('vlw/elevent', 2024, 11, 11),
('vlw/eyeart', 2014, 3, 2),
('vlw/ion-musik', 2015, 6, 11),
('vlw/labylib', 2020, 11, 11),
('vlw/labylib-animated-cape', 2020, 11, 15),
('vlw/labylib-chattycape', 2020, 11, 15),
('vlw/misskey-microblogger', 2024, 11, 9),
('vlw/monkeydo', 2021, 10, 8),
('vlw/php-age', 2023, 8, 22),
('vlw/php-functionflags', 2023, 3, 16),
('vlw/php-globalsnapshot', 2024, 4, 18),
('vlw/php-mime-types', 2024, 10, 27),
('vlw/php-mysql', 2023, 4, 8),
('vlw/php-sqlite', 2023, 4, 18),
('vlw/php-xenum', 2023, 6, 12),
('vlw/pysheeter', 2020, 11, 20),
('vlw/reflect', 2022, 11, 18),
('vlw/stadia-avatar', 2021, 2, 3),
('vlw/still-alive', 2021, 10, 12),
('vlw/vegvisir', 2022, 11, 26),
('vlw/vlw.se', 2023, 6, 13);
ALTER TABLE `about_languages`
ADD PRIMARY KEY (`id`);
ALTER TABLE `coffee`
ADD PRIMARY KEY (`id`);
ALTER TABLE `search`
ADD PRIMARY KEY (`id`),
ADD KEY `keywords` (`query`(768));
ALTER TABLE `work`
ADD PRIMARY KEY (`id`);
ALTER TABLE `work_actions`
ADD KEY `ref_work_id` (`ref_work_id`);
ALTER TABLE `work_tags`
ADD KEY `anchor` (`ref_work_id`);
ALTER TABLE `work_timeline`
ADD PRIMARY KEY (`ref_work_id`);
ALTER TABLE `work_actions`
ADD CONSTRAINT `work_actions_ibfk_1` FOREIGN KEY (`ref_work_id`) REFERENCES `work` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `work_tags`
ADD CONSTRAINT `work_tags_ibfk_1` FOREIGN KEY (`ref_work_id`) REFERENCES `work` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `work_timeline`
ADD CONSTRAINT `work_timeline_ibfk_1` FOREIGN KEY (`ref_work_id`) REFERENCES `work` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -0,0 +1,97 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
CREATE TABLE `acl` (
`ref_group` varchar(255) DEFAULT NULL,
`ref_endpoint` varchar(255) NOT NULL,
`method` enum('GET','POST','PUT','PATCH','DELETE') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `endpoints` (
`id` varchar(255) NOT NULL,
`active` tinyint(1) UNSIGNED NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `endpoints` (`id`, `active`) VALUES
('about/languages', 1),
('coffee', 1),
('coffee/stats', 1),
('messages', 1),
('notes', 1),
('playground/coffee', 1),
('search', 1),
('work', 1),
('work/actions', 1),
('work/tags', 1),
('work/timeline', 1);
CREATE TABLE `groups` (
`id` varchar(255) NOT NULL,
`active` tinyint(1) UNSIGNED NOT NULL DEFAULT 1,
`date_created` int(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `keys` (
`id` varchar(255) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT 1,
`ref_user` varchar(255) DEFAULT NULL,
`expires` int(32) DEFAULT NULL,
`created` int(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `rel_users_groups` (
`ref_user` varchar(255) NOT NULL,
`ref_group` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `users` (
`id` varchar(255) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT 1,
`created` int(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `acl`
ADD KEY `endpoint` (`ref_endpoint`),
ADD KEY `ref_group` (`ref_group`);
ALTER TABLE `endpoints`
ADD PRIMARY KEY (`id`);
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`);
ALTER TABLE `keys`
ADD PRIMARY KEY (`id`),
ADD KEY `ref_user` (`ref_user`);
ALTER TABLE `rel_users_groups`
ADD KEY `ref_user` (`ref_user`),
ADD KEY `ref_group` (`ref_group`);
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
ALTER TABLE `acl`
ADD CONSTRAINT `acl_ibfk_1` FOREIGN KEY (`ref_endpoint`) REFERENCES `endpoints` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `acl_ibfk_2` FOREIGN KEY (`ref_group`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `keys`
ADD CONSTRAINT `keys_ibfk_1` FOREIGN KEY (`ref_user`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `rel_users_groups`
ADD CONSTRAINT `rel_users_groups_ibfk_1` FOREIGN KEY (`ref_user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `rel_users_groups_ibfk_2` FOREIGN KEY (`ref_group`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -1,19 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum ChassisTable: string {
use xEnum;
const NAME = "chassis";
case ID = "id";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case STORAGE_TWOINCHFIVE = "storage_2i5hi";
case STORAGE_THREEINCHFIVE = "storage_3i5hi";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,14 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum ChassisMbTable: string {
use xEnum;
const NAME = "config_chassis_mb";
case REF_CHASSIS_ID = "ref_chassis_id";
case REF_MB_ID = "ref_mb_id";
}

View file

@ -1,15 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum ConfigModel: string {
use xEnum;
const NAME = "config";
case REF_MB_ID = "ref_mb_id";
case FRIENDLY_NAME = "friendly_name";
case DATE_BUILT = "date_built";
}

View file

@ -1,24 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum SocketTypeEnum {
use xEnum;
case SLOTTED;
case INTEGRATED;
}
enum MbCpuCoolerModel: string {
use xEnum;
const NAME = "config_mb_cpu_cooler";
case REF_MB_ID = "ref_mb_id";
case REF_CPU_ID = "ref_cpu_id";
case REF_COOLER_ID = "ref_cooler_id";
case SOCKET = "socket";
case SOCKET_TYPE = "socket_type";
}

View file

@ -1,23 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum SocketTypeModel {
use xEnum;
case SLOTTED;
case INTEGRATED;
}
enum MbDramTable: string {
use xEnum;
const NAME = "config_mb_dram";
case REF_MB_ID = "ref_mb_id";
case REF_DRAM_ID = "ref_dram_id";
case SOCKET = "socket";
case SOCKET_TYPE = "socket_type";
}

View file

@ -1,14 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum MbGpuTable: string {
use xEnum;
const NAME = "config_mb_gpu";
case REF_MB_ID = "ref_mb_id";
case REF_GPU_ID = "ref_gpu_id";
}

View file

@ -1,14 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum MbPsuTable: string {
use xEnum;
const NAME = "config_mb_psu";
case REF_MB_ID = "ref_mb_id";
case REF_PSU_ID = "ref_psu_id";
}

View file

@ -1,25 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation\Config;
use vlw\xEnum;
enum MbStorageSlotFormfactorEnum: string {
use xEnum;
case TWODOTFIVE = "2.5";
case THREEDOTFIVE = "3.5";
case MDOTTWO = "M.2";
case EXTERNAL = "EXTERNAL";
}
enum MbStorageTable: string {
use xEnum;
const NAME = "config_mb_storage";
case REF_MB_ID = "ref_mb_id";
case REF_STORAGE_ID = "ref_storage_id";
case INTERFACE = "interface";
case SLOT_FORMFACTOR = "slot_formfactor";
}

View file

@ -1,16 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
enum CoolersTable: string {
const NAME = "coolers";
case ID = "id";
case TYPE_LIQUID = "type_liquid";
case SIZE_FAN = "size_fan";
case SIZE_RADIATOR = "size_radiator";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,31 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum ClassEnum {
use xEnum;
case DESKTOP;
case LAPTOP;
case SERVER;
}
enum CpuTable: string {
use xEnum;
const NAME = "cpu";
case ID = "id";
case CPU_CLASS = "class";
case CLOCK_BASE = "clock_base";
case CLOCK_TURBO = "clock_turbo";
case CORE_COUNT_PERFORMANCE = "core_count_performance";
case CORE_COUNT_EFFICIENCY = "core_count_efficiency";
case CORE_THREADS = "core_threads";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,37 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum DramFormfactorEnum {
use xEnum;
case DIMM;
case SODIMM;
}
enum DramTechnologyEnum {
use xEnum;
case DDR4;
case DDR5;
}
enum DramTable: string {
use xEnum;
const NAME = "dram";
case ID = "id";
case CAPACITY = "capacity";
case SPEED = "speed";
case FORMFACTOR = "formfactor";
case TECHNOLOGY = "technology";
case ECC = "ecc";
case BUFFERED = "buffered";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,20 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum GpuTable: string {
use xEnum;
const NAME = "gpu";
case ID = "id";
case MEMORY = "memory";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case VENDOR_CHIP_NAME = "vendor_chip_name";
case VENDOR_CHIP_MODEL = "vendor_chip_model";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,30 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum MbFormfactorEnum {
use xEnum;
case ATX;
case MTX;
case ITX;
case LAPTOP;
}
enum MbTable: string {
use xEnum;
const NAME = "mb";
case ID = "id";
case FORMFACTOR = "formfactor";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case NETWORK_ETHERNET = "network_ethernet";
case NETWORK_WLAN = "network_wlan";
case NETWORK_BLUETOOTH = "network_bluetooth";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,31 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum EightyplusRatingEnum {
use xEnum;
case BASE;
case BRONZE;
case SILVER;
case GOLD;
case PLATINUM;
case TITANIUM;
}
enum PsuTable: string {
use xEnum;
const NAME = "psu";
case ID = "id";
case POWER = "power";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case TYPE_MODULAR = "type_modular";
case EIGHTYPLUS_RATING = "80plus_rating";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -1,45 +0,0 @@
<?php
namespace VLW\Database\Tables\Battlestation;
use vlw\xEnum;
enum StorageDiskTypeEnum {
use xEnum;
case SSD;
case HDD;
}
enum StorageDiskInterfaceEnum {
use xEnum;
case SATA;
case NVME;
case USB;
}
enum StorageDiskFormfactorEnum{
use xEnum;
case TWODOTFIVE;
case THREEDOTFIVE;
case MDOTTWO;
}
enum StorageTable: string {
use xEnum;
const NAME = "storage";
case ID = "id";
case DISK_TYPE = "disk_type";
case DISK_SIZE = "disk_size";
case DISK_SECTORS = "disk_sectors";
case DISK_INTERFACE = "disk_interface";
case DISK_FORMFACTOR = "disk_formfactor";
case VENDOR_NAME = "vendor_name";
case VENDOR_MODEL = "vendor_model";
case DATE_AQUIRED = "date_aquired";
case IS_RETIRED = "is_retired";
}

View file

@ -0,0 +1,13 @@
<?php
namespace VLW\Database\Tables\Coffee;
use vlw\xEnum;
enum CoffeeTable: string {
use xEnum;
const NAME = "coffee";
case ID = "id";
}

View file

@ -0,0 +1,14 @@
<?php
namespace VLW\Database\Tables\Coffee;
use vlw\xEnum;
enum StatsTable: string {
use xEnum;
const NAME = "coffee_stats";
case COUNT_WEEK = "count_week";
case COUNT_WEEK_AVERAGE = "count_week_average";
}