Skip to content

Instantly share code, notes, and snippets.

View kumekay's full-sized avatar

Sergei Silnov kumekay

View GitHub Profile
@kumekay
kumekay / ms_to_do_to_todo_txt.py
Created May 18, 2025 21:02
Export Microsoft To-Do tasks to todo.txt text format
import msal
import requests
import json
import os
import atexit
from dotenv import load_dotenv
from datetime import datetime
# --- Configuration ---
# Load environment variables from .env file
@kumekay
kumekay / Miryoku.ahk
Last active November 17, 2024 12:05
AutoHotkey srcipt for mac-like shortcuts I use on crabapplepad.
#Requires AutoHotkey v2.0
; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
; SendMode Input ; Recommended for new scripts due to its superior speed and reliability."
; SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Docs:
; https://autohotkey.com/docs/Hotkeys.htm
; https://autohotkey.com/docs/KeyList.htm
; Ref https://autohotkey.com/board/topic/60675-osx-style-command-keys-in-windows/
@kumekay
kumekay / cors.json
Created September 22, 2021 11:59
S3 apply CORS
{
"CORSRules": [
{
"AllowedOrigins": ["*"],
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET"],
"MaxAgeSeconds": 3000 }
]
}
@kumekay
kumekay / .config
Created April 1, 2021 18:57
WSL2 4.19.104-microsoft-standard with USB and USPIP support
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.19.104 Kernel Configuration
#
#
# Compiler: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90300
freepbx-app | Finished updating libraries!
freepbx-app | Generating CSS...Done
freepbx-app | Module pm2 version 15.0.3.7 successfully installed
freepbx-app | Updating Hooks...Done
freepbx-app | Chowning directories...Done
freepbx-app | Changing "SHOWLANGUAGE" from [0] to [1]
freepbx-app | ** [freepbx] Module Install: ucp
freepbx-app | No repos specified, using: [standard] from last GUI settings
freepbx-app |
freepbx-app | Downloading module 'ucp'

Create Root Certificate Authority and self-signed certificate for your Home Assistant. Compatible with Chrome browser > version 58 and macOS 10.15 Catalina

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@kumekay
kumekay / lvm-extend.sh
Created September 28, 2019 13:09
Extend root lvm partition on ubuntu 18.04
#! /bin/sh
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
node_modules
dist_electron
log
build
.pioenvs
.piolibdeps
import ctypes
from ctypes import wintypes, windll
CSIDL_LOCAL_APPDATA = 28
_SHGetFolderPath = windll.shell32.SHGetFolderPathW
_SHGetFolderPath.argtypes = [wintypes.HWND,
ctypes.c_int,
wintypes.HANDLE,
wintypes.DWORD, wintypes.LPCWSTR]
@kumekay
kumekay / photos_to_video.sh
Created November 3, 2018 17:14
ffmpeg photo series to video
ffmpeg -r 3 -pattern_type glob -i '*.jpg' -c:v libx264 -vf "fps=25,format=yuv420p" video.mp4