Skip to content

Instantly share code, notes, and snippets.

View remeniuk's full-sized avatar

Vasil Remeniuk remeniuk

View GitHub Profile
@remeniuk
remeniuk / gist:5cc520e9a6aac6be9995a3ee1d5f0ba2
Created December 31, 2022 10:18
google_graph_search.json
{
"@context": {
"detailedDescription": "goog:detailedDescription",
"kg": "http://g.co/kg",
"@vocab": "http://schema.org/",
"resultScore": "goog:resultScore",
"EntitySearchResult": "goog:EntitySearchResult",
"goog": "http://schema.googleapis.com/"
},
"@type": "ItemList",
def validateProduct(product: Product): List[String] =
requiredFieldsArePresent(product) |+|
idHasPermittedLength(product) |+|
nameHasPermittedLength(product) |+|
rateTypeIsCPM(product) |+|
productIdIsUnique(product /*, mongoDao*/) |+|
productNameIsUnique(product /*, mongoDao*/) |+|
currencyIsISOCompliant(product) match {
case Failure(errors) => errors.toList
case _ => Nil
[15:35:34] Denis Karpenko: Ваня, ты вроде бы планировал по devops практикам встречу,да?
[15:35:35] Ivan Yatskevich: ты готов? :)
[15:35:39] Denis Karpenko: привет
[15:35:49] Ivan Yatskevich: мы все планировали да не допланировали
[15:38:31] Denis Karpenko: я думаю нужно время какое-то на подготовку... помимо рассказа, я бы хотел пару сценариев показать с использованием docker именно в кластере и переносами контейнеров между разными машинами - это, мне кажется, будет очень интересно
[15:39:02] Ivan Yatskevich: (y)
[15:39:10] Vasil Remeniuk: будет крутотенечка
[15:39:44] Denis Karpenko: Вася, такие фразы обычно иллюстрируют фотографией кота
[15:39:46] Denis Karpenko: )
[15:40:18] Vasil Remeniuk: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS-FyeDjogYloWLg5Z2jTCEYJJyshpIKhh4HUx7sJ6vY-TgsazVAA
05/29 13:27:14.294 ERROR[-dispatcher-801] a.a.OneForOneStrategy - Received fatal alert: close_notify
javax.net.ssl.SSLException: Received fatal alert: close_notify
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884) ~[na:1.7.0_45]
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758) ~[na:1.7.0_45]
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.7.0_45]
{
"size": 0,
"query" : {
"match" : {
"application" : "App"
}
},
"aggregations" : {
"by_login_date" : {
"date_histogram" : {
@remeniuk
remeniuk / LuceneUserIndex.scala
Last active August 29, 2015 14:00
Lucene memory matcher
import org.apache.lucene.index.memory.MemoryIndex
import org.joda.time.format.{DateTimeFormat, ISODateTimeFormat}
import java.util.Date
import org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
trait LuceneUserIndex extends UserLuceneAnalyzers {
self: User =>
@transient lazy val memoryIndex = {
val memoryIndex = new MemoryIndex
import com.typesafe.config._
import akka.actor._
import scala.concurrent.Await
import scala.concurrent.duration._
object Storage {
val id = "storage"
}
trait Storage {
package com.viaden.crm.server
import java.net.InetSocketAddress
import akka.actor._
import akka.io._
import akka.io.Tcp._
import akka.io.IO
import akka.io.Tcp.Connected
import akka.actor.Terminated
import akka.io.Tcp.Bind
package com.viaden.crm.server
import java.net.InetSocketAddress
import akka.actor._
import akka.io._
import akka.io.Tcp._
import akka.io.IO
import akka.io.Tcp.Connected
import akka.actor.Terminated
import akka.io.Tcp.Bind
package com.embudo.loader.api;
enum Status {
OK = 1;
INVALID_REQUEST = 2;
ERROR = 3;
}
enum RequestType {
LOGIN = 1;