aboutsummaryrefslogtreecommitdiff
path: root/www/content/notes/cheat-sheet.md
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2025-06-12 01:10:27 +0800
committercrupest <crupest@outlook.com>2025-06-12 01:51:58 +0800
commitf73bc958df4c0476ef9d3825c16727ab14b6c861 (patch)
treeac1e9a569bcd995ff26f8e350ddf252beadf2ba3 /www/content/notes/cheat-sheet.md
parent5bcdda2ef5fcb523483919deeaa51ddd58ada6bd (diff)
downloadcrupest-f73bc958df4c0476ef9d3825c16727ab14b6c861.tar.gz
crupest-f73bc958df4c0476ef9d3825c16727ab14b6c861.tar.bz2
crupest-f73bc958df4c0476ef9d3825c16727ab14b6c861.zip
feat(www): remove bash session prefix.
Diffstat (limited to 'www/content/notes/cheat-sheet.md')
-rw-r--r--www/content/notes/cheat-sheet.md84
1 files changed, 42 insertions, 42 deletions
diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md
index 11e900c..c37c1e3 100644
--- a/www/content/notes/cheat-sheet.md
+++ b/www/content/notes/cheat-sheet.md
@@ -16,9 +16,9 @@ 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
+```sh
+grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
+grub-mkconfig -o /boot/grub/grub.cfg
```
## (Private) My Service Infrastructure Management
@@ -29,14 +29,14 @@ All commands should be run at the project root path.
Script from <https://docs.deno.com/runtime/getting_started/installation/>
-```bash-session
-$ curl -fsSL https://deno.land/install.sh | sh
+```sh
+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]
+```sh
+docker run -it --rm -v "./data/git/user-info:/user-info" httpd htpasswd /user-info [username]
```
### Certbot
@@ -60,14 +60,14 @@ A complete command is `[prefix] [docker (based on challenge kind)] [command] [ch
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
+```sh
+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
@@ -76,59 +76,59 @@ For example, **test** create/expand/shrink with standalone server:
#### Setup SSL Certificates and Curl
-```bash-session
-# apt-get update
-# apt-get install ca-certificates curl
-# install -m 0755 -d /etc/apt/keyrings
+```sh
+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
+```bash
+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
+```sh
+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
+```bash
+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
+```sh
+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
+```sh
+systemctl enable docker
+systemctl start docker
+groupadd -f docker
+usermod -aG docker $USER
```
### Font Config