Skip to content

Instantly share code, notes, and snippets.

View pbaja's full-sized avatar

Piotr Baja pbaja

View GitHub Profile
@pbaja
pbaja / printer.cfg
Created June 13, 2021 20:13
Klipper configuration for Ender 3 with MKS Gen L board
# Ender 3
# MKS Gen L board (ATmega 2560)
# Titan Extruder (3:1 ratio)
# 1. Change serial path
# 2. Make sure "rotation_distance" in the "extruder" section is correct or modify
# 3. Make sure "dir_pin" is setup correctly in the "extruder" section
# 4. Make sure hotend fan is connected to the E1 connector (or change in the "heater_fan" section)
# 5. Have fun
@pbaja
pbaja / web.telegram.css
Created January 3, 2021 22:40
Dark style for web.telegram.org
:root
{
/* Text */
--text: #fff;
--chat-user-name: #288ce1; /* Username color in chat */
--chat-date-time: #444; /* Time color in chat message */
--chat-msg-status: var(--chat-user-name); /* Dot color on the left of the message if f.eg. message is unread */
--chat-service-msg: var(--chat-user-name); /* Service message color in chat, including date between days in chat */
--list-user-name: #fff; /* Username color in chat list */
/* Links */
@pbaja
pbaja / rarbg.css
Created January 3, 2021 22:33
Dark style for rarbg
@-moz-document regexp("https?:\\/\\/(rarbg\\.to|rarbgp2p\\.org).*") {
:root
{
/* Text */
--text: #fff;
--link: #c0c0c0;
/* Backgrounds */
--button: #4d68a6;
--bg2: #282828;
--bg1: #202020;
@pbaja
pbaja / movieschecker.py
Last active May 15, 2016 15:33
Checking for new movie episodes
#!/usr/bin/python3
import tvdb_api, yaml, sys, telegram, delayer
from datetime import datetime, timedelta
'''
'''
class Core(object):
@pbaja
pbaja / xiaomiprotocol.md
Last active February 23, 2023 12:35
Xiaomi Yi JSON Protocol Reverse Enginnering

Xiaomi Yi JSON Protocol Reverse Engineering

First, connect to your camera via WiFi. Then you can send data to 192.168.42.1:7878

HELP IS APPRICIATED

Get token

Request:

{"msg_id":257,"token":0}
import time, threading
#This class meant to be really simple, just delaying tasks
#But it got some nice features :)
'''
This example will repeat your function every 1 second, and stop doing that after 10 seconds:
from delayer import Delay