Skip to content

Instantly share code, notes, and snippets.

LanderlYoung LanderlYoung

  • Tencent.
  • Shenzhen City, Guang Dong province, R.P China
Block or report user

Report or block LanderlYoung

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
@LanderlYoung
LanderlYoung / WcdbSqlDriver.kt
Created Jan 18, 2019
This is a WCDB driver for sqldeight
View WcdbSqlDriver.kt
/*
* Copyright (C) 2018 Square, Inc.
* Copyright (C) 2019 taylorcyang@tencent.com
* Copyright (C) 2019 landerlyoung@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@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
@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
@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
@LanderlYoung
LanderlYoung / android_dump_java_heap.sh
Created Dec 20, 2017
script to dump android java heap and convert use hprof-conv
View android_dump_java_heap.sh
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 / linux_smap_analyzer.py
Created Dec 20, 2017
Linux /proc/<pid>/smaps analyzer python script
View linux_smap_analyzer.py
#!/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 / 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.

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
@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 / 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
You can’t perform that action at this time.