Skip to content

Instantly share code, notes, and snippets.

View baoyachi's full-sized avatar
🦀

baoyachi

🦀
  • hangzhou
  • 08:14 (UTC +08:00)
View GitHub Profile
@baoyachi
baoyachi / gist:1e864a09b8350ec2224f25c490a9101e
Created July 10, 2019 07:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@baoyachi
baoyachi / HttpClient.kt
Created December 8, 2016 09:28 — forked from bclymer/HttpClient.kt
Kotlin Realm Primitive Arrays Workaround
val realmIntArrayType = object : TypeToken<RealmIntArray>() {}.type
val realmLongArrayType = object : TypeToken<RealmLongArray>() {}.type
val realmStringArrayType = object : TypeToken<RealmStringArray>() {}.type
val gson = GsonBuilder()
.setExclusionStrategies(object : ExclusionStrategy {
override fun shouldSkipClass(clazz: Class<*>?): Boolean {
return false
}
override fun shouldSkipField(f: FieldAttributes?): Boolean {
@baoyachi
baoyachi / CustomTypeAdapter.java
Created December 8, 2016 09:27 — 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);
}
@baoyachi
baoyachi / git and git flow tutorials
Created November 10, 2016 07:21
Git 跟 Git flow的教程
## 用了Git就回不去了
Git是什么?简单点说就是版本管理的工具,类似于SVN, CVS,但是比它们强大很多。
介绍请参照官方网站: http://git-scm.com/
##### Git 的基本命令:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory