Skip to content

Instantly share code, notes, and snippets.

Avatar

Mikal mikalv

View GitHub Profile
View orthodoxc++.md

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@mikalv
mikalv / ansible-summary.md
Created May 5, 2021 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick
View ansible-summary.md

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@mikalv
mikalv / postgresql-gssapi-freeipa.md
Created Apr 12, 2021 — forked from lucasgrelaud/postgresql-gssapi-freeipa.md
Setup GSSAPI auth for Postgresql with FreeIPA
View postgresql-gssapi-freeipa.md

Draft (will need a proper wording)

Register the Server against freeIPA

  • Install FreeIPA client
  • enroll as client

Register the Postgresql service for the server

# Change to root account 
$: sudo su
@mikalv
mikalv / README.md
Created Mar 27, 2021 — forked from looterz/README.md
UE4 Loading Screen with Progress
View README.md

This will only work in cooked builds with Event Driven Loader enabled (enabled by default). Currently this only shows the specified packages loading progress, but not dependant packages, which is an annoying issue since that is where most of the loading time is for maps.

View gist:92ceab9bb1d0016e45d8516530cda5c0

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 |

@mikalv
mikalv / ssh-ca.md
Created Dec 23, 2020 — forked from seanw2020/ssh-ca.md
How to configure and visualize an SSH CA
View ssh-ca.md

How to configure an SSH CA, with visuals

ssh certificates

SSH CA

For details, see "Mastering SSH", Second Edition, Chapter 14: Certificate Authorities. Also see 'man ssh-keygen': "ssh-keygen supports signing of keys to produce certificates that may be used for user or host authentication. Certificates consist of a public key, some identity information, zero or more principal (user or host) names and a set of options that are signed by a Certification Authority (CA) key. Clients or servers may then trust only the CA key and verify its signature on a certificate rather than trusting many user/host keys. Note that OpenSSH certificates are a different, and much simpler, format to the X.509 certificates used in ssl(8).

Create two CAs

Choose a computer to act as the CA. We'll call this the CA computer (not CA host, since "host" is overloaded here). In this examp

@mikalv
mikalv / ssh-ca.md
Created Dec 23, 2020 — forked from seanw2020/ssh-ca.md
How to configure and visualize an SSH CA
View ssh-ca.md

How to configure an SSH CA, with visuals

ssh certificates

SSH CA

For details, see "Mastering SSH", Second Edition, Chapter 14: Certificate Authorities. Also see 'man ssh-keygen': "ssh-keygen supports signing of keys to produce certificates that may be used for user or host authentication. Certificates consist of a public key, some identity information, zero or more principal (user or host) names and a set of options that are signed by a Certification Authority (CA) key. Clients or servers may then trust only the CA key and verify its signature on a certificate rather than trusting many user/host keys. Note that OpenSSH certificates are a different, and much simpler, format to the X.509 certificates used in ssl(8).

Create two CAs

Choose a computer to act as the CA. We'll call this the CA computer (not CA host, since "host" is overloaded here). In this examp

@mikalv
mikalv / prepare-commit-msg.sh
Created Dec 18, 2020 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
View prepare-commit-msg.sh
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
View ocserv-setup.md

openconnect vpn server

stek29 May 21 2018

Installing ocserv

Older version (0.10.11) is avaliable in ubuntu repos and it seems to work fine,
but I've built 0.12.1 from sources. This is not neccessary, but might be useful.
Describing building from source is out of scope of these instructions.

@mikalv
mikalv / libsodium_aes_gcm_example.exs
Created Dec 4, 2020 — forked from potatosalad/libsodium_aes_gcm_example.exs
Example usages of AES-GCM with libsodium
View libsodium_aes_gcm_example.exs
# Static Constants
plain_text = "test"
plain_text_size = byte_size(plain_text)
aad = "A256GCM" # AAD (Additional Authenticated Data)
####################################
# Example 1: Direct Key Encryption #
####################################
# In this example, the CEK must be known by the encryptor and decryptor (ie. a shared secret)