Skip to content

Instantly share code, notes, and snippets.

@AlexZhukovich
AlexZhukovich / customRange.kt
Created November 20, 2020 07:36
Kotlin: Custom Range - Restaurant delivery time options
data class Restaurant(
val id: Long,
val name: String,
val openTime: Date,
val closeTime: Date
) {
private val deliveryTimeStep: Long = 15 * 60 * 1000
fun getDeliveryTimeOptions(): DeliveryTimeOptions {
return openTime..closeTime step deliveryTimeStep
@AlexZhukovich
AlexZhukovich / DemoAlignModifier.kt
Created March 7, 2021 12:54
Jetpack Compose: Layouts
package com.alexzh.composeplayground
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@AlexZhukovich
AlexZhukovich / README.md
Last active September 21, 2021 07:04
Testing redirect with Cypress

This gist shows how to create a Cypress test case that verifies redirect.

In the current example, the redirect-data.json has only one object. However, you can add more objects.

Article: https://alexzh.com/testing-redirect-with-cypress/

File pathes:

  • cypress/fixtures/redirect-data.json
  • cypress/integration/website-redirect/website-redirect.spec.js