Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

JianxinLi CoXier

:octocat:
Focusing
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
CoXier / java
Created May 18, 2019
Curl okhttp api request
View java
import okhttp3.*;
import okio.Buffer;
import java.io.IOException;
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;
View AspectRatioTextureView.java
import android.content.Context;
import android.os.Build;
import android.support.annotation.IntDef;
import android.support.annotation.RequiresApi;
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
CoXier / Android Studio 导入 AOSP.md
Last active Oct 21, 2017
Android Studio 导入 AOSP
View Android Studio 导入 AOSP.md
  • 生成 idegen.jar  mmm development/tools/idegen/ 注意使用 bash
  • 生成 android.ipr development/tools/idegen/idegen.sh

导入 Android Studio 后的常见问题:

  • 点击类名,跳转的是 class 文件,解决方法:进入 Project Structure->Modules,移除所有的依赖,只保留两个。具体参考:http://blog.csdn.net/yanbober/article/details/48846331
  • 资源路径找不到,如果 make 没有成功,那么 Android Studio 就无法找到资源。如果想看资源也是能找到的,如:frameworks/base/core/res/res/values/attrs.xml
@CoXier
CoXier / sqlite_viewer.sh
Created Sep 6, 2017
查看 Android 数据库
View sqlite_viewer.sh
#!/bin/bash
usage() { echo "Usage: $0 [-p <package_name>] [-d <databases_name>]" 1>&2; exit 1; }
while getopts ":p:d:" o; do
case "${o}" in
p)
p=${OPTARG}
;;
d)
d=${OPTARG}
;;
@CoXier
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
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@CoXier
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
CoXier / SimpleGestureListener.java
Created Feb 21, 2017
Android gesture detector
View SimpleGestureListener.java
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.