nyxsite/index.php
2025-06-28 23:17:13 -05:00

212 lines
6 KiB
PHP

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>-88572</title>
<link href="assets/index.css" rel="stylesheet"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<?php
$skip_exts = [
"ico",
"png",
"jpg",
"css",
"js",
"webp",
"gif",
"svg",
"woff",
"woff2",
"ttf",
"eot",
"otf",
];
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$ext = pathinfo($path, PATHINFO_EXTENSION);
if (in_array($ext, $skip_exts)) {
return;
}
$filename = "visitorCount.txt";
$fp = fopen($filename, "r+");
if (flock($fp, LOCK_EX)) {
$count = (int)fread($fp, filesize($filename));
$count++;
rewind($fp);
fwrite($fp, (string)$count);
ftruncate($fp, ftell($fp));
fflush($fp);
flock($fp, LOCK_UN);
}
fclose($fp);
// display the count
echo "welcome, visitor number <strong>$count</strong>!";
?>
<h1>✧-88572</h1>
<p>
also known as "Nyx", code ▘▘▌▌▘▌▘▘▌▌▘▌.
it likes matrix, irc, xmpp, and other open chat protocols, privacy advocacy,
programming, federated protocols, and a lot more. it uses it/its when possible,
otherwise she/her when not possible (for example, non-english languages that
don't have the concept of it/its like this). it's very normal and can be trusted
around computers (no it can't). system of 2 (currently).
</p>
<h3>more about it</h3>
<p>
it speaks in 3rd person about itself. it also likes to write in all
lowercase often, and it's learning web development. it also has a
few projects in progress, those will be explained later in this page.
please don't use 2nd person "you" when referring to it (this only really
applies to languages where this is possible. if not, no big deal :D).
instead, use its name, or something along the lines of "that one". it's
very weird, will randomly go off on a tangent, make random sounds, or
other generally unusual things. it's a minor! keep that in mind while
interacting with it.
</p>
<h3>flags</h3>
<p>
<img src="/assets/88x31s/rainbow.png" alt="LGBTQ+ flag" width="88" height="31">
<img src="/assets/88x31s/agender.png" alt="Agender flag" width="88" height="31">
<img src="/assets/88x31s/lesbian.png" alt="Lesbian flag" width="88" height="31">
<img src="/assets/88x31s/trans.png" alt="Trans flag" width="88" height="31">
</p>
<h3>contact</h3>
<p>
this one has a few ways to be contacted:
</p>
<ul>
<li>
<a href="xmpp:nyx@everypizza.im">xmpp</a><br/> (not very active)
</li>
<li>
<a href="matrix:u/n:everypizza.im">matrix</a><br/> (pretty active)
</li>
<li>
discord: everypizza (most active)
</li>
</ul>
<h3>social media</h3>
<ul>
<li>
<a href="https://bsky.app/profile/nyx.everypizza.im">bluesky</a>
</li>
<li>
actually there isn't really anything else
</li>
</ul>
<h4>current project</h4>
<p>
learning .NET, along with C# (Microsoft Java)
</p>
<h3>music</h3>
<p>
<?php
$apiRoot = "https://api.listenbrainz.org";
$user = "everypizza";
$nowPlayingString = "";
$nowPlaying = false;
try {
$response = file_get_contents(
$apiRoot . "/1/user/" . urlencode($user) . "/playing-now"
);
if ($response === false) {
throw new Exception("Failed to fetch");
}
$data = json_decode($response, true);
if (empty($data["payload"]["listens"])) {
$nowPlayingString = "nothing is playing right now.";
} else {
$track =
$data["payload"]["listens"][0]["track_metadata"]["track_name"];
$artist =
$data["payload"]["listens"][0]["track_metadata"]["artist_name"];
$album =
$data["payload"]["listens"][0]["track_metadata"]["release_name"];
$nowPlaying = true;
$nowPlayingString =
"now playing for <b>" .
htmlspecialchars($user) .
"</b>: <b>" .
htmlspecialchars($track) .
"</b> by <b>" .
htmlspecialchars($artist) .
"</b> from <b>" .
htmlspecialchars($album) .
"</b>";
}
} catch (Exception $e) {
$nowPlayingString = "Failed to reach API";
}
echo $nowPlayingString;
?>
<br>
<small>
data is from listenbrainz.
</small>
</p>
<h3>skills</h3>
<ul>
<li>
php
</li>
<li>
xhtml
</li>
<li>
python
</li>
<li>
tailwind css
</li>
<li>
ui design
</li>
<li>
linux system administration
</li>
<li>
video editing
</li>
</ul>
<h3>buttons</h3>
<p>
<a href="https://lunakitpi.pages.gay/">
<img src="/assets/88x31s/lunakitpi.pages.gay.png" alt="voxel" width="88" height="31">
</a>
<a href="https://squarebowl.club">
<img src="/assets/88x31s/squarebowl.club.gif" alt="PlateNet" width="88" height="31">
</a>
<a href="https://voxel.fsky.io">
<img src="/assets/88x31s/voxel.fsky.io.webp" alt="voxel" width="88" height="31">
</a>
<a href="https://zayd.fsky.io">
<img src="/assets/88x31s/zayd.fsky.io.png" alt="voxel" width="88" height="31">
</a>
<a href="https://itycodes.org">
<img src="/assets/88x31s/itycodes.org.png" alt="Created by a robotgirl without
a heart. Against humanity, we unite." width="88" height="31">
</a>
<br/><br/>
<img src="/assets/88x31s/nyx.everypizza.im.webp" alt="Nyx" width="88" height="31">
<img src="/assets/88x31s/nyx.everypizza.im-2.png" alt="Nyx" width="88" height="31">
</p>
<footer>
<p>
this site was made in Vim and Emacs (with evil-mode). <br/>
quote: <i><?php echo shell_exec("fortune /srv/http/nyx/quotes"); ?></i>
</p>
</footer>
</body>
</html>