Skip to content

Instantly share code, notes, and snippets.

View sairon's full-sized avatar
🇺🇦

Jan Čermák sairon

🇺🇦
View GitHub Profile
@sairon
sairon / filter_esp32_upload_autosuspend.py
Created August 16, 2022 21:30
PlatformIO monitor filter to suspend serial monitor on firmware upload (in a hacky way)
import inspect
import sys
from platformio.public import DeviceMonitorFilterBase
class ESP32UploadAutosuspend(DeviceMonitorFilterBase):
NAME = "esp32_upload_autosuspend"
# 32: "boot:0x0 (DOWNLOAD_BOOT(UART0/UART1/SDIO_FEI_FEO_V2))"
@sairon
sairon / aliexpress_shipping.user.js
Last active July 18, 2021 15:51
AliExpress Shipping Inspector - show all available shipping methods and on-time delivery promise in search results
// ==UserScript==
// @name AliExpress Shipping Inspector
// @version 2
// @include https://www.aliexpress.com/wholesale*
// @include https://www.aliexpress.com/w/wholesale*
// @grant GM.xmlHttpRequest
// ==/UserScript==
//
// Licensed as public domain under the terms of Unlicense <http://unlicense.org/>
@sairon
sairon / synology_rt1900ac_tune2fs.txt
Created November 3, 2016 14:28
Synology RT1900ac ext FS info
/ # for x in /dev/mmcblk0p*; do echo; echo; echo; echo $x; tune2fs -l $x; done
/dev/mmcblk0p1
tune2fs 1.42.6 (21-Sep-2012)
Filesystem volume name: 1.42.6-5757
Last mounted on: <not available>
Filesystem UUID: 377f3aca-cb69-47b2-b381-6b913785b70c
Filesystem magic number: 0xEF53
@sairon
sairon / synology_rt1900ac_bootlog.txt
Created November 3, 2016 13:57
Synology RT1900ac bootlog
U-Boot 2012.10-g1fc7c08-dirty (Aug 13 2015 - 15:02:42)
DEV ID = 0xcf1e
PCIE CFG DEV ID = 0x8022
OTP offset(0x8): 0x78f01c01
OTP offset(0x9): 0xfe280818
OTP offset(0xa): 0xc01b0
OTP offset(0xb): 0x0
OTP offset(0xc): 0x4400000
OTP offset(0xd): 0xbcede230
@sairon
sairon / xfce4-terminal-0.6.3.patch
Last active March 2, 2017 10:59
Remove a few annoying things in xfce4-terminal 0.6.3
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 8831573..e14f48b 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -2146,7 +2146,7 @@ terminal_screen_get_tab_label (TerminalScreen *screen)
screen->tab_label = gtk_label_new (NULL);
gtk_misc_set_padding (GTK_MISC (screen->tab_label), 2, 0);
- gtk_label_set_width_chars (GTK_LABEL (screen->tab_label), 10);
+ gtk_label_set_max_width_chars (GTK_LABEL (screen->tab_label), 40);
@sairon
sairon / CM-Mms-app-remove-CM-API.patch
Last active April 13, 2016 12:08
Remove references to CyanogenMod API from the CyanogenMod's Mms app, so it could be used on a generic Android system.
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 18ab431..42dcca0 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -322,7 +322,6 @@
android:permission="android.permission.SEND_SMS">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
- <action android:name="com.android.mms.action.REMOVE_BLACKLIST" />
</intent-filter>
@sairon
sairon / python_init.sh
Last active February 9, 2024 10:35
Simple OpenWrt procd init script for Python scripts
#!/bin/sh /etc/rc.common
# Copyright (C) 2015 CZ.NIC z.s.p.o. (http://www.nic.cz/)
START=99
STOP=0
USE_PROCD=1
SCRIPT="/root/pokus.py"
start_service() {