Skip to content

Instantly share code, notes, and snippets.

View davydkov's full-sized avatar
🇳🇱

Denis Davydkov davydkov

🇳🇱
  • Utrecht, The Netherlands
  • 12:03 (UTC +02:00)
  • LinkedIn in/davydkov
View GitHub Profile
/** @jsx h */
/// <reference no-default-lib="true"/>
/// <reference lib="dom" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />
import { serve } from "https://deno.land/std@0.114.0/http/server.ts";
import { h, renderSSR } from "https://deno.land/x/nano_jsx@v0.0.20/mod.ts";
function App() {
MONIX_VER='3.0.0-RC1'
jar_library(name='monix',
jars=[
scala_jar(org='io.monix', name='monix', rev=MONIX_VER),
scala_jar(org='io.monix', name='monix-eval', rev=MONIX_VER),
scala_jar(org='io.monix', name='monix-reactive', rev=MONIX_VER),
])
jar_library(name='scalatest',
jars=[
@davydkov
davydkov / how-to-set-up-stress-free-ssl-on-os-x.md
Created December 18, 2017 09:21 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@davydkov
davydkov / Morphism.scala
Created November 25, 2016 12:06
Scala morphism with shapeless
import shapeless._
import shapeless.labelled._
import shapeless.ops.record.Merger
import shapeless.syntax.SingletonOps
import scala.annotation.implicitNotFound
import scala.collection.generic.CanBuildFrom
import scala.language.experimental.macros
import scala.language.higherKinds
@davydkov
davydkov / gist:80266fddaf3564e88884
Created July 28, 2015 12:06
Delete from redis by pattern
EVAL "local keys = redis.call('keys', ARGV[1]) \n for i=1,#keys,5000 do \n redis.call('del', unpack(keys, i, math.min(i+4999, #keys))) \n end \n return keys" 0 prefix:*