Skip to content

Instantly share code, notes, and snippets.

View Mitrichius's full-sized avatar

Dmitry Kolosov Mitrichius

View GitHub Profile
@Mitrichius
Mitrichius / LanguageNonModalToggler.json
Last active November 5, 2021 14:29
Karabiner-Elements non-modal layout switcher (comlex modification rule)
{
"title": "Non-modal layout switcher",
"rules": [
{
"description": "CapsLock->RU, RightShift+CapsLock->EN",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock"
@Mitrichius
Mitrichius / gist:ceed0f0ebf1e5683c3bd72eeb0d4bb15
Created February 19, 2024 16:56
"On This Day" bash script for daily notes
MONTH_DAY=`date +'%m-%d'`
YEAR=`date +'%Y'`
> ${FILE_RESULT}
find "${DIR_PATH}" -maxdepth 1 -type f -name "*-${MONTH_DAY}.md" -type f ! -name "${YEAR}-${MONTH_DAY}.md" -print0 | while read -d $'\0' FILE
do
FILE_NAME=$(basename "${FILE}")
printf "\n\n---\n${FILE_NAME}\n---\n\n" >> ${FILE_RESULT}
cat "${FILE}" >> ${FILE_RESULT}