Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details> tag!
<details>
Summary Goes Here| private val HEX_CHARS = "0123456789ABCDEF".toCharArray() | |
| fun ByteArray.toHex() : String{ | |
| val result = StringBuffer() | |
| forEach { | |
| val octet = it.toInt() | |
| val firstIndex = (octet and 0xF0).ushr(4) | |
| val secondIndex = octet and 0x0F | |
| result.append(HEX_CHARS[firstIndex]) |
| package com.actinarium.materialcue.analytics; | |
| import android.app.Application; | |
| import android.support.annotation.NonNull; | |
| import android.util.Log; | |
| import com.actinarium.materialcue.dto.Overlay; | |
| import com.actinarium.materialcue.iab.PremiumStatus; | |
| import com.actinarium.materialcue.iab.PremiumStatusChangeListener; | |
| import com.google.android.gms.analytics.HitBuilders; | |
| import com.google.android.gms.analytics.Tracker; |
| <template name="tm" value="timber.log.Timber.d($content$);" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true"> | |
| <variable name="content" expression="groovyScript("def params = _2.collect {it + ' = [%s]'}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params + ',') + '\"' + (_2.empty ? '' : ','+_2.join(','))", methodName(), methodParameters()) " defaultValue="" alwaysStopAt="false" /> | |
| <context> | |
| <option name="JAVA_STATEMENT" value="true" /> | |
| </context> | |
| </template> |
| tell application "Google Chrome" | |
| set window_list to every window | |
| repeat with the_window in window_list | |
| # For each Window in Chrome, create a new Window in Safari respectively | |
| tell application "Safari" | |
| make new document | |
| activate |
| [merge] | |
| tool = studio | |
| [mergetool "studio"] | |
| prompt = false | |
| cmd = /Applications/Android\\ Studio.app/Contents/MacOS/studio merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
| trustExitCode = true | |
| [diff] | |
| tool = studio | |
| [difftool "studio"] | |
| prompt = false |
| <html> | |
| <body> | |
| <h2>Privacy Policy</h2> | |
| <p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended | |
| for use as is.</p> | |
| <p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and | |
| disclosure of Personal Information if anyone decided to use [my|our] Service.</p> | |
| <p>If you choose to use [my|our] Service, then you agree to the collection and use of information in | |
| relation with this policy. The Personal Information that [I|we] collect are used for providing and | |
| improving the Service. [I|We] will not use or share your information with anyone except as described |
| /** | |
| * allow to define callback wrappers that are protected from accidental multiple calls to resume/resumeWithException | |
| * Created by daely on 3/30/2017. | |
| */ | |
| class WrappedContinuation<T>(val c: Continuation<T>) : Continuation<T> { | |
| var isResolved = false | |
| override val context: CoroutineContext | |
| get() = c.context | |
| override fun resume(value: T) { |
| package be.brol | |
| import android.os.Binder | |
| import android.os.Bundle | |
| import android.os.Parcelable | |
| import android.support.v4.app.BundleCompat | |
| import android.support.v4.app.Fragment | |
| import kotlin.reflect.KProperty | |
| /** |
| import kotlin.coroutines.experimental.* | |
| import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED | |
| import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn | |
| @RestrictsSuspension | |
| abstract class StackComputation { | |
| abstract suspend fun <T> push(block: suspend StackComputation.() -> T): T | |
| } | |
| fun <T> compute(block: suspend StackComputation.() -> T): T = |