Skip to content

Instantly share code, notes, and snippets.

View stefanJi's full-sized avatar
🎯
Focusing

Yang Ji stefanJi

🎯
Focusing
View GitHub Profile
@stefanJi
stefanJi / adblog.sh
Created November 2, 2021 02:39
adb logcat spical application log
package=$1
tag=$2
adb logcat --pid=`adb shell pidof -s ${package}` -v color '*:S' '${tag}:D'
@stefanJi
stefanJi / gist:0b2d27510ece621ebc473d8f75037efd
Created November 4, 2020 11:10
Docker 配置 Android SDK 环境, 也适应与 Linux 环境下
FROM ubuntu:20.04
ENV ANDROID_COMPILE_SDK=30
ENV ANDROID_BUILD_TOOLS=30.0.1
ENV ANDROID_NDK_VERSION=21.0.6113669
ARG ANDROID_SDK_VERSION=6609375
ENV ANDROID_SDK_ROOT /opt/android-sdk
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
@stefanJi
stefanJi / compile_android.sh
Created August 3, 2020 06:23
ffmpeg cross compile for android
#! /usr/bin/env bash
OPTIONS="--disable-shared \
--enable-static \
--disable-stripping \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-avdevice \
--disable-indevs \
@stefanJi
stefanJi / proguard.md
Created July 25, 2020 23:44
ProGuard outputs:
  • mapping.txt

Lists the mapping between the original and obfuscated class, method, and field names. This file is important when you receive a bug report from a release build, because it translates the obfuscated stack trace back to the original class, method, and member names. See Decoding Obfuscated Stack Traces for more information.

  • seeds.txt

Lists the classes and members that are not obfuscated

  • usage.txt
@stefanJi
stefanJi / application.js
Created May 3, 2020 00:58
hugo post image process. Resize, Center, FancyBox
let images = document.querySelectorAll('.article-entry img');
images.forEach(function (i) {
i.style.maxHeight = '450px'
i.style.maxWidth = '600px';
i.style.boxShadow = '2px 2px 8px 0px #888888';
i.style.borderRadius = '8px';
let a = document.createElement("a");
a.setAttribute("data-fancybox", "gallery");
a.setAttribute("href", i.getAttribute("src"));
a.setAttribute("data-caption", i.alt);
@stefanJi
stefanJi / application.js
Created May 3, 2020 00:58
hugo post image process. Resize, Center, FancyBox
let images = document.querySelectorAll('.article-entry img');
images.forEach(function (i) {
i.style.maxHeight = '450px'
i.style.maxWidth = '600px';
i.style.boxShadow = '2px 2px 8px 0px #888888';
i.style.borderRadius = '8px';
let a = document.createElement("a");
a.setAttribute("data-fancybox", "gallery");
a.setAttribute("href", i.getAttribute("src"));
a.setAttribute("data-caption", i.alt);
@stefanJi
stefanJi / application.js
Created May 3, 2020 00:58
hugo post image process. Resize, Center, FancyBox
let images = document.querySelectorAll('.article-entry img');
images.forEach(function (i) {
i.style.maxHeight = '450px'
i.style.maxWidth = '600px';
i.style.boxShadow = '2px 2px 8px 0px #888888';
i.style.borderRadius = '8px';
let a = document.createElement("a");
a.setAttribute("data-fancybox", "gallery");
a.setAttribute("href", i.getAttribute("src"));
a.setAttribute("data-caption", i.alt);
@stefanJi
stefanJi / animator_cancel_7.java
Created April 17, 2020 15:28
animator_cancel_7
public void cancel() {
if (isStarted()) {
ArrayList<AnimatorListener> tmpListeners = null;
if (mListeners != null) {
tmpListeners = (ArrayList<AnimatorListener>) mListeners.clone();
int size = tmpListeners.size();
for (int i = 0; i < size; i++) {
tmpListeners.get(i).onAnimationCancel(this);
}
}
@stefanJi
stefanJi / animator_cancel.java
Last active April 17, 2020 15:28
animator_cancel_android_8
public void cancel() {
if (isStarted()) {
ArrayList<AnimatorListener> tmpListeners = null;
if (mListeners != null) {
tmpListeners = (ArrayList<AnimatorListener>) mListeners.clone();
int size = tmpListeners.size();
for (int i = 0; i < size; i++) {
tmpListeners.get(i).onAnimationCancel(this);
}
}
public void attachBaseContext(Context paramContext) {
// Byte code:
// 0: aconst_null
// 1: astore_2
// 2: ldc 0
// 4: istore_3
// 5: aload_0
// 6: getfield mLauncherApplication : Lcom/x/mobile/y/LauncherApplication;
// 9: getfield mCurrentProcessStartupTime : J
// 12: lstore #4