aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/.markdownlint.json6
-rw-r--r--www/.markdownlintrc4
-rw-r--r--www/assets/res/css/base.css18
-rw-r--r--www/assets/res/css/home.css6
-rw-r--r--www/assets/res/js/color-scheme.ts18
-rw-r--r--www/content/notes/cheat-sheet.md166
-rw-r--r--www/layouts/_default/baseof.html3
-rw-r--r--www/layouts/index.html23
8 files changed, 173 insertions, 71 deletions
diff --git a/www/.markdownlint.json b/www/.markdownlint.json
new file mode 100644
index 0000000..2811a59
--- /dev/null
+++ b/www/.markdownlint.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json",
+ "default": true,
+ "MD013": false,
+ "MD014": false
+}
diff --git a/www/.markdownlintrc b/www/.markdownlintrc
deleted file mode 100644
index 22879bc..0000000
--- a/www/.markdownlintrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "default": true
-}
-
diff --git a/www/assets/res/css/base.css b/www/assets/res/css/base.css
index c628271..06fcb4b 100644
--- a/www/assets/res/css/base.css
+++ b/www/assets/res/css/base.css
@@ -70,19 +70,6 @@ nav {
font-size: large;
}
-#slogan {
- color: white;
- width: 100%;
- padding: 0.5em 1em;
- text-align: center;
- background-color: dodgerblue;
- user-select: none;
-
- & > * {
- user-select: text;
- }
-}
-
#main-article {
position: relative;
left: 50%;
@@ -147,9 +134,4 @@ html[data-theme="dark"] {
& a:visited {
color:#abcac4;
}
-
- & #slogan {
- color: var(--body-fg-color);
- background-color: midnightblue;
- }
}
diff --git a/www/assets/res/css/home.css b/www/assets/res/css/home.css
index 3df42ff..60c9ac7 100644
--- a/www/assets/res/css/home.css
+++ b/www/assets/res/css/home.css
@@ -1,9 +1,3 @@
-#slogan {
- position: sticky;
- z-index: 1;
- top: 0;
-}
-
#avatar {
float: right;
}
diff --git a/www/assets/res/js/color-scheme.ts b/www/assets/res/js/color-scheme.ts
index db6a3aa..fb4accf 100644
--- a/www/assets/res/js/color-scheme.ts
+++ b/www/assets/res/js/color-scheme.ts
@@ -90,21 +90,3 @@ function next(): Scheme | null {
}
}
}
-
-window.addEventListener("load", () => {
- const slogon = document.getElementById("slogan")!
- let clicks: number = 0
-
- const reset = createResetTimer(() => {
- clicks = 0
- })
-
- slogon.addEventListener("click", () => {
- reset()
- clicks += 1
- if (clicks === 3) {
- saveScheme(next())
- clicks = 0
- }
- })
-})
diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md
index efb3b35..77e337d 100644
--- a/www/content/notes/cheat-sheet.md
+++ b/www/content/notes/cheat-sheet.md
@@ -4,11 +4,173 @@ date: 2025-04-01T23:09:53+08:00
lastmod: 2025-04-01T23:09:53+08:00
---
+## GRUB
+
Update GRUB after `grub` package is updated. Replace `/boot` with your mount
point of the EFI partition in `--efi-directory=/boot`. Replace `GRUB` with your
bootloader id in `--bootloader-id=GRUB`.
```bash-session
-grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
-grub-mkconfig -o /boot/grub/grub.cfg
+# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
+# grub-mkconfig -o /boot/grub/grub.cfg
+```
+
+## (Private) My Service Infrastructure Management
+
+All commands should be run at the project root path.
+
+### Install Deno
+
+Script from <https://docs.deno.com/runtime/getting_started/installation/>
+
+```bash-session
+$ curl -fsSL https://deno.land/install.sh | sh
+```
+
+### Add Git Server User / Set Password
+
+```bash-session
+$ docker run -it --rm -v "./data/git/user-info:/user-info" httpd htpasswd /user-info [username]
+```
+
+### Certbot
+
+A complete command is `[prefix] [docker (based on challenge kind)] [command] [challenge] [domains] [test] [misc]`
+
+| part | for | segment |
+| --- | --- | --- |
+| prefix | * | `docker run -it --rm --name certbot -v "./data/certbot/certs:/etc/letsencrypt" -v "./data/certbot/data:/var/lib/letsencrypt"` |
+| docker | challenge standalone | `-p "0.0.0.0:80:80"` |
+| docker | challenge nginx | `-v "./data/certbot/webroot:/var/www/certbot"` |
+| command | create/expand/shrink | `certonly` |
+| command | renew | `renew` |
+| challenge | standalone | `--standalone` |
+| challenge | nginx | `--webroot -w /var/www/certbot` |
+| domains | * | `[-d [domain]]...` |
+| test | * | `--test-cert --dry-run` |
+| misc | agree tos | `--agree-tos` |
+| misc | cert name | `--cert-name [name]` |
+| misc | email | `--email [email]` |
+
+For example, **test** create/expand/shrink with standalone server:
+
+```bash-session
+# docker run -it --rm --name certbot \
+> -v "./data/certbot/certs:/etc/letsencrypt" -v "./data/certbot/data:/var/lib/letsencrypt"` \
+> -p "0.0.0.0:80:80" \
+> certonly \
+> --standalone \
+> -d crupest.life -d mail.crupest.life \
+> --test-cert --dry-run
+```
+
+## System Setup
+
+### Debian setup
+
+#### Setup SSL Certificates and Curl
+
+```bash-session
+# apt-get update
+# apt-get install ca-certificates curl
+# install -m 0755 -d /etc/apt/keyrings
+```
+
+### Docker Setup
+
+#### Uninstall Packages Provided by Stock Repo
+
+```bash-session
+# for pkg in docker.io docker-doc docker-compose \
+> podman-docker containerd runc; do
+> apt-get remove $pkg;
+> done
+```
+
+#### Install Certs From Docker
+
+Remember to [setup ssl and curl](#setup-ssl-certificates-and-curl) first.
+
+```bash-session
+# curl -fsSL https://download.docker.com/linux/debian/gpg \
+> -o /etc/apt/keyrings/docker.asc
+# chmod a+r /etc/apt/keyrings/docker.asc
+```
+
+#### Add Docker Repos
+
+```bash-session
+# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
+> https://download.docker.com/linux/debian \
+> $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
+> tee /etc/apt/sources.list.d/docker.list > /dev/null
+```
+
+#### Install Docker Packages
+
+```bash-session
+# apt-get update
+# apt-get install docker-ce docker-ce-cli containerd.io \
+> docker-buildx-plugin docker-compose-plugin
+```
+
+#### Start And Enable Docker
+
+Remember to log out and log back to let user group change take effects.
+
+```bash-session
+# systemctl enable docker
+# systemctl start docker
+# groupadd -f docker
+# usermod -aG docker $USER
+```
+
+### Font Config
+
+```xml
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
+<fontconfig>
+
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>MiSans</family>
+ <family>Noto Color Emoji</family>
+ </prefer>
+ </alias>
+
+ <alias>
+ <family>serif</family>
+ <prefer>
+ <family>MiSans</family>
+ <family>Noto Color Emoji</family>
+ </prefer>
+ </alias>
+
+ <alias>
+ <family>Maple Mono</family>
+ <prefer>
+ <family>Maple Mono NF</family>
+ <family>Maple Mono</family>
+ </prefer>
+ </alias>
+
+ <alias>
+ <family>Noto Sans</family>
+ <prefer>
+ <family>Noto Sans</family>
+ <family>Noto Sans CJK SC</family>
+ </prefer>
+ </alias>
+
+ <alias>
+ <family>Noto Serif</family>
+ <prefer>
+ <family>Noto Serif</family>
+ <family>Noto Serif CJK SC</family>
+ </prefer>
+ </alias>
+
+</fontconfig>
```
diff --git a/www/layouts/_default/baseof.html b/www/layouts/_default/baseof.html
index 621aea1..6d00be5 100644
--- a/www/layouts/_default/baseof.html
+++ b/www/layouts/_default/baseof.html
@@ -19,9 +19,6 @@
{{ end }}
</head>
<body>
- <div id="slogan">
- <span>🙃The world is full of pain, but we can fix it with love!</span>
- </div>
{{ block "pre-article" .}}
{{ end }}
<article id="main-article">
diff --git a/www/layouts/index.html b/www/layouts/index.html
index e05af03..af3e11d 100644
--- a/www/layouts/index.html
+++ b/www/layouts/index.html
@@ -26,12 +26,9 @@
<hr />
<section>
<p>Welcome to my home page! Nice to meet you here! 🥰</p>
- <p>If you have something interesting to share with me, feel free to email me
- at <a rel="noopener noreferrer" href="mailto:crupest@crupest.life">crupest@crupest.life</a>.
- You can also create an issue in any of my repos
- on <a rel="noopener noreferrer" href="https://github.com/crupest">GitHub</a> to talk
- anything to me.
- </p>
+ <p>Feel free to contact me via my email address <a href="mailto:crupest@crupest.life">crupest@crupest.life</a>,
+ or just create an issue in any of my <a rel="noopener noreferrer" href="https://github.com/crupest">GitHub</a>
+ repos. I love talking with people a lot.</p>
<div id="links" class="mono-link">
goto:
<ul>
@@ -78,18 +75,4 @@
{{ end }}
</div>
</section>
- <hr>
- <section>
- <h2>Always Remember</h2>
- <figure class="citation">
- <blockquote>
- <p>Die Philosophen haben die Welt nur verschieden interpretiert, es kömmt aber darauf an, sie zu verändern.</p>
- <p><small>Translated from German:</small>
- The philosophers have only interpreted the world in various ways, the point is to change it.</p>
- </blockquote>
- <figcaption>
- <cite>Karl Marx, Theses on Feuerbach (1845)</cite>
- </figcaption>
- </figure>
- </section>
{{ end }}