Skip to content

Instantly share code, notes, and snippets.


hglf hotstu

  • une
  • Chengdu China
View GitHub Profile
hotstu / deployArtifactory.gradle
Created May 14, 2019
deploy Android aar package to private artifactory repo/本脚本将编译后的aar上传私有artifactory仓库
View deployArtifactory.gradle
//first config ~/.gradle/
//then in you root project's build.gradle:
//import below in project.gradle
hotstu /
Created Jun 11, 2020
Java Nio File channel code including write/read/copy/lock/map
import org.junit.Test;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
public class NioFile {
hotstu / NotificationChannelBuilder.kt
Last active May 14, 2019
NotificationChannelBuilder, DSL style android notification channel builder powered by kotlin, simple way to support Android O notification channels
View NotificationChannelBuilder.kt
* @author hglf <a href="">hglf</a>
* @since 5/13/19
* @desc
class Config {
val chidren: ArrayList<NotificationChannelGroup> = ArrayList()
//NOTE: extension properies are resolved static, so here is a little mem leak, call clean() when every thing is done
val extendPenddingChannels = HashMap<NotificationChannelGroup, ArrayList<NotificationChannel>>()
hotstu /
Created Mar 21, 2016 — forked from eduardb/
Uploading a file with a progress displayed using OkHttp
public class CountingFileRequestBody extends RequestBody {
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE
private final File file;
private final ProgressListener listener;
private final String contentType;
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) {
this.file = file;
hotstu / genymotionwithplay.txt
Created Mar 18, 2016 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
View genymotionwithplay.txt
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 6.0 ( -
Google Apps for Android 5.1 ( -
Google Apps for Android 5.0 ( -
Google Apps for Android 4.4.4 ( -
Google Apps for Android 4.3 ( -