Skip to content

Instantly share code, notes, and snippets.

[info] 09:18:34.124 [blaze-nio1-acceptor] INFO o.h.blaze.channel.ServerChannelGroup - Connection to /127.0.0.1:52427 accepted at Wed Oct 31 09:18:34 CET 2018.
[error] certpath: Constraints: MD2
[error] certpath: Constraints: MD5
[error] certpath: Constraints: RSA keySize < 1024
[error] certpath: Constraints set to keySize: keySize < 1024
[error] certpath: Constraints: DSA keySize < 1024
[error] certpath: Constraints set to keySize: keySize < 1024
[error] certpath: Constraints: MD2
[error] certpath: Constraints: MD5
[error] certpath: Constraints: RSA keySize < 1024
@sebastianvoss
sebastianvoss / CatsEffectBracket.scala
Created June 15, 2018 12:19
Using Cats bracket for resource handling.
package com.sebastianvoss
import java.util.UUID
import cats.effect.{Bracket, IO}
object CatsEffectBracket extends App {
case class SomeResource(id: UUID)
@sebastianvoss
sebastianvoss / go_cross_compile.txt
Last active February 28, 2016 13:44
GO cross-compile
env GOOS=windows GOARCH=amd64 go build -v -o $GOPATH/bin/<app>_windows_amd64.exe <package>
env GOOS=linux GOARCH=amd64 go build -v -o $GOPATH/bin/<app>_linux_amd64 <package>
env GOOS=darwin GOARCH=amd64 go build -v -o $GOPATH/bin/<app>_darwin_amd64 <package>
@sebastianvoss
sebastianvoss / Dockerfile
Created April 4, 2014 11:53
mongos Dockerfile
FROM dev24/mongodb:latest
EXPOSE 27017
ENTRYPOINT ["usr/bin/mongos"]
@sebastianvoss
sebastianvoss / Dockerfile
Last active August 29, 2015 13:58
mongod Dockerfile
FROM ubuntu:latest
# Add 10gen official apt source to the sources list
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list
# Install MongoDB
RUN apt-get update
RUN apt-get install mongodb-10gen
# Set version to tag version
mvn versions:set -DnewVersion=1.0.0
mvn versions:commit
# Commit to master
git commit -a -m "Changed version to 1.0.0"
git push origin master
# Create new tag for version 1.0.0
git tag -a 1.0.0 -m "Version 1.0.0"
@sebastianvoss
sebastianvoss / map_reduce_sample.js
Last active December 20, 2015 13:39
MongoDB Shell MapReduce sample
// map function
m = function () {
this.images.forEach( function(id) {
emit(id, 1);
})
}
// reduce function
r = function (id, count) {
return Array.sum(count);
}
@sebastianvoss
sebastianvoss / private.xml
Last active December 19, 2015 11:59
KeyRemap4MacBook private.xml to use left option key as meta key while preserving right option key for special characters in terminal app
<?xml version="1.0"?>
<root>
<appdef>
<appname>APPLETERMINAL</appname>
<equal>com.apple.Terminal</equal>
</appdef>
<item>
<name>Terminal Customization</name>
<item>
<name>Left Option as Meta Key</name>