bash
Execute a Node.js script that logs the string `"Hello World!"` to the console. This demonstrates running a simple inline JavaScript command in a Node.js environment and an example to print an escaped string to the console.
node
bash
Execute a Node.js script that logs the string `"Hello World!"` to the console. This demonstrates running a simple inline JavaScript command in a Node.js environment and an example to print an escaped string to the console.
node
bash
linux
Disables lingering for a specified user in the system. Note: Lingering allows a user's processes to continue running even after they log out. Disabling lingering stops this behavior.
loginctl
bash
Stops and removes a Docker container by name or ID provided as an argument.
docker
bash
Downloads a resource, resumes if partially downloaded, follows redirects, and saves it with the same name.
curl
bash
Removes unused Docker resources forcefully.
docker
bash
linux
Retrieve the total memory size from the output of free -h, focusing on the second-to-last line.
free
bash
linux
The code retrieves the number of CPU cores available on the system by filtering the output of the lscpu command with grep
lscpugrep
bash
This Bash script checks the connectivity to a specified host and port using nc (Netcat), and outputs the exit status of the connection attempt.
nc
bash
This script requires a user@host argument and a USER_PASSWORD environment variable. It uses sshpass to securely pass the password to ssh, allowing password-based authentication to the specified host.
sshpassssh
bash
Generates an RSA SSH key pair.
ssh-keygen
bash
ubuntu
This script sets up Docker on a Ubuntu system by updating the package list, installing necessary dependencies, adding Docker's GPG key, configuring the Docker repository, and installing Docker and related plugins. It also enables Docker to start on boot, adds the current user to the Docker group, and checks the installed Docker and Docker Compose versions.
apt-getinstallgpgchmodteesystemctlusermod
bash
kubernetes
This Bash script generates Helm chart templates using specified input values and outputs the results to a specified directory.
helm
bash
This Bash script converts a given input file to Markdown format and extracts media files, saving the output to a specified file.
pandoc
bash
kubernetes
This Bash script retrieves the names of evicted pods in a specified Kubernetes namespace, then deletes each of them.
kubectljq
bash
Generate a random alphanumeric string of 11 characters from /dev/urandom, filter it to include only letters and digits, and print the result. This code creates a new random password.
trhead
bash
linux
This script checks for the presence of a required user@host argument, then uses ssh-copy-id to copy the local SSH key to the specified remote host, requiring password authentication.
ssh-copy-id
bash
linux
List block devices along with their rotational status (rotational or non-rotational). This code helps identify whether a disk is an SSD (non-rotational) or HDD (rotational).
lsblk