Config name | Section | Type | Description |
---|---|---|---|
secret | Both | string | |
length | Generation | int | 6,7,8 digits of OTP |
expiry-duration | Generation | duration | 1m, 30s |
otp-buffer-window | Validation | int | expiry period multiplier |
generation-limit | Generation | int | Consecutive generation limit. After a successful validation, this resets to zero |
resend-interval | Generation | duration | can re-send only after this duration of last send |
validation-limit | Validation | int | Consecutive validate limit when validate keeps failing. if a validates succeeds, this counter resets to zero |
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 scala.sys.process._ | |
lazy val bootstrap = taskKey[Unit]("Create a fat jar file") | |
bootstrap := { | |
// this first publishes the project to ivy local | |
publishLocal.value | |
val process = Process( | |
Seq( | |
"coursier", |
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
{ | |
"types": [ | |
"licensing", | |
"suit", | |
"resolved" | |
], | |
"nodes": [ | |
{ | |
"id": "Microsoft" | |
}, |
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 zio.http.* | |
import zio.http.service.* | |
import zio.metrics.connectors.prometheus.* | |
import zio.* | |
import zio.metrics.Metric | |
import zio.metrics.connectors.MetricsConfig | |
import zio.http.model.Method.GET | |
object Metrics extends ZIOAppDefault { |
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 zio.http.* | |
import zio.http.service.* | |
import zio.* | |
object Main extends ZIOAppDefault { | |
private def portFromEnv: Option[Int] = sys.env.get("PORT").map(_.toInt) | |
val routes: Http[Any, Nothing, Request, Response] = Http.collectZIO[Request] { req => | |
val delay = req.url.queryParams |
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 zio.parser.Syntax._ | |
import zio.Chunk | |
import zio.parser.Syntax | |
sealed trait IntegerExpression | |
case class IntegerValueExpression(value: Int) extends IntegerExpression { | |
override def toString: String = value.toString | |
} |
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
lazy val other = ProjectRef(file("../../../my-other-project"), "otherSubProjectName") | |
lazy val myProject = project | |
.in(file("./my-project")) | |
.dependsOn(other) |
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
object TestApp extends zio.ZIOAppDefault { | |
override def run = { | |
val filePath = "main.csv" | |
val program = for { | |
// read a csv file | |
lines <- ZStream | |
.fromFileName(filePath, 1024) | |
.via(ZPipeline.utfDecode) | |
.via(ZPipeline.splitLines) |
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.typesafe.config.Config | |
import zio.* | |
import zio.config.ConfigDescriptor.* | |
import zio.config.ConfigSource.* | |
import zio.config.* | |
import zio.config.magnolia.Descriptor | |
import zio.config.typesafe.TypesafeConfigSource | |
import zio.cli.Args | |
import java.time.ZonedDateTime | |
import java.time.LocalDate |
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 {connect} from "react-redux"; | |
import {bindActionCreators} from "redux"; | |
import {loadEmployeesAsync} from "../reducers/employees"; | |
import {Link} from "react-router-dom"; | |
class Dashboard extends React.Component { | |
async componentWillMount(){ | |
//loading data only first time |
NewerOlder