Skip to content

Instantly share code, notes, and snippets.

Fix magisk stock backup does not exist

# put stock boot.img into /sdcard/boot.img

# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 2)
@alswl
alswl / hosts
Last active August 24, 2025 12:53
(deprecated, I bought xiaomi VIP)hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 adv.sec.miui.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
@artlbv
artlbv / replacePDFtext.sh
Last active July 28, 2023 04:46
Batch replace text in PDF
#!/bin/bash
#!-----------------------------------
#! Replace "oldtext" with "newtext"
#! inside all pdf files in the directory.
@netmarkjp
netmarkjp / enable_rps.sh
Last active February 24, 2016 08:21
enable rps/rfs on centos6
#!/bin/bash
VAL_RPS_FLOW_CNT="32768"
VAL_RPS_SOCK_FLOW_ENTRIES="32768"
PROC_NUM=$(cat /proc/cpuinfo | grep -c ^processor)
VAL_RPS_CPUS=0
if [ ${PROC_NUM:?} -eq 1 ]
then
@ravageralpha
ravageralpha / fetchsub.sh
Created October 27, 2012 16:53
shell script get subtitle from shooter.cn
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:$(basename $0) [eng] files..."
}
[ $# -eq 0 ] && USAGE && exit 0
ERROR(){
@johntyree
johntyree / getBlockLists.sh
Last active August 30, 2025 06:36
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'