Skip to content

Instantly share code, notes, and snippets.

View swift502's full-sized avatar

Jan Bláha swift502

View GitHub Profile
@swift502
swift502 / CzechAccentsPost.ahk
Last active August 4, 2025 12:21
AHK v2 script for writing Czech letter accents using Right Alt key combinations
#Requires AutoHotkey v2.0
Table := Map(
"a", "á", "á", "a",
"c", "č", "č", "c",
"d", "ď", "ď", "d",
"e", "ě", "ě", "é", "é", "e",
"i", "í", "í", "i",
"n", "ň", "ň", "n",
"o", "ó", "ó", "o",
@swift502
swift502 / CzechAccentsPre.ahk
Last active August 3, 2025 15:26
AHK v2 script for writing Czech letter accents using Right Alt key combinations
#Requires AutoHotkey v2.0
sendSymbol(lower, upper) {
isUpper := GetKeyState("Shift", "P") ^ GetKeyState("CapsLock", "T")
SendText isUpper ? upper : lower
}
RAlt & a:: sendSymbol("á", "Á")
RAlt & c:: sendSymbol("č", "Č")
RAlt & d:: sendSymbol("ď", "Ď")
@swift502
swift502 / wincompose.XCompose
Last active August 1, 2025 11:16
WinCompose config for Czech accents
<Multi_key> <a> : "á"
<Multi_key> <A> : "Á"
<Multi_key> <c> : "č"
<Multi_key> <C> : "Č"
<Multi_key> <d> : "ď"
<Multi_key> <D> : "Ď"
<Multi_key> <e> : "ě"
@swift502
swift502 / liquify.py
Created December 8, 2023 20:44
Krita liquify ten scripts binding
from krita import (
Krita,)
from PyQt5.QtWidgets import (
QApplication,
QDockWidget,
QToolButton)
def call_liquify():
app = Krita.instance()
@swift502
swift502 / Volume.ahk
Last active May 17, 2023 14:52
Volume hotkeys script for AutoHotkey 2.0
F6::Send "{Volume_Down}"
F7::Send "{Volume_Up}"
F8::Send "{Volume_Mute}"
@swift502
swift502 / PowerEase.cs
Last active August 1, 2025 15:00
Sine easing function with sharpness control
// Latex
// \sqrt{\frac{1+f*f}{1+\left(f*f*\cos\left(\pi x\right)*\cos\left(\pi x\right)\right)}}*\cos\left(\pi x\right)
public float Ease(float factor, float power = 1)
{
float p = power;
float cos = Mathf.Cos(factor * Mathf.PI);
float result = Mathf.Sqrt((1 + p * p) / (1 + (p * p * cos * cos))) * cos;
result *= 0.5f;
@swift502
swift502 / VColBake.py
Last active May 1, 2020 11:47
Baking emission color to vertex colors in Blender using Python
import bpy
import math
bpy.ops.object.mode_set(mode='VERTEX_PAINT')
bpy.ops.object.mode_set(mode='OBJECT')
obj = bpy.context.object
for face in obj.data.polygons:
mat = obj.material_slots[face.material_index].material