Skip to content

Instantly share code, notes, and snippets.


JianxinLi CoXier

Block or report user

Report or block CoXier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
CoXier / java
Created May 18, 2019
Curl okhttp api request
View java
import okhttp3.*;
import okio.Buffer;
import java.nio.charset.Charset;
public class CurlLoggerInterceptor implements Interceptor {
private StringBuilder curlCommandBuilder;
private final Charset UTF8 = Charset.forName("UTF-8");
private String tag = null;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.TextureView;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
View 处理视频相关.md


ffmpeg -i input.mp4 -acodec copy -ss 00:00:14 -t 00:00:23 output.mp4

-ss:起始时间 -t: 总时间


ffmpeg -i input.mp4 -vf delogo=x=1035:y=40:w=210:h=80 no_log.mp4
CoXier / Android Studio 导入
Last active Oct 21, 2017
Android Studio 导入 AOSP
View Android Studio 导入
  • 生成 idegen.jar  mmm development/tools/idegen/ 注意使用 bash
  • 生成 android.ipr development/tools/idegen/

导入 Android Studio 后的常见问题:

  • 点击类名,跳转的是 class 文件,解决方法:进入 Project Structure->Modules,移除所有的依赖,只保留两个。具体参考:
  • 资源路径找不到,如果 make 没有成功,那么 Android Studio 就无法找到资源。如果想看资源也是能找到的,如:frameworks/base/core/res/res/values/attrs.xml
CoXier /
Created Sep 6, 2017
查看 Android 数据库
usage() { echo "Usage: $0 [-p <package_name>] [-d <databases_name>]" 1>&2; exit 1; }
while getopts ":p:d:" o; do
case "${o}" in
CoXier / Adb 常用命令.md
Last active Sep 6, 2017
Adb 常用命令
View Adb 常用命令.md

adb 常用命令


  • svc data enable/disable 开关移动网络
  • svc wifi enable/disable 开关 wifi


  • 拖出某一个 apk:
View Progurad Example
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in E:\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# For more details, see
# Add any project specific keep options here:
CoXier / LRUCache
Created Mar 10, 2017
A simple solution for LRUCache
View LRUCache
import java.util.HashMap;
* Created by coxier on 17-3-10.
public class LRUCache<K,V> {
private final class Node {
Node next;
Node pre;
CoXier /
Created Feb 21, 2017
Android gesture detector
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
* Created by CoXier on 17-2-21.
public class SimpleGestureListener extends GestureDetector.SimpleOnGestureListener {
private static final String TAG = "SimpleGestureListener";
You can’t perform that action at this time.