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 arrow.Kind | |
import arrow.core.Option | |
import arrow.core.Try | |
import arrow.core.functor | |
import arrow.effects.IO | |
import arrow.effects.fix | |
import arrow.effects.functor | |
import arrow.typeclasses.Functor | |
/* algebras */ |
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 arrow.Kind | |
import arrow.core.Option | |
import arrow.core.left | |
import arrow.core.right | |
import arrow.effects.typeclasses.Async | |
import arrow.typeclasses.ApplicativeError | |
data class UserId(val value: String) | |
data class User(val userId: UserId) | |
data class Task(val value: String) |
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 arrow.* | |
import arrow.core.* | |
import arrow.typeclasses.* | |
import arrow.data.* | |
sealed class ValidationError(val msg: String) | |
data class DoesNotContain(val value: String) : ValidationError("Did not contain $value") | |
data class MaxLength(val value: Int) : ValidationError("Exceeded length of $value") | |
data class NotAnEmail(val reasons: Nel<ValidationError>) : ValidationError("Not a valid email") |
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
// Largely borrowed from Jake Wharton's Kotterknife (https://github.com/JakeWharton/kotterknife) | |
// and paweljaneczek's PR for resetting cached views (https://github.com/JakeWharton/kotterknife/pull/37) | |
package com.bluelinelabs.conductor.butterknife | |
import android.view.View | |
import com.bluelinelabs.conductor.Controller | |
import java.util.Collections | |
import java.util.WeakHashMap | |
import kotlin.properties.ReadOnlyProperty |
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.app.Service; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.ServiceConnection; | |
import android.os.Binder; | |
import android.os.IBinder; | |
import io.reactivex.Observable; |
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
// Porting of https://gist.github.com/jdegoes/dd66656382247dc5b7228fb0f2cb97c8 | |
typealias UserID = String | |
data class UserProfile(val name: String) | |
// The database module: | |
interface DatabaseService { | |
suspend fun dbLookup(id: UserID): UserProfile | |
suspend fun dbUpdate(id: UserID, profile: UserProfile) | |
} |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="be.rijckaert.tim.disableanimations"> | |
<!-- Place this permission in your debug folder --> | |
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/> | |
</manifest> |
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
@Retention(AnnotationRetention.BINARY) | |
@Target(AnnotationTarget.CLASS) | |
annotation class ValueClass |
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 MIT License | |
* | |
* Copyright (c) 2016 Andreas Ahlenstorf | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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.google.protobuf.gradle.protobuf | |
import com.google.protobuf.gradle.protoc | |
plugins { | |
java | |
idea | |
id("com.google.protobuf") version "0.8.7" | |
} | |
repositories { |
OlderNewer