Skip to content

Instantly share code, notes, and snippets.

View kumekay's full-sized avatar

Sergei Silnov kumekay

View GitHub Profile
@kumekay
kumekay / WinKeysForMacUser.ahk
Last active October 11, 2024 20:57
AutoHotkey srcipt for mac-like shortcuts I use on crabapplepad.
#Requires AutoHotkey v2.0
; Mainly from: https://gist.github.com/ascendbruce/677c3169259c975259045f905cd889d6?permalink_comment_id=5182071#gistcomment-5182071
; #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
@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
@kumekay
kumekay / change_eb_ruby_version.sh
Last active March 19, 2019 21:41 — forked from januszm/change_eb_ruby_version.sh
Change Ruby minor version in AWS Elastic Beanstalk
# Currently (03.2019) it's not possible to change the Ruby 'minor' version (eg. 2.3 => 2.4) using the web console
# However, it's possible using the 'awscli' tool.
# List of available platforms: https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.ruby
brew install awscli # pip install awscli
aws elasticbeanstalk update-environment \
--solution-stack-name "64bit Amazon Linux 2018.03 v2.9.1 running Ruby 2.6 (Puma)" \
--environment-name "***-dev-web" --region "us-east-1" --profile "***-dev"