Skip to content

Instantly share code, notes, and snippets.

View LanderlYoung's full-sized avatar

LanderlYoung LanderlYoung

  • Tencent.
  • Shenzhen City, Guang Dong province, R.P China
View GitHub Profile
#! /usr/bin/env bash
#author taylorcyang@tencent.com
#download project
git clone https://github.com/Bilibili/ijkplayer.git
#enter work directory
cd ijkplayer
#! /usr/bin/env bash
#author taylorcyang@tencent.com
#def
IJK_PROJECT_DIR=ijkplayer
SO_LIB_PATH=android/ijkmediaplayer/libs/armeabi-v7a
PROJECT_LIBS_DIR=../libs/armeabi
#! /usr/bin/env bash
#--------------------
# Standard options:
export COMMON_FF_CFG_FLAGS=
# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --prefix=PREFIX"
# Licensing options:
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gpl"
# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-version3"
@LanderlYoung
LanderlYoung / build.gradle
Created September 27, 2016 09:01
instant-run gradle config
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@LanderlYoung
LanderlYoung / lisp.rb
Created November 27, 2016 16:06 — forked from dahlia/lisp.rb
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,

ArrayMap ClassCastException Deep Analyze

preface

I'm a developer of 企鹅FM. Our app constantly report ClassCastException on ArrayMap, some stack trace looks like this.

Intent i = new Intent(ACTION);
i.putExtra(KEY, VALUE); // crashes here
@LanderlYoung
LanderlYoung / README.md
Created October 10, 2017 05:18 — forked from zhiguangwang/README.md
Installing and running shadowsocks on Ubuntu Server

Installing and running shadowsocks on Ubuntu Server

16.10 yakkety and above

  1. Install the the shadowsocks-libev package from apt repository.

     sudo apt update
     sudo apt install shadowsocks-libev
    
  2. Save ss.json as /etc/shadowsocks-libev/config.json.

@LanderlYoung
LanderlYoung / linux_smap_analyzer.py
Created December 20, 2017 04:08
Linux /proc/<pid>/smaps analyzer python script
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
'''
analyze /proc/<pid>/smaps
doc
http://liutaihua.github.io/2013/04/25/process-smaps-analysis.html
@LanderlYoung
LanderlYoung / android_dump_java_heap.sh
Created December 20, 2017 04:09
script to dump android java heap and convert use hprof-conv
ADB=${ANDROID_HOME}/platform-tools/adb
HPROF_CONV=${ANDROID_HOME}/platform-tools/hprof-conv
# customized functions
# dump droid heap
function droid_hd() {
PACKAGE_NAME=$1
TIME=$(date +"%Y%m%d_%H%M%S")
FILE_NAME="${PACKAGE_NAME}-${TIME}-heap.hprof"
@LanderlYoung
LanderlYoung / to-nine-patch.py
Last active January 19, 2018 15:06
convert image file to nine-patch and remove duplicate pixels
#!/usr/bin/env python
# encoding: utf-8
# depends on
# pip install pillow numpy
from PIL import Image
import numpy as np
import sys