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
rules_version = '2'; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /users/{uid}/goals/{document=**} { | |
allow read, write, create, delete: if request.auth != null && request.auth.uid != null && request.auth.uid == uid; | |
} | |
} | |
} |
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
val <T> T.exhaustive: T | |
get() = this |
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.aniketkadam.dogether.goals | |
import androidx.lifecycle.LiveData | |
import com.aniketkadam.dogether.goals.data.GoalsListLiveData | |
import com.google.firebase.firestore.FirebaseFirestore | |
import javax.inject.Inject | |
class GoalListRepository @Inject constructor(private val firebaseFirestore: FirebaseFirestore) { | |
fun getOwnGoals(): LiveData<List<Goal>> = |
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.aniketkadam.cleanlinks | |
import android.content.ClipData | |
import android.content.ClipboardManager | |
import io.reactivex.Observable | |
import io.reactivex.Observer | |
import io.reactivex.disposables.Disposable | |
import java.util.concurrent.atomic.AtomicBoolean | |
fun ClipboardManager.updates(): Observable<OptionalClipData> = ClipboardObservable(this) |
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.downloader | |
import org.junit.Test | |
import java.util.* | |
import java.util.concurrent.TimeUnit | |
class OnProgressSpeedListenerTest { | |
@Test | |
fun `speed is not calculated until the required number of samples have been received`() { |
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" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="${applicationId}"> | |
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator"/> | |
</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
import React from 'react'; | |
import firebase from 'firebase/app'; | |
import { FormValidation } from '../../constants'; | |
class Document extends React.Component { | |
constructor(props) { | |
super(props); | |
this.db = firebase.firestore(); | |
this.db.settings({ timestampsInSnapshots: true }); | |
this.willSubscribe = this.props.path != null; |
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.aniketkadam.sharevideoshortcut | |
import org.junit.rules.TestWatcher | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.setMain | |
import org.junit.runner.Description |
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
companion object { | |
/** | |
* Creates an intent for the TaskEditor state machine. | |
* | |
* Utility function to cut down on boilerplate. | |
*/ | |
inline fun <reified S : TaskEditorState> editorIntent( | |
crossinline block: S.() -> TaskEditorState | |
): Intent<TaskEditorState> { | |
return intent { |