Skip to content

Instantly share code, notes, and snippets.

View TedaLIEz's full-sized avatar

Jian Guo TedaLIEz

  • Microsoft, Suzhou
  • Wuhan, Hubei, China
View GitHub Profile
@TedaLIEz
TedaLIEz / memory_layout.md
Created November 15, 2017 03:13 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@TedaLIEz
TedaLIEz / build.gradle
Created February 22, 2017 15:11 — forked from vlad-kasatkin/build.gradle
jacoco task for espresso coverage
apply plugin: 'jacoco'
jacoco {
version "0.7.1.201405082137"
}
task jacocoTestReportAndroidTest(type: JacocoReport, dependsOn: "connectedAndroidTest") {
def coverageSourceDirs = [
'src/main/java'
]
group = "Reporting"
@TedaLIEz
TedaLIEz / CustomTypeAdapter.java
Created August 30, 2016 02:02 — forked from cmelchior/CustomTypeAdapter.java
Realm, GSON and primitive JSON arrays
// Make a custom Gson instance, with a custom TypeAdapter for each wrapper object.
// In this instance we only have RealmList<RealmInt> as a a wrapper for RealmList<Integer>
Type token = new TypeToken<RealmList<RealmInt>>(){}.getType();
Gson gson = new GsonBuilder()
.setExclusionStrategies(new ExclusionStrategy() {
@Override
public boolean shouldSkipField(FieldAttributes f) {
return f.getDeclaringClass().equals(RealmObject.class);
}