As per Nginx documentation, the key directives of proxy_http_version and proxy_set_header need to be set as per below:
upstream backend {
server 127.0.0.1:8080;
keepalive 8;
}
server {| # See https://hector.dev/2020/11/18/centralized-scala-steward-with-github-actions | |
| name: Scala Steward | |
| on: | |
| schedule: | |
| # Schedule to run every Sunday @ 12PM UTC. Replace this with | |
| # whatever seems appropriate to you. | |
| - cron: "0 0 * * 0" | |
| # Provide support for manually triggering the workflow via GitHub. | |
| workflow_dispatch: |
As per Nginx documentation, the key directives of proxy_http_version and proxy_set_header need to be set as per below:
upstream backend {
server 127.0.0.1:8080;
keepalive 8;
}
server {| build-web: | |
| working_directory: ~/repo | |
| docker: | |
| - image: circleci/node:8-browsers | |
| steps: | |
| - checkout | |
| - restore_cache: | |
| key: my-project-{{ .Branch }}-{{ checksum "enterprise-web/package-lock.json" }} | |
| - run: cd web && npm install | |
| - save_cache: |
| import play.api.libs.json._ | |
| import scala.reflect.runtime.universe._ | |
| case class Sample(id: String, value: Int = 0) | |
| def checkedReads[T](underlyingReads: Reads[T])(implicit typeTag: TypeTag[T]): Reads[T] = new Reads[T] { | |
| def classFields[T: TypeTag]: Set[String] = typeOf[T].members.collect { | |
| case m: MethodSymbol if m.isCaseAccessor => m.name.decodedName.toString | |
| }.toSet |
| # script that updates the commit log from external repos | |
| # | |
| # steps: | |
| # - create a file called commits.log containing the git log to be applied, | |
| # a simple way is replacing the commit hash with the last known commit hash | |
| # and run this command on the external repo: | |
| # git log | sed '/7467bdc51ad57371ef20bffc2f79cc4a792eb97f/Q' > commits.log | |
| # | |
| # - move the commits.log file to the root of the XSN repo. | |
| # - run: ruby apply-commits.rb |
| import java.security.KeyPairGenerator; | |
| import java.security.KeyPair; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; | |
| import java.security.KeyFactory; | |
| import java.security.spec.EncodedKeySpec; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.security.spec.X509EncodedKeySpec; | |
| import java.security.spec.InvalidKeySpecException; | |
| import java.security.NoSuchAlgorithmException; |
| # run the following commands, one after another one | |
| # these commands assumed you have a working masternode | |
| # 1. download latest version | |
| wget https://github.com/X9Developers/XSN/releases/download/v1.0.13/xsn-1.0.13-linux64.tar.gz -O xsn.tar.gz | |
| # 2. unzip the files | |
| tar -zxvf xsn.tar.gz | |
| # 3. stop previous xsnd if running, if this fails, it means no xsnd was running |
| // from https://github.com/AlexITC/crypto-coin-alerts/blob/master/alerts-server/app/com/alexitc/coinalerts/data/anorm/AnormPostgresDAL.scala#L24 | |
| def withConnection[A](block: Connection => ApplicationResult[A]): ApplicationResult[A] = { | |
| try { | |
| database.withConnection(block) | |
| } catch { | |
| case e: PSQLException if isIntegrityConstraintViolationError(e) => | |
| Bad(createIntegrityConstraintViolationError(e)).accumulating | |
| } | |
| } |
| import org.postgresql.util.PSQLException | |
| object PostgresErrorMapper { | |
| // see https://www.postgresql.org/docs/9.6/static/errcodes-appendix.html | |
| def isForeignKeyViolationError(e: PSQLException): Boolean = "23503" == e.getSQLState | |
| def createForeignKeyViolationError(e: PSQLException): PostgresIntegrityViolationError = { | |
| // assumes not null | |
| val detail = e.getServerErrorMessage.getDetail |