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 kotlin | |
@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:3.5.2") | |
@file:OptIn(ExperimentalTime::class) | |
import com.github.ajalt.clikt.core.CliktCommand | |
import com.github.ajalt.clikt.parameters.options.option | |
import com.github.ajalt.clikt.parameters.options.required | |
import java.io.File | |
import java.security.MessageDigest | |
import kotlin.time.ExperimentalTime |
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
internal class EnumGenerator( | |
private val codeGenerator: CodeGenerator | |
) { | |
fun generate(classDeclaration: KSClassDeclaration) { | |
require(classDeclaration.classKind == ClassKind.ENUM_CLASS) { | |
"${classDeclaration.containingFile?.filePath} is no enum." | |
} | |
val enum = buildEnum(classDeclaration) |
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
internal class SwiftGenProcessor( | |
private val environment: SymbolProcessorEnvironment | |
) : SymbolProcessor { | |
private var invoked = false | |
override fun process(resolver: Resolver): List<KSAnnotated> { | |
if (invoked) { | |
return emptyList() | |
} |
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 kotlin | |
@file:DependsOn("com.github.ajalt.clikt:clikt-jvm:3.0.1") | |
import com.github.ajalt.clikt.core.CliktCommand | |
import com.github.ajalt.clikt.core.UsageError | |
import com.github.ajalt.clikt.output.TermUi | |
class App : CliktCommand() { | |
enum class DaemonType { |
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.example.outlinetransition | |
import android.graphics.Color | |
import android.graphics.Outline | |
import android.os.Bundle | |
import android.view.View | |
import android.view.ViewOutlineProvider | |
import android.widget.FrameLayout | |
import androidx.annotation.ColorInt | |
import androidx.annotation.Px |
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 com.android.tools.lint.client.api.UElementHandler | |
import com.android.tools.lint.detector.api.Category | |
import com.android.tools.lint.detector.api.Detector | |
import com.android.tools.lint.detector.api.Implementation | |
import com.android.tools.lint.detector.api.Issue | |
import com.android.tools.lint.detector.api.JavaContext | |
import com.android.tools.lint.detector.api.Scope | |
import com.android.tools.lint.detector.api.Severity | |
import com.android.tools.lint.detector.api.SourceCodeScanner | |
import org.jetbrains.uast.UClass |
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
👍 |
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
# git report 2018-05-31 | |
[alias] | |
report = "!f() { git log --after=\""$1" 00:00\" --before=\""$1" 23:59\" --pretty=format:\"* %s\" --reverse; }; f" |
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
class Repo<in Key : Any, Value : Any>( | |
private val dataSource: DataSource<Key, Value>, | |
private val persister: Persister<Key, Value> | |
) { | |
private val cleared = PublishSubject.create<Key>() | |
private val cache = HashMap<Key, Flowable<Value>>() | |
fun stream(key: Key): Flowable<Value> = | |
cache.getOrPut(key) { newStream(key) } |
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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<View | |
android:id="@+id/red" | |
android:layout_width="0dp" |
NewerOlder