This file contains hidden or 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 cats.implicits._ | |
| import cats.{ Applicative, Monad } | |
| // Операции над контекстом | |
| trait ContextWriter[F[_]] { | |
| def put(key: String, value: String): F[Unit] | |
| } | |
  
    
      This file contains hidden or 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 ru.tinkoff.tschema.examples | |
| import java.util.{Locale, ResourceBundle} | |
| import akka.actor.ActorSystem | |
| import akka.stream.ActorMaterializer | |
| import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport._ | |
| import ru.tinkoff.tschema.FromQueryParam | |
| import ru.tinkoff.tschema.akkaHttp.MkRoute | |
| import ru.tinkoff.tschema.limits.LimitHandler.LimitRate | 
  
    
      This file contains hidden or 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 notes | |
| import cats.data.{OptionT, Writer} | |
| import cats.free.Free | |
| import cats.instances.option._ | |
| import cats.instances.stream._ | |
| import cats.instances.vector._ | |
| import cats.syntax.applicative._ | |
| import cats.syntax.coflatMap._ | |
| import cats.syntax.either._ | 
  
    
      This file contains hidden or 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
    
  
  
    
  | class DocumentRepositoryTest extends FunSuite with DbSpec { | |
| val repository = new DocumentRepository(connection) | |
| val newDoc = Document(Some(UUID.randomUUID()), LocalDateTime.now(), "1", "P", "R", BigDecimal(1.0)) | |
| override def beforeAll(): Unit = | |
| Await.result(repository.createTables(), Duration.Inf) | |
| test("Add new Document") { | 
  
    
      This file contains hidden or 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 slick.driver.JdbcProfile | |
| /** | |
| * Base DB support component | |
| * | |
| * @author Solverit | |
| */ | |
| trait DBSupport { | |
| val driver: JdbcProfile | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #sftp -b deploy/production root@127.0.0.1 | |
| scp -rp ~/clone/* root@127.0.0.1:/opt/app/ | |
| ssh root@127.0.0.1 'sudo chmod +x /opt/app/bin/stop.sh' | |
| ssh root@127.0.0.1 'sudo /opt/app/bin/stop.sh' | |
| ssh root@127.0.0.1 'sudo /opt/app/bin/ags-starter' | 
  
    
      This file contains hidden or 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 sample.akka.testkit | |
| import akka.actor.ActorSystem | |
| import akka.actor.Actor | |
| import akka.testkit.{TestKit, TestActorRef} | |
| import org.scalatest.matchers.MustMatchers | |
| import org.scalatest.WordSpec | |
| class ImplicitSenderTest extends TestKit(ActorSystem("testSystem")) | |
| // Using the ImplicitSender trait will automatically set `testActor` as the sender | 
  
    
      This file contains hidden or 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 akka.actor.IO._ | |
| import akka.actor.{Props, IO, IOManager, Actor, ActorSystem} | |
| import akka.event.Logging | |
| import akka.util.ByteString | |
| import java.net.InetSocketAddress | |
| class TCPEchoServer(port: Int) extends Actor { | |
| val log = Logging(context.system, this) | |
| val state = IterateeRef.Map.async[IO.Handle]()(context.dispatcher) | 
  
    
      This file contains hidden or 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.util.Try | |
| import scala.util.Success | |
| import scala.util.Failure | |
| db.run(myAction.asTry).map {result => | |
| result match { | |
| case Success(res) => DBResult(DBStatus.Success, res) | |
| case Failure(e: MySQLIntegrityConstraintViolationException) => { | |
| //code: 1062, status: 23000, e: Duplicate entry 'foo' for key 'name' | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #![feature(phase)] | |
| #[phase(plugin, link)] extern crate log; | |
| extern crate green; | |
| extern crate rustuv; | |
| use std::io; | |
| use std::os; | |
| use std::io::{Listener,Acceptor,TcpStream}; | |
| #[start] |