Skip to content

Instantly share code, notes, and snippets.

@doneykoo
doneykoo / adb_pull_pkg.sh
Last active October 14, 2025 06:40
adb pull export app package
# list all
adb shell pm list packages>pkgs.txt
# list by some keyword
adb shell pm list packages | grep {someName}>pkgs.txt
# get full path on mobile device
adb shell pm path {pkgName}
# pull export by path, to your local drive
@doneykoo
doneykoo / JenkinsFile-git-push.groovy
Last active August 26, 2025 08:32
git push tag in Jenkins pipeline script, with correct credential from Job configuration
bat("git tag -a ${tagName} -m \"${tagMessage}\"")
// Command line git push may fail, as it's not using correct credential from Job configuation.
// bat("git push origin refs/tags/${tagName}")
// Use plugin: Git Push
// @summary: the plugin will push (tags included) to remote.
// @param gitScm: variable `scm` exists as our job is using pipeline from SCM.
// @param targetBranch: use branch of current build.
@doneykoo
doneykoo / make-qrcode.sh
Last active August 12, 2025 03:12
python qrcode command line
# install packages (in command line)
pip install qrcode Pillow
# enter python command line mode (i.e., interactive mode in a console)
python
# or maybe py, python3
# run following code in python command line mode
import qrcode
qrcode.make('YourText').save('qr.png')
@doneykoo
doneykoo / VSCode keymap for Rider.xml
Created November 5, 2024 17:43
VSCode keymap for Rider
<keymap version="1" name="VSCode for Rider" parent="VSCode">
<action id="AIAssistant.Editor.CompleteCodeWithAI" />
<action id="ActivateProjectToolWindow">
<keyboard-shortcut first-keystroke="shift ctrl e" />
<keyboard-shortcut first-keystroke="alt 1" />
</action>
<action id="Annotate">
<keyboard-shortcut first-keystroke="alt b" />
</action>
<action id="Back">
@doneykoo
doneykoo / device_infos.bat
Created February 19, 2024 14:28
show device system infomations, like cpu bios os serial numbers and identifers, with wmic, on windows
:: CPU序列号
wmic cpu get processorid
:: 主板序列号
wmic baseboard get serialnumber
:: BIOS序列号
wmic bios get serialnumber
:: 操作系统序列号
wmic os get serialnumber
:: 机器名, 机型
wmic computersystem get name, model
@doneykoo
doneykoo / unix2dos_crlf.bat
Last active February 19, 2024 14:25
traverse files recursively with certain extensions in windows folder, and unix2dos convert line endings to crlf
@echo off
setlocal
set "target_directory=%~1"
shift
set "extensions=%*"
if not defined target_directory (
goto ShowUsage
)
@doneykoo
doneykoo / UnityUI2019to2018.sed
Last active April 22, 2021 06:58 — forked from desplesda/UnityUI2019to2018.sed
A sed script that fixes Unity UI component references when downgrading from 2019.3 to earlier versions.
# UnityUI2019to2018.sed
#
# Jon Manning (@desplesda) 2020
#
# Replaces instances of Unity UI components that refer to the package version of Unity UI (2019.3+), as opposed to the built-in version of Unity (2019.2 and earlier). Can be used on .prefab and .scene files.
#
# Usage: sed -f UnityUI2019to2018.sed SceneOrPrefab2019.unity > SceneOrPrefab2018.unity
# Button
s/m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}/m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
@doneykoo
doneykoo / GitConfigHttpProxy.md
Last active October 30, 2020 14:59 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: