Skip to content

Instantly share code, notes, and snippets.

Avatar

LanderlYoung LanderlYoung

  • Tencent.
  • Shenzhen City, Guang Dong province, R.P China
View GitHub Profile
View make.sh
#! /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
@LanderlYoung
LanderlYoung / build.gradle
Created Sep 27, 2016
instant-run gradle config
View build.gradle
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 Nov 27, 2016 — forked from dahlia/lisp.rb
30 minutes Lisp in Ruby
View lisp.rb
# 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,
@LanderlYoung
LanderlYoung / README.md
Created Oct 10, 2017 — forked from zhiguangwang/README.md
Installing and running shadowsocks on Ubuntu Server
View README.md

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 / to-nine-patch.py
Last active Jan 19, 2018
convert image file to nine-patch and remove duplicate pixels
View to-nine-patch.py
#!/usr/bin/env python
# encoding: utf-8
# depends on
# pip install pillow numpy
from PIL import Image
import numpy as np
import sys
View init.sh
#! /usr/bin/env bash
#author taylorcyang@tencent.com
#download project
git clone https://github.com/Bilibili/ijkplayer.git
#enter work directory
cd ijkplayer
@LanderlYoung
LanderlYoung / ramdisk
Last active Aug 22, 2018
Create a RAM disk on macOS to boost up android project building.
View ramdisk
#!/bin/bash
#########################################################################
# File Name: ramdisk.sh
# Author: Landerl Young
# e-Mail: LanderlYoung@gmail.com
# Created Time: Wed Aug 22 15:08:28 2018
#########################################################################
VOLUME=RAM_DISK
RAMDISK_LOCATION=/Volumes/$VOLUME
View module.sh
#! /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 / ktd.kts
Last active Sep 28, 2018
Multi Thread Http Downloader implemented in kotlin script
View ktd.kts
#! /usr/bin/env kscript
@file:DependsOn("com.xenomachina:kotlin-argparser:2.0.7")
@file:DependsOn("me.tongfei:progressbar:0.7.1")
import com.xenomachina.argparser.ArgParser
import com.xenomachina.argparser.InvalidArgumentException
import com.xenomachina.argparser.SystemExitException
import com.xenomachina.argparser.default
View ArrayMap ClassCastException.md

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