Skip to content

Instantly share code, notes, and snippets.

@tobeylin
tobeylin / adb_commands.sh
Last active February 27, 2024 04:20
ADB Commands Cheat Sheet
# 取得裝置的解析度
# Physical size: 2880x1600
adb shell wm size
# 查看裝置的 dpi
# Physical density: 320
adb shell wm density
# 將裝置的 dpi 恢復為預設值
adb shell wm density reset
@tobeylin
tobeylin / git_commands.sh
Last active April 19, 2024 07:49
Git Commands Cheat Sheet
#### tag 相關的指令 ####
# 取得所有 remote 的 tag
git fetch --tags origin
# 列出所有的 tag
git tag
# 在 id 為 123456 的 commit 標上 tag
git tag -a v1.1.1 123456 -m "v1.1.1"
@tobeylin
tobeylin / TryCatchTest.java
Created September 11, 2017 05:44
The Rule for the Java Try-Catch-Finally
package com.kddi.android.UtaPass.data;
import org.junit.Test;
import static junit.framework.Assert.*;
public class TryCatchTest {
/*
* https://stackoverflow.com/a/30575991/4789876
@tobeylin
tobeylin / flow_chart_template.dot
Last active March 10, 2023 16:32
The graphviz template for flow chart.
digraph FlowChartName {
graph [
label = "FlowChartName"
rankdir = TB;
compound = true;
splines = ortho;
];
// Start, End
node [