Skip to content

Instantly share code, notes, and snippets.

View OctoNezd's full-sized avatar
:shipit:
that squirrel looks like a fish

Yan OctoNezd

:shipit:
that squirrel looks like a fish
View GitHub Profile
@OctoNezd
OctoNezd / coolixir.py
Last active May 1, 2023 13:03
AppDaemon App that creates MQTT AC controlled with OpenBeken IR MQTT device
import appdaemon.plugins.mqtt.mqttapi as mqtt
import ctypes
import json
import functools
def dict_inv(old):
new = {}
for value, key in old.items():
new[key] = value
@OctoNezd
OctoNezd / pull.py
Created April 16, 2023 09:28
Script to recover files from android phones using adb
# Requirements:
# pip install adbutils tqdm
# Tested on Huawei STF-L09 that randomly reboots when screen is on
import os
from tqdm import tqdm
import adbutils
adb = adbutils.AdbClient(host="127.0.0.1", port=5037)
adb.wait_for(state="device")
device = adb.device_list()[0]
@OctoNezd
OctoNezd / Bg changer.py
Last active April 11, 2017 10:52
Wallpaper changer for xfce4(gets pic from reddit)
import mimetypes
import os
import random
import subprocess
import configparser
import bs4
import gi
import gi.repository.Notify
import requests