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.Message; | |
import android.support.v4.content.Loader; | |
import com.android.volley.NoConnectionError; | |
import com.android.volley.Response; | |
import com.android.volley.RetryPolicy; | |
import com.android.volley.TimeoutError; | |
import com.android.volley.VolleyError; | |
import com.android.volley.toolbox.JsonRequest; |
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 | |
# wait for Enter key | |
function pause(){ | |
read -p "$*" | |
} | |
MASTER=master | |
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)" | |
CHANGED_FILES="$(git status --porcelain --untracked-files=no | wc -l)" |
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 | |
# wait for Enter key | |
function pause(){ | |
read -p "$*" | |
} | |
echo '' | |
echo Reverting all submodules... | |
echo '' |
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 | |
if [ -z "$1" ]; then | |
TOP=10 | |
else | |
TOP=$1 | |
fi | |
# display top 10 messages with line numbering | |
git --no-pager log --pretty=format:"%h%x09%Cblue%cr%Cgreen%x09%an%Creset%x09%s%Cred%d%Creset" -n $TOP --date=short | nl -w2 -s" " |
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 net.easypark.junit; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.support.annotation.*; |
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 | |
# shellcheck disable=SC2155 | |
## Copyright (C) 2017, Oleksandr Kucherenko | |
## Last revisit: 2023-09-30 | |
## Version: 2.0.2 | |
## License: MIT | |
## Fix: 2023-10-01, prefix for initial INIT_VERSION was not applied | |
## Fix: 2023-10-01, correct extraction of latest tag that match version pattern | |
## Added: 2023-09-30, @mrares prefix modification implemented |
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 **; // <-- add own package name | |
import android.support.annotation.Nullable; | |
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
import rx.subjects.Subject; | |
/** Generic implementation of value/property that triggers subscribers on value change. */ | |
public class RxValue<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
package /* YOUR PROJECT PACKAGE */.utils; | |
import android.support.annotation.*; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.TimeUnit; |
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 com.artfulbits.json.moshi; | |
import android.support.annotation.*; | |
import com.ryanharter.auto.value.moshi.MoshiAdapterFactory; | |
import com.squareup.moshi.FromJson; | |
import com.squareup.moshi.JsonAdapter; | |
import com.squareup.moshi.JsonQualifier; | |
import com.squareup.moshi.JsonReader; | |
import com.squareup.moshi.JsonWriter; |
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 TheApp extends Application { | |
@Override | |
public void onCreate() { | |
// now give the app code do the rest: launch activities, etc. | |
super.onCreate(); | |
// Use it only in debug builds | |
if (BuildConfig.DEBUG) { | |
initializeAndroidDevMetrics(this); | |
} |
OlderNewer