Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / online-interface-rename-systemd-networkd-udevd.md
Last active November 28, 2022 10:09
Online rename interface with Systemd Networkd and Udevd

Online rename interface with Systemd Networkd

  1. create .link file in for the interface to rename it to a name of choice:

    [Match]
    OriginalName=*
    MACAddress=<mac-address>
    

[Link]

@mjf
mjf / zimbra-9.0.0.bugfixes.md
Last active April 14, 2023 10:27
Fix Zimbra 9.0.0 GA 4325 for RHEL8 x86_64 20220629074359 NETWORK edition, Patch 9.0.0_P28-32 issues

Zimbra 9.0.0 GA 4325 Patch 28-32 Bugfixes

cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.7 (Green Obsidian)"
@mjf
mjf / postgres_emergency_vacuum_full_if_not_enough_space_is_left.md
Last active September 16, 2022 09:29
[Postgres] Reclaiming space from bloated table without enough space left

Reclaiming space from bloated table without enough space left

The vacuum full needs two-times the table size to perform on it because it first makes full physical copy of the table. If you are running out of space and in need of reclaiming the space occupated by dead tuples from a bloated database table but you can not because of lacking free space in the table's namespace here is how you can work around that (assuming you some additional disk space resources can be added to the server). It is also the least disruptive method of doing it (in comparison to the obvious dump and restore et cetera).

@mjf
mjf / postgres_ml_discussions.md
Last active September 15, 2022 11:12
Postgres ML discussions
@mjf
mjf / rust_blogs.md
Created September 7, 2022 08:51
Rust Language Related Blogs
@mjf
mjf / WTF [Zimbra].md
Created August 30, 2022 06:49
WTF [Zimbra]

3x run?! One rights after another?!

zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824
/opt/zimbra/bin/zmjava: line 59: /bin/java: No such file or directory
zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824
Killed
zimbra@zimbra:~$ zmprov modifyConfig zimbraMtaMaxMessageSize 1073741824
@mjf
mjf / phoenix.vim
Created August 15, 2022 22:15
Good Vim colorscheme (XTerm 256 colours)
set background=dark
hi clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'phoenix'
hi Normal ctermfg=250
@mjf
mjf / mysql_min_max_memory_consumption_calculation_example.md
Last active August 11, 2022 07:42
MySQL min/max memory consumption calculation example
                       Example Calculation
+------------------------------------------+--------------------+
|                          key_buffer_size |          16.000 MB |
|                         query_cache_size |          16.000 MB |
|                  innodb_buffer_pool_size |          64.000 MB |
|          innodb_additional_mem_pool_size |           8.000 MB |
|                   innodb_log_buffer_size |           8.000 MB |
+------------------------------------------+--------------------+
|                              BASE MEMORY |         112.000 MB |
@mjf
mjf / postgres_sql_state_code.conf.toml
Last active August 8, 2022 05:48
Postgres CSV log parser in Telegraf
# TODO: store just basename of the logfiles (in Starlark may be easy)
# TODO: include more information in tags (at least user_name and application_name?)
#
# INPUTS
#
[[inputs.tail]]
name_override = "postgres_sql_state_code"
@mjf
mjf / Postgres random articles.md
Last active October 7, 2022 08:40
Postgres random articles