A simple Prometheus export that collect A/C target temperature & load power from Xiaomi Air Conditioning Companion.
It serves as a simple demo, you may expand it to other Mi devices & metrics. See python-miio's document.
#!/usr/bin/env python3 | |
import asyncio | |
from asyncio import StreamReader, StreamWriter | |
LISTEN = ('::', 8080) | |
WAIT_SECS = 3 | |
BUF_SIZE = 4096 | |
HTTP_RESPONSE = [ | |
'HTTP/1.1 200 OK', |
#!/usr/bin/env python3 | |
import sys | |
import socket | |
from subprocess import Popen, PIPE | |
def main(): | |
sock = socket.fromfd(3, socket.AF_INET, socket.SOCK_STREAM) | |
while True: |
diff --git a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java | |
index 1e5ed82..060b32f 100644 | |
--- a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java | |
+++ b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java | |
@@ -29,7 +29,7 @@ public final class UsbDeviceManager { | |
private transient UsbDevicePredicate deviceFiler = new UsbDevicePredicate() { | |
@Override | |
public boolean test(UsbDevice usbDevice) { | |
- return usbDevice.getVendorId() == 0x1050; | |
+ return usbDevice.getVendorId() == 0x1050 || usbDevice.getVendorId() == 0x20A0; |
A simple Prometheus export that collect A/C target temperature & load power from Xiaomi Air Conditioning Companion.
It serves as a simple demo, you may expand it to other Mi devices & metrics. See python-miio's document.
diff --git a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryDetailParser.java b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryDetailParser.java | |
index 27f9a671..1f541301 100644 | |
--- a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryDetailParser.java | |
+++ b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryDetailParser.java | |
@@ -73,7 +73,7 @@ public class GalleryDetailParser { | |
private static final GalleryTagGroup[] EMPTY_GALLERY_TAG_GROUP_ARRAY = new GalleryTagGroup[0]; | |
private static final GalleryCommentList EMPTY_GALLERY_COMMENT_ARRAY = new GalleryCommentList(new GalleryComment[0], false); | |
- private static final DateFormat WEB_COMMENT_DATE_FORMAT = new SimpleDateFormat("dd MMMMM yyyy, HH:mm z", Locale.US); | |
+ private static final DateFormat WEB_COMMENT_DATE_FORMAT = new SimpleDateFormat("dd MMMMM yyyy, HH:mm", Locale.US); |
#!/usr/bin/env python3 | |
"""Simple program that shows AQI on system tray as a colored pie chart. | |
It fetches PM_2.5 data via Graphite's HTTP API every minutes. | |
Required Python packages: | |
requests, pystray, Pillow | |
""" | |
import time | |
import webbrowser |
#!/usr/bin/env python3 | |
import asyncio | |
import logging | |
from aiohttp import web | |
from aiodnsresolver import Resolver, TYPES, DnsRecordDoesNotExist | |
from des import DesKey | |
TENCENT_KEYS = { |
// ==UserScript== | |
// @name E-Hentai Prefetch Next Page | |
// @namespace Violentmonkey Scripts | |
// @match https://e-hentai.org/s/* | |
// @match https://exhentai.org/s/* | |
// @grant none | |
// @version 0.2.0 | |
// @author sorz | |
// @description Prefetch image file on the next page for faster browsing. | |
// ==/UserScript== |
[Unit] | |
Description=Setup WireGuard link | |
After=network-online.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/wg-quick up %i | |
ExecStop=/usr/bin/wg-quick down %i |
#!/usr/bin/env python3 | |
"""GitHub New Release Checker | |
./check_release.py path/to/releases.ini | |
It fetches release tag from GitHub, then comparing it with the | |
old one in ini file. If tag changed, send a email to configured | |
address. | |
""" | |
import re |