Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-26 00:21:18 +00:00
parent 6c996bfa24
commit 69350c28ac
7 changed files with 238 additions and 0 deletions

22
tldr/confettysh Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# confettysh
> Display animated confetti and fireworks over SSH.
> See also: `ssh`.
> More information: <https://github.com/charmbracelet/confettysh>.
- Start a local `confettysh` server:
`confettysh`
- Run the server on a custom port:
`confettysh {{[-p|--port]}} {{2323}}`
- Connect to the local server and show fireworks:
`ssh {{[-p|--port]}} {{2222}} localhost -t fireworks`

41
tldr/docker-compose-down Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# docker compose down
> Stop and remove containers, networks, images, and volumes created by `docker compose up`.
> More information: <https://docs.docker.com/reference/cli/docker/compose/down/>.
- Stop and remove all containers and networks:
`docker compose down`
- Stop and remove containers, networks, and all images used by services:
`docker compose down --rmi all`
- Stop and remove containers, networks, and only images without a custom tag:
`docker compose down --rmi local`
- Stop and remove containers, networks, and all volumes:
`docker compose down {{[-v|--volumes]}}`
- Stop and remove everything including orphaned containers:
`docker compose down --remove-orphans`
- Stop and remove containers using an alternate compose file:
`docker compose {{[-f|--file]}} {{path/to/config}} down`
- Stop and remove containers with a custom timeout in seconds:
`docker compose down {{[-t|--timeout]}} {{timeout}}`
- Remove containers for services not defined in the Compose file:
`docker compose down --remove-orphans {{[-v|--volumes]}}`

41
tldr/docker-compose-logs Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# docker compose logs
> View output from containers in a Docker Compose application.
> More information: <https://docs.docker.com/reference/cli/docker/compose/logs/>.
- View logs for all services:
`docker compose logs`
- View logs for a specific service:
`docker compose logs {{service_name}}`
- View logs and follow new output (like `tail --follow`):
`docker compose logs {{[-f|--follow]}}`
- View logs with timestamps:
`docker compose logs {{[-t|--timestamps]}}`
- View only the last `n` lines of logs for each container:
`docker compose logs {{[-n|--tail]}} {{n}}`
- View logs from a specific time onwards:
`docker compose logs --since {{timestamp}}`
- View logs until a specific time:
`docker compose logs --until {{timestamp}}`
- View logs for multiple specific services:
`docker compose logs {{service1 service2 ...}}`

41
tldr/docker-compose-up Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# docker compose up
> Start and run Docker services defined in a Compose file.
> More information: <https://docs.docker.com/compose/reference/up/>.
- Start all services defined in the docker-compose file:
`docker compose up`
- Start services in the background (detached mode):
`docker compose up {{[-d|--detach]}}`
- Start services and rebuild images before starting:
`docker compose up --build`
- Start specific services only:
`docker compose up {{service1 service2 ...}}`
- Start services with custom compose file:
`docker compose {{[-f|--file]}} {{path/to/config}} up`
- Start services and remove orphaned containers:
`docker compose up --remove-orphans`
- Start services with scaled instances:
`docker compose up --scale {{service}}={{count}}`
- Start services and show logs with timestamps:
`docker compose up --timestamps`

37
tldr/kubectl-events Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl events
> Display resource events.
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_events/>.
- Show events in the default namespace:
`kubectl events`
- Show events in all namespaces:
`kubectl events {{[-A|--all-namespaces]}}`
- Watch events in a specific namespace:
`kubectl events {{[-w|--watch]}} {{[-n|--namespace]}} {{namespace}}`
- Show events for a pod in a specific namespace:
`kubectl events --for {{pod}}/{{pod_name}} {{[-n|--namespace]}} {{namespace}}`
- Show events for a resource in a specific namespace:
`kubectl events --for {{resource}}/{{resource_name}} {{[-n|--namespace]}} {{namespace}}`
- Show events for type `Warning` or `Normal`:
`kubectl events --types Warning,Normal`
- Output events in YAML format:
`kubectl events {{[-o|--output]}} yaml`

22
tldr/linux/valheim Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# Valheim
> Create and start a headless Valheim server.
> Note: Configure the server by editing a copy of the `start_server.sh` script.
> More information: <https://www.valheimgame.com/support/a-guide-to-dedicated-servers/>.
- Start the server:
`{{path/to/start_server.sh}}`
- Stop the server gracefully:
`<Ctrl c>`
- Start the server using the provided Docker script:
`{{path/to/docker_start_server.sh}} {{path/to/start_server.sh}}`

34
tldr/wishlist Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# wishlist
> SSH directory and multiplexer.
> Acts as a single entry point for connecting to SSH servers or Wish applications.
> More information: <https://github.com/charmbracelet/wishlist>.
- Explore SSH servers listed in your `~/.ssh/config` file (local mode):
`wishlist`
- Start Wishlist in server mode to provide remote access:
`wishlist {{[s|serve]}}`
- Use a custom configuration file:
`wishlist {{[-c|--config]}} {{path/to/config.yaml}}`
- Discover SSH endpoints using Zeroconf (mDNS/Bonjour):
`wishlist --zeroconf.enabled`
- Discover SSH nodes from DNS SRV records:
`wishlist --srv.domain {{example.com}}`
- Discover SSH nodes from a Tailscale tailnet:
`wishlist --tailscale.net={{tailnet_name}} --tailscale.key={{tskey-api-abc123}}`