Skip to content

Instantly share code, notes, and snippets.

View meteozond's full-sized avatar
🚑
🌍

Alexander Klimenko meteozond

🚑
🌍
View GitHub Profile
@meteozond
meteozond / inadyn.sh
Last active August 16, 2024 02:56
Simple OpenWrt startup Inadyn init.d script /etc/init.d/inadyn
#!/bin/sh /etc/rc.common
# chmod +x /etc/init.d/inadyn
# /etc/init.d/inadyn enable
# /etc/init.d/inadyn start
START=50
STOP=50
USE_PROCD=1
[
{
"name": "sp84.left"
},
[
{
"x": 2.5,
"a": 6
},
"Esc",
interface BaseCreateWidgetParam {
show_level: hmUI.show_level
}
interface ImageParam extends BaseCreateWidgetParam{
/**
* The path of the image. Reference folder-structure structure.
*/
src: string
/**
@meteozond
meteozond / TemplateAtLayerChange.py
Last active February 18, 2022 17:56
Ulimaker Cura g-code template insertion PostPocessing script
# Copyright (c) 2022 Meteozond
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
import json
import traceback
from ..Script import Script
class TemplateAtLayerChange(Script):
@meteozond
meteozond / tor_transmission.sh
Last active February 16, 2022 20:03
Start Tramsission.app with Tor Bowser proxy on macos
open \
--env ALL_PROXY="socks5://127.0.0.1:9150" \
/Applications/Transmission.app
@meteozond
meteozond / right.layout.kbd.json
Last active December 19, 2023 07:42
Right layout of YMDK 75% SP84 (aka wheatfield/split75 and mt/split75) http://www.keyboard-layout-editor.com/#/gists/33730a57e0b35df9d58da662283ce3a9
[
[
{
"x": 0.5
},
"F7",
"F8",
"F9",
"F10",
"F11",
@meteozond
meteozond / sp84_left.kbd.json
Last active February 5, 2024 08:05
Left layout of YMDK 75% SP84 (aka wheatfield/split75 and mt/split75) http://www.keyboard-layout-editor.com/#/gists/c32946fa4b6e3d9fec0e4d1c67cbd649
[
{
"name": "sp84.left"
},
[
{
"x": 2.25,
"a": 6
},
"Esc",
@meteozond
meteozond / jupyter_sequence_diagram.py
Last active March 26, 2021 10:54
Jupyter generated sequence diagram
from IPython.core.display import display, HTML
from random import randint
def sequence_diagram(diagram):
d = randint(0,1000)
display(HTML(f'''
<script src="https://bramp.github.io/js-sequence-diagrams/js/webfont.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/snap.svg-min.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/underscore-min.js"></script>
<script src="https://bramp.github.io/js-sequence-diagrams/js/sequence-diagram-min.js"></script>
<div id="diagram{d}"></div>
@meteozond
meteozond / hombridge-plug.sh
Created September 13, 2020 07:26
HomeBridge bash curl plug controlling
# on
curl -X PUT
--data '{"characteristics":[{"aid": 6, "iid":10, "value": 1}]}' \
--header "authorization:031-45-154" \
--header "Content-Type:Application/json" \
http://localhost:53102/characteristics
# off
curl -X PUT
--data '{"characteristics":[{"aid": 6, "iid": 10, "value": 0}]}' \
@meteozond
meteozond / motion.sh
Created September 9, 2020 13:14
Start official motion-project docker container (no config fles provided)
docker run --detach \
--name motion \
--restart unless-stopped \
--privileged \
-v /dev:/dev \
-v /etc/motion:/usr/local/etc/motion \
-v /var/lib/motion/var/lib/motion \
-p 8001:8001 \
-p 8002:8002 \
motionproject/motion:latest \