Skip to content

Instantly share code, notes, and snippets.

@tiiime
tiiime / tellphone.sh
Created December 2, 2020 05:55 — forked from harababurel/tellphone.sh
Small script for sending notifications to phone using kde-connect.
#!/bin/bash
command -v kdeconnect-cli >/dev/null 2>&1 || { echo >&2 "kdeconnect is not installed. Aborting."; exit 1; }
if [ $# -eq 0 ]; then
echo "Usage: $0 <message>"
exit 1
fi
device=`kdeconnect-cli -a --id-only 2>/dev/null | head`
@tiiime
tiiime / README.md
Created November 15, 2020 11:16
ESP32 && Windows Terminal

launch script setup

launch.bat

cd ${path to your esp-idf folder}

cmd.exe /k ""${path to your .espressif/idf_cmd_init.bat}" "PYTHON_PATH" "$GIT_PATH"" 
@tiiime
tiiime / README.md
Last active November 15, 2020 11:34
powershell

powershell setup

Install

Install-Module oh-my-posh -Scope CurrentUser
Install-Module posh-git -Scope CurrentUser
Install-Module PSFzf -Scope CurrentUser
@tiiime
tiiime / read
Last active September 18, 2020 01:34
用电脑连接 Android 手机看书
adb shell wm size reset
adb shell wm size 2440x1920
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
adb shell monkey -p com.jd.app.reader -c android.intent.category.LAUNCHER 1
scrcpy.exe -Sw
@tiiime
tiiime / animate.sh
Created July 31, 2020 05:48
adb set animate speed
#!/bin/bash
# Usage: animate.sh 1
adb shell settings put global window_animation_scale $1
adb shell settings put global transition_animation_scale $1
adb shell settings put global animator_duration_scale $1
@tiiime
tiiime / 整活.bat
Last active July 25, 2020 09:14
炉石整活(https://nga.178.com/read.php?&tid=21667647) 记事本编辑 另存 .bat 格式选择 ANSI
::来源 https://nga.178.com/read.php?&tid=21667647
@ECHO OFF
::防火墙规则名称(可修改)
set Rule_Name=LuShi
::断线时间(自行设置)
set Time_Out=5
::进程名称(无需修改)
set Soft_Name=Hearthstone.exe
@tiiime
tiiime / toggle_adb_layout_bound.sh
Last active April 7, 2023 09:43
toggle adb layout bound
#!/bin/bash
ENABLE=$(adb shell getprop debug.layout)
[[ "$ENABLE" == "false" ]] && ENABLE="true" || ENABLE="false"
# https://stackoverflow.com/a/50618460/4097210
# The number 1599295570 is called SYSPROPS_TRANSACTION
adb shell setprop debug.layout $ENABLE && adb shell service call activity 1599295570
@tiiime
tiiime / move2
Created May 19, 2020 03:34
move directory keep structure
# move2 -t dirA -e 'build\|dirA' -f ic.webp
while getopts "t:f:e:" opt
do
case "$opt" in
t ) targetDir="$OPTARG" ;;
f ) file="$OPTARG" ;;
e ) except="$OPTARG" ;;
esac
done
@tiiime
tiiime / Matrix.kt
Created May 11, 2020 03:32
android matrix ktx
operator fun Matrix.get(index: Int) = FloatArray(9).apply(::getValues)[index]
@tiiime
tiiime / disable-miui.sh
Last active October 19, 2020 03:53
disable miui package
adb -d shell pm disable-user --user 0 com.xiaomi.gamecenter
adb -d shell pm disable-user --user 0 com.android.browser
adb -d shell pm disable-user --user 0 com.miui.player
adb -d shell pm disable-user --user 0 com.miui.video
adb -d shell pm disable-user --user 0 com.android.fileexplorer
adb -d shell pm disable-user --user 0 com.mfashiongallery.ema