Skip to content

Instantly share code, notes, and snippets.

View Lehmaning's full-sized avatar
🌴
On vacation

Berserk Lehmaning

🌴
On vacation
View GitHub Profile
@Lehmaning
Lehmaning / %CMDER_ROOT%\config\user_aliases.cmd
Last active December 3, 2021 07:46
Command 'ssh-copy-id' in Windows (cmder)
REM ...
ssh-copy-id=type %USERPROFILE%\.ssh\id_rsa.pub | ssh $* "cat >> .ssh/authorized_keys"
:: References:
:: ssh-copy-id in Windows - https://www.chrisjhart.com/Windows-10-ssh-copy-id/
:: Parameter with Cmder aliases- https://github.com/cmderdev/cmder/issues/376
@Lehmaning
Lehmaning / %CMDER_ROOT%\vendor\init.bat
Last active December 3, 2021 05:36
Cmder optimized initialization script
@echo off
:: What's the change:
:: set env 'GIT_INSTALL_ROOT' and env 'LANG'
:: lines under method ':CONFIGURE_GIT' and ':PATH_ENHANCE' are commented
:: line '%lib_base% cmder shell' under ':start' is commented
set CMDER_INIT_START=%time%
set GIT_INSTALL_ROOT=D:\Program Files\Git
set LANG=zh_CN.UTF-8
@Lehmaning
Lehmaning / adb_pm_enable_all.sh
Last active December 3, 2021 07:45
To solve problems in Xiaomi phones.
sdcard=/storage/emulated/0
cd $sdcard
echo "$(pm -l)" > $sdcard/packageList.sh
sed -i "s/package:/pm enable --user 0 /g" $sdcard/packageList.sh
sh $sdcard/packageList.sh