Commands: Cheat Sheet

List of commands that I use on my stacks such as Docker Linux, HTML and Raspberry Pi.

Commands: Cheat Sheet

Why Create a Cheat Sheet?

Leering new things always isn't easy especially in technology. It takes time, aptitude and the ability to understand through trial, error and repetition.

Starting a new language like Linux, YAML, and CSS is relatively new to me. So I made list of commands that I use on my stacks such as Docker Linux, HTML and Raspberry Pi.

This list will be updated as I learn new codes.

Last Updated: 5/2/2021

Linux

Here is a list of Linux code when using CLI in Debian, Ubuntu, Raspberry Pi and PowerShell.

Generate Random Numbers

This will generate a randomized unencrypted numbers by using Base64 OpenSSL. The number 48 is the random code amount that you wish you use by either increasing or decreasing the number randomization. You can use then when you are creating usernames or passwords, when you are using Docker Secrets.

openssl rand -base64 48

Shutdown System

Properly shutdown your system without using the CLI.

sudo shutdown -h now

Read code

Read code withiout using vim or nano.

cat [name]

Docker

List of docker codes

Docker Swarm

List the nodes in your swarm cluster. This will allow you to see the master node(s) and worker node(s).

docker node ls

Leave Docker Swarm

Force a swarm to leave.

docker swarm leave --force

Run a Secret

run a secret

/run/secrets/[secret_name]

Rotate a swarm

Error

docker swarm ca --rotate

Raspberry Pi

Raspicam commands
raspistill -o Desktop/image.jpg

raspivid -o Desktop/video.h264 -t 10000
sudo apt install -y gpac
MP4Box -add Desktop/video.h264 Desktop/video.mp4

HTML

List of docker HTML codes


CSS

List of docker CSS codes