View LabeledStreamLogHandler.swift
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
// | |
// LabeledStreamLogHandler.swift | |
// WishBag | |
// | |
// Created by ultraon on 15/12/19. | |
// Copyright © 2019 ultraon. All rights reserved. | |
// | |
import Foundation | |
import Logging |
View IoUtils.java
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
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import okhttp3.internal.io.FileSystem; | |
import okio.BufferedSource; | |
import okio.Okio; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; |
View build.gradle.txt
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
apply plugin: 'com.android.application' | |
//... | |
//Adds support for splitted Apkes by abi (arch platform) | |
android { | |
//... | |
splits { | |
// Configures multiple APKs based on ABI. | |
abi { |
View StateHandler.java
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
import android.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import io.reactivex.functions.Consumer; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.LinkedList; | |
import java.util.Queue; |
View IoToMainThreadTransformers.java
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
/** | |
* The {@link IoToMainThreadTransformers} is a factory of convenient Rx transformers to use with {@link | |
* io.reactivex.Observable#compose(ObservableTransformer)} operator to transform observable via | |
* apply {@link io.reactivex.Observable#subscribeOn(Scheduler)} operator with the {@link | |
* Schedulers#io()} and {@link io.reactivex.Observable#observeOn(Scheduler)} operator with the | |
* {@link AndroidSchedulers#mainThread()}. | |
*/ | |
public final class IoToMainThreadTransformers { | |
private IoToMainThreadTransformers() { |
View bash-cheatsheet.sh
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
View reset_routing_table.sh
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 bash | |
# Reset routing table on OSX | |
# display current routing table | |
echo "********** BEFORE ****************************************" | |
netstat -r | |
echo "**********************************************************" | |
for i in {0..4}; do | |
sudo route -n flush # several times |
View HorizontalOverScrollView.java
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
public class HorizontalOverScrollView extends HorizontalScrollView { | |
private static final int WIDTH_DEVIDER_OVERSCROLL_DISTANCE = 3; | |
private TimeInterpolator mInterpolator; | |
private int mMaxOverscrollDistance; | |
private int mAnimTime; | |
private long mStartTime; | |
/** | |
* Instantiates {@link HorizontalOverScrollView} object. |
View build.gradle
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
apply plugin: 'com.android.application' | |
apply from: "$rootDir/coverage.gradle" | |
//... | |
android { | |
//... | |
buildTypes { | |
//... | |
debug { |
View ReflectionUtils.java
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
package utils; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import java.lang.reflect.Field; | |
/** | |
* The utility class with reflection convenient methods. | |
*/ |
NewerOlder