Skip to content

Instantly share code, notes, and snippets.

@zimmicz
zimmicz / server.js
Created August 6, 2017 16:25
PostGIS MVT Express routing
const express = require("express")
const app = express()
const { Pool } = require("pg")
const SphericalMercator = require("sphericalmercator")
const pool = new Pool({
host: "localhost",
port: 15432,
user: "postgres",
database: "postgres"
})
@diegopacheco
diegopacheco / publish-maven-central-repo-sonatype.md
Last active December 11, 2021 00:57
How to publish a JAR into Sonatype Maven Central REPO?

How to publish a jar into Sonatype central repo

Order of Operations

  1. Create gpg key
  2. Export gpg key
  3. Publish gpg key to ubuntu server
  4. Create account at Sonatype JIRA
  5. Configure $HOME/.gradle/settings.gradle user and pass and keys settings
  6. Configure gradle plugins
@klpx
klpx / splitEither.scala
Last active June 18, 2019 16:25
Akka Streams. Graph for Split Either[L,R] to L and R flows
/**
Copy left Alexander Hasselbach
Usage:
val E = b.add(splitEither[Throwable,Int])
val parsed = b.add(Flow[Either[Throwable,Int]])
val valids = b.add(Flow[Int])
val invalids = b.add(Flow[Throwable])

Welcome to Phalka Posse!

Mission: Create intentional independet positive change

Phalka at Turing:

  • Tuesdays: come eat lunch
  • Fridays: Spikes will be dedicated to project work time or speakers or panels

Phalka outside of Turing

  • As these events come up you'll be notified
@tomfa
tomfa / BeanstalkViaTerraform
Last active March 15, 2022 07:51
Adding Beanstalk roles with Terraform
resource "aws_iam_instance_profile" "beanstalk_service" {
name = "beanstalk-service-user"
roles = ["${aws_iam_role.beanstalk_service.name}"]
}
resource "aws_iam_instance_profile" "beanstalk_ec2" {
name = "beanstalk-ec2-user"
roles = ["${aws_iam_role.beanstalk_ec2.name}"]
}
@ikhoon
ikhoon / must-watch-talks.md
Last active April 14, 2020 10:46
Must watch talks - reddit /r/scala
@OlegIlyenko
OlegIlyenko / CustomJsonScalarType.scala
Last active March 4, 2022 16:48
An example of custom raw JSON scalar type in sangria. DON'T USE IT! By using it you lose many benefits of GraphQL. This just demonstrates that it is possible. If you tempted to expose it, then definitely think twice before using it.
import sangria.ast
import sangria.execution.Executor
import sangria.marshalling.{InputUnmarshaller, ScalarValueInfo, ArrayMapBuilder, ResultMarshaller}
import sangria.schema._
import sangria.validation.{ValueCoercionViolation, IntCoercionViolation, BigIntCoercionViolation}
import spray.json._
import sangria.macros._
import scala.concurrent.ExecutionContext.Implicits.global
implicit object CustomSprayJsonResultMarshaller extends ResultMarshaller {
@mfikes
mfikes / fast.md
Last active January 6, 2024 07:19
Fast Clojure REPL

An experimental change for fast Clojure REPL startup:

  1. Download the JAR: clojure-1.8.0-fast.jar
  2. Launch it via java -jar clojure-1.8.0-fast.jar

The code used to create this JAR is on GitHub.

What's it doing?

It is: