-
Install the the
shadowsocks-libev
package from apt repository.sudo apt update sudo apt install shadowsocks-libev
-
Save
ss.json
as/etc/shadowsocks-libev/config.json
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class LiveEvent<T> : LiveData<T>() { | |
private var version = 0 | |
/** | |
* override hashCode and equals, | |
* so-that, [LiveData.removeObserver] still can work | |
*/ | |
private inner class ObserverWrapper<T>( | |
private val other: Observer<T> | |
) : Observer<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewModel_1 { | |
val name = LiveData<String>() | |
val gender = LiveData<Boolean>() | |
val loading = LiveData<Boolean>() | |
val errorMessage = LiveEvent<String>() | |
fun follow() { | |
api.follow(xxx) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
OlderNewer