Skip to content

Instantly share code, notes, and snippets.

Horace Williams worace

Block or report user

Report or block worace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
melvic-ybanez /
Last active Aug 3, 2019
Request Validation with Akka-HTTP and Cats

Request Validation with Akka-HTTP and Cats

Greg Beech wrote an article on Akka HTTP Entity Validation. This post is on the same topic, except we are going to use typeclass instances, as opposed to subtyping, for form validations.

Sample Problem: User Regsitration

To start with, let us suppose that we are working on some sort of user management service using Scala/Akka. However, here we are only going to focus on the registration part, in which the client is expected to send a user data, in JSON format; and the server needs to validate them, and save the user if the validations succeed, or reject the request with all the errors detected. That said, we should keep in mind that our validations may be used through out the entire codebase, not just in the user registration endpoint.

The rules for our validation are as follows:

chrismccord /
Last active Oct 25, 2019
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new project generator

The mix archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

chriswhong / RadiusMode.js
Created Mar 1, 2018
RadiusMode, a custom mode for mapbox-gl-draw for drawing a radius
View RadiusMode.js
// custom mapbopx-gl-draw mode that modifies draw_line_string
// shows a center point, radius line, and circle polygon while drawing
// forces draw.create on creation of second vertex
import MapboxDraw from 'mapbox-gl-draw';
import numeral from 'numeral';
import lineDistance from 'npm:@turf/line-distance';
const RadiusMode = MapboxDraw.modes.draw_line_string;
jpbecotte /
Last active Oct 9, 2019
Vue-cli 3, Phoenix 1.3, a complete how-to


I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:

  • I want to use the new Vue-cli to select the features that I want,
  • I do NOT want to setup Webpack (I know, what a shame!). The new Vue-cli includes the new vue-cli-service, which uses an instance of webpack-dev-server, so you don't have to import it manually in your project.
  • I do not want to use Brunch.

Create your Phoenix App

Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.


Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

zimmicz / server.js
Created Aug 6, 2017
PostGIS MVT Express routing
View server.js
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"
klpx / splitEither.scala
Last active Jun 18, 2019
Akka Streams. Graph for Split Either[L,R] to L and R flows
View splitEither.scala
Copy left Alexander Hasselbach
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
ikhoon /
Last active Jul 19, 2019
Must watch talks - reddit /r/scala
You can’t perform that action at this time.