Skip to content

Instantly share code, notes, and snippets.

View filviu's full-sized avatar

Silviu Vulcan filviu

View GitHub Profile
# /root/.unison/10Documents.prf
# Create one config file for each folder, or add one per
# root folder and add subfolders via
# path = 10Documents
# path = 20Media
# To make this unison job load at machine startup use an init-script
# or systemd service such as
# https://gist.github.com/thunfischbrot/0b6a21a84f166c4fa74fc5df4a470b17
# local root to sync
@strarsis
strarsis / howto.md
Last active November 17, 2024 21:25
KeeAgent (for KeePass) on Bash on Windows / WSL (2)

Update (March 2023) (Last checked: Oktober 2024)

Side note: The latest edge build of KeeAgent plugin offers an option for creating a WSL compatible socket. This would be very handy. I already tried to use that socket, but the socket file is currently empty and ssh inside WSL 2 is unable to use it. This appears to be a very new, unreleased and unstable feature. I will follow the development of it and when it finally works (well, for me) I will update this HOWTO. But until then, please use the proven wsl-ssh-agent/npiperelay.exe approach below.

Thanks to the instructions for WSL 2 of the wsl-ssh-agent project, KeeAgent works great in WSL 2 now: https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility The approach uses minimal and well-maintained tools.

Mini-changelog

Format/result Command Output
YYYY-MM-DD_hh:mm:ss date +%F_%T 2017-10-16_21:47:43
YYYYMMDD_hhmmss date +%Y%m%d_%H%M%S 20171016_214743
YYYYMMDD_hhmmss (UTC version) date --utc +%Y%m%d_%H%M%SZ 20171016_124743Z
YYYYMMDD_hhmmss (with local TZ) date +%Y%m%d_%H%M%S%Z 20171016_214743JST
YYYYMMSShhmmss date +%Y%m%d%H%M%S 20171016214743
YYYYMMSShhmmssnnnnnnnnn date +%Y%m%d%H%M%S%N 20171016214743670195402
YYMMDD_hhmmss date +%y%m%d_%H%M%S 171016_214743
Seconds since UNIX epoch: date +%s 1508158063