Friday, July 9, 2021

Luks partitioning

 Partition Table: gpt
Disk Flags:  

Number  Start   End    Size   File system  Name  Flags
1      1049kB  211MB  210MB  fat32              boot, esp
2      211MB   735MB  524MB  ext4               legacy_boot
3      735MB   512GB  511GB


Partition 1 mount point = /boot/efi

Partition 2 mount point = /boot

Partition 3 = luks

GRUB string:

sudo vim /etc/default/grub


linux   /vmlinuz-5.12-x86_64 root=UUID=xxx-uuid-of-root-ext4-fs-xxx rw  quiet cryptdevice=UUID=luks-partition-uuid:mapped-to-name:allow-discards root=/dev/mapper/mapped-to-name udev.log_priority=3 rd.luks.options=discard

update-grub

Thursday, July 8, 2021

fix sddm (kde mankaro) keyboard layout on unlock

 /usr/share/sddm/scripts/Xsetup

 

#!/bin/sh
# Xsetup - run as root before the login dialog appears

setxkbmap us
 

Wednesday, July 7, 2021

Fix SDDM keyboard layout for password (KDE Manjaro)

 sudo vim /usr/share/sddm/scripts/Xsetup

setxkbmap us

 

Wednesday, June 23, 2021

Text templates, code generation

 Python: wheezy.template

@def indent(lines, sep):
@sep.join(lines.split('\n'))
@end

@def body():
function body;
statement2;
@end

@def func(name):
    func @name {
        @body()
        @indent('1\n2\n3\n', '\n        ')
        @indent(body(), '\n        ')
    }
@end


@func('hello')


Java: StringTemplate4

Sunday, March 28, 2021

Compare directories GUI

 KDiff3

https://apps.kde.org/en/kdiff3

gpg encryption/decryption

Encrypt:

 gpg --no-symkey-cache -c cd2.iso

Decrypt:
 gpg --no-symkey-cache -o cd2.iso -d cd2.iso.gpg

Monday, March 8, 2021

Old dos/windows archive files decompression with correct file names

 unar -o temp -encoding cp866 my-old-arch.zip