Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / Blogs.md
Last active May 5, 2025 13:14
BLOGS
@mjf
mjf / wmdm.md
Created September 5, 2023 11:49
What Metrices Do Measure? (Kinds of Metrices)

What Metrices Do Measure? (Kinds of Metrices)

Table 1:

Kind Time Label Value Measures
Zero nothing
First how
First what
Second what & how
@mjf
mjf / rfc-keywords-disclaimer-in-czech-language.md
Last active August 17, 2023 12:48
RFC - Keywords / Klíčová slova (překlad)

English

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174]
when, and only when, they appear in all capitals, as shown here.

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,

@mjf
mjf / get-interface-info.md
Created July 14, 2023 06:13
Get interface info
(
  echo -e 'INDEX,NAME,TYPE,KIND,LINK,LINDEX'
  sudo ip -all netns exec ip -details -j -p link show |
  sed '/^netns:/d' |
  jq -n '[inputs] | add' |
  jq -r '.[] | "\(.ifindex),\(.ifname),\(.link_type),\(.linkinfo.info_kind),\(.link),\(.link_index)"' |
  sort -unk1
) |
column -ts,
@mjf
mjf / README.md
Created May 31, 2023 05:38
TZ env var test
cc -o test test.c

Then compare

strace -Ttt ./test
@mjf
mjf / kubectl-scaleall
Last active May 12, 2023 10:04
kubectl-scaleall - Scale most deployments and stateful sets up or down
#! /bin/sh
# kubectl-scaleall - Scale most deployments and stateful sets up or down
# Copyright (C) 2023 Matous Jan Fialka, <https://mjf.cz/>
# Released under the terms of the "MIT" license
PROGRAM="${0##*/}"
VERSION='0.1.4'
LICENSE='MIT'
AUTHORS='2022 Matous Jan Fialka, <https://mjf.cz/>'
@mjf
mjf / fstab-uuidify
Last active May 10, 2023 06:37
fstab-uuidify
#! /bin/sh
# fstab-uuidify - change /dev to UUID entries in fstab(5)
# Copyright (C) 2023 Matous Jan Fialka, <https://mjf.cz/>
# Released under the terms of the "MIT" license.
# Usage: fstab2uuid /etc/fstab |tee /etc/fstab.new
oprobe=
if [ $UID -eq 0 ]; then
@mjf
mjf / security-overview-services.md
Last active September 19, 2023 08:42
Security Overview Services (SOS)

Security Overview Services (SOS)

Service Website Email DNS Browser Connection Comments (*)
Internet NL excellent
SSL Labs reliable
Hardenize great
Security Headers perfect
Mail Hardener valuable
DNS Spy informative
@mjf
mjf / .inputrc
Created February 2, 2023 09:38
inputrc - Readline configuration
$if mode=emacs
$if term=screen.xterm
set show-mode-in-prompt on
set emacs-mode-string \1\eP\e[6\ q\e\\\2
$endif
$endif
$if mode=vi
$if term=screen.xterm
set show-mode-in-prompt on
@mjf
mjf / .lftprc
Last active January 31, 2023 12:10
lftp(1) configuration
set cmd:prompt '\U \S\n$ '
set ftp:port-range 21000-21999
set ftp:sync-mode off
set ssl:verify-certificate on
debug 4
alias ledit 'local edit'
alias lls 'local ls'
alias nocertverify 'set ssl:verify-certificate off'