Skip to content

Instantly share code, notes, and snippets.

@mbodo
mbodo / kvm.md
Last active April 5, 2024 04:48
KVM Cheatsheet

QEMU/KVM Cheatsheet

Create KVM image with virt-build

cd /var/lib/libvirt/qemu/

sudo virt-builder fedora-26 \
--arch x86_64 \
--size 20G \
-m 8192 \
@mbodo
mbodo / Linux - Systemd cheatsheet.md
Last active March 15, 2024 18:25
Systemd cheatsheet

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

@mbodo
mbodo / openssl_commands.md
Last active September 26, 2023 07:20 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@mbodo
mbodo / fedora-kind-podman-rootless.md
Last active June 29, 2023 12:00
Fedora 38 installation of kind + podman rootless
@mbodo
mbodo / OpenSSH_cheatsheet.md
Last active June 8, 2023 13:25
OpenSSH Cheatsheet

SSH RSYNC SSHFS Cheatsheet

SSH

Generate RSA 4096 bit key

ssh-keygen -f ~/.ssh/my_key_rsa -t rsa -b 4096

Check is ssh-agent is running

@mbodo
mbodo / script-template.sh
Created December 15, 2020 12:34 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
@mbodo
mbodo / git-change-commit-messages.md
Created April 8, 2022 19:47 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@mbodo
mbodo / Tmux - Shortcuts & Cheatsheet.md
Last active April 1, 2022 17:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

Tmux -Shortcuts & Cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mbodo
mbodo / how-to-generate-and-use-private-keys-with-openssl-tool.md
Created October 22, 2020 07:13 — forked from briansmith/how-to-generate-and-use-private-keys-with-openssl-tool.md
How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use