Skip to content

Instantly share code, notes, and snippets.

@mbodo
mbodo / k8s.md
Last active July 11, 2020 08:40
k8s.md

Kubernetes (K8s)

Installation Minikube KVM (WIP)

Installation of Minikube in KVM Centos7 VM image with --vm-driver=none

Installation KVM image

Create Centos 7 KVM Image

@mbodo
mbodo / systemd_service_hardening.md
Created October 17, 2019 07:28 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
ProtectHome=read-only
ProtectControlGroups=yes
ProtectKernelModules=yes
@mbodo
mbodo / add-certificate-to-java-cert-store.md
Created July 18, 2019 13:13 — forked from ArturDorochowicz/add-certificate-to-java-cert-store.md
Adding a certificate to JRE trusted certificates stores.

Add certificate to JRE trusted certificates store

The default JRE store is in:

<JRE>\lib\security\cacerts

Add a certificate with keytool:

<JRE>\bin\keytool.exe -importcert -file my-cert.cer -alias 'My cert' -keystore <JRE>\lib\security\cacerts
@mbodo
mbodo / pgp.md
Last active November 3, 2019 09:32 — forked from sepehr/pgp.md
PGP Guide

PGP Guide

GPG vs PGP

PGP can refer to two things:

The Pretty Good Privacy software originally written by Phil Zimmermann, and now owned by Symantec. The formats for keys, encrypted messages and message signatures defined by that software. These have now been formalised as the OpenPGP standard. The GPG software is an independent implementation of the OpenPGP standards, so you can use it to exchange encrypted messages with people using other OpenPGP implementations (e.g. Symantec's PGP).

@mbodo
mbodo / watchdog.md
Created February 27, 2019 09:06 — forked from Spindel/watchdog.md
Showing off the systemd watchdog in Python

Watchdogged

Place the service file (or a link to it) in /etc/systemd/system/ Place the watchdogged.py file somewhere ( and change the ExecStart portion in the .service to point at the file )

then do systemctl daemon-reload followed by systemctl start watchdogged.service

After this you can watch the progress using journalctl --follow -u watchdogged.service change the PROBABILITY variable to something else to watch it faster/later or succeed.

@mbodo
mbodo / vimdiff.md
Created February 14, 2019 08:07 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@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 / Linux - journalctl cheatsheet.md
Last active May 22, 2021 02:44
journalctl cheatsheet

Linux - journalctl cheatsheet

journalctl

Display logs with tail:

sudo journalctl -f

Sources: