Tuesday, February 9, 2021

Thoughts on photo/video files organizing

Directory structure pattern: "YYYY/YYYY-MM-DD-tag1-tag2/xxxxx.jpg"

Should the files be renamed on copying from the camera? If necessary rename only once -- before working with the files, importing them into darktable/digikam.

Do not use stars, flags, color labels, use text tags instead, store tags in .xmp files.

Use two tags like "edit" and "edit-TIMESTAMP" when tagging photos for a special temporary/one-time task like "print" and "print-20200109"... Keep those tags to track history.

Tag photos as "printed", "shared", "published", and with a the same word but with a timestamp "printed-20200109" etc. 

Tag photos to delete with "delete" tag, rather than using digikam's delete function.

Put videos into a subdirectory.

Mark for culling: 

Certain to keep: "pick-best" > "pick-good" > "pick-keep" 

Tentative: "pick-uncertain" > "pick-bad" > "pick-delete"

Sunday, February 7, 2021

Julia programming language notes

 julialang.org

https://docs.julialang.org/en/v1/manual/unicode-input/

https://benlauwens.github.io/ThinkJulia.jl/latest/book.html

 

Documentation is not clear,  big memory footprint (125MB RAM), slow to start first time on Windows.

The language is dynamic, no way to specify exactly function arguments and return value for a type (e.g. as a type of an argument to another function, or a type of a variable holding a function object).

An error can be spotted only during execution, e.g. if the return type does not match the type of the expression returned from the function.

Manjaro/archlinux drive encryption notes

https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration

Need to have normal ext4 boot partition, vfat EFI partition, and an encrypted partition. 

Kernel boot image must have dmcrypt support:

/etc/mkinitcpio.conf

...

HOOKS=(base udev autodetect keymap modconf block encrypt filesystems keyboard fsck)

...

/etc/default/grub:
GRUB_CMDLINE_LINUX="cryptdevice=UUID=88.-..888:cryptroot:allow-discards"


/etc/fstab: 

# /dev/mapper/cryptroot
UUID=111-11-...       /               ext4            rw,noatime      0 0

# /dev/nvme0n1p6
UUID=222-22-...       /boot           ext4            rw,relatime     0 0

# /dev/nvme0n1p2
UUID=333..          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
      0 0

 

Sunday, December 27, 2020

mount encfs on login on ubuntu

Install libpam-encfs.

Edit /etc/security/pam_encfs.conf : 

Recommended: comment out the line

encfs_default --idle=1 

This flag will unmount your encrypted folder after 1 minute of inactivity. If you are automounting this on login, you probably would like to keep this mounted for as long as you are logged in.

At the bottom, comment any existing demo entries and add:

#USERNAME SOURCE TARGET PATH ENCFS Options FUSE Options foo /home/foo/EncryptedFolder /home/foo/DecryptedFolder -v allow_other

Make sure to initialize EncryptedFolder with the same user password.

Also, if you see the following line, remove allow_root from the options. Otherwise, it will be in conflict with allow_other defined above.

fuse_default allow_root,nonempty


Next, edit /etc/fuse.conf: Uncomment:

user_allow_other

To test your config, open a new virtual terminal (e.g. Ctrl+Alt+F4) and login. You should see pam successfuly mount your EncFS folder.

Should be enough.


See more at https://wiki.archlinux.org/index.php/EncFS#Mount_at_login_using_pam_encfs


Wednesday, December 16, 2020

Manjaro mdns fix

Install and enable avahi service. Enable systemd-resolved.service:

systemctl status systemd-resolved.service

make a symbolic link:

sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf


Check:

getent hosts mypc.local

Friday, April 24, 2020

HP 6510b linux boot fix

If there are dkms errors on boot/blank screen with Intel x3100 etc. graphics, boot kernel with
 
video=SVIDEO-1:d

Windows rsync alternative

Copy all files recursively from drive D to E:\WinData subfolder:

Robocopy.exe D:\ E:\WinData /e /z /dcopy:DAT /xd "System Volume Information" /xd "$RECYCLE.BIN" /A-:SH

Fix hidden directory (robocopy bug):








attrib -s -h E:\WinData