Skip to content

Instantly share code, notes, and snippets.

View svnlto's full-sized avatar
🦙

Sven Lito svnlto

🦙
View GitHub Profile
@svnlto
svnlto / init.vim
Created April 5, 2017 16:40
vim config
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/vundle'
const mqlight = require('mqlight');
const joi = require('joi');
const url = require('url');
const debug = require('debug')('mqService');
module.exports = (cfg) => {
const { protocol, hostname, port } = cfg.endpoint.mq;
@svnlto
svnlto / nvimrc
Created December 29, 2016 00:34
new mac setup
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/vundle'
@svnlto
svnlto / Dockerfile
Last active December 9, 2022 05:05
FROM comaeio/lemur
MAINTAINER Sven Lito me@svenlito.com
ENV NODE_ENV=development
WORKDIR /tmp
COPY package.json package.json
RUN npm install && npm cache clean
" Press ? for help
.. (up a dir)
</svenlito/Sites/work/comaeio/
▸ comae-manager/
▸ manager/
▾ ui/
▸ node_modules/
▸ services/
▾ src/

Keybase proof

I hereby claim:

  • I am svnlto on github.
  • I am svenlito (https://keybase.io/svenlito) on keybase.
  • I have a public key ASAcHcHHfkrIPfEB3WqQGlZLJhigphUp-kZhMVkYhtaiqQo

To claim this, I am signing this object:

version: "2"
services:
loadbalancer:
image: traefik:latest
command: -c /dev/null --retry --retry.attempts=3 --web --docker --docker.domain=comae.io.192.168.99.100.xip.io --logLevel=INFO
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
version: "2"
services:
loadbalancer:
build: services/proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "443:443"
Machine.schema = Joi.object().keys({
id: Joi.string().required(),
name: Joi.string(),
domain: Joi.string(),
lastSeen: Joi.string(),
versions: Joi.object().keys({
build: Joi.object().keys({
major: Joi.number(),
minor: Joi.number(),
build: Joi.number()
@svnlto
svnlto / webhooks-with-hapi.js
Created August 27, 2016 10:19
Webhook receiver with hapi.js
/*
Webhook receivers should accept a request and immediately respond with HTTP 204 No Content before processing the request. Here's how to do this with hapi.js.
Start this server:
`node webhooks-with-hapi.js`
Then make a request:
`curl http://localhost:8000/webhook-receiver -v`
Note the correct behavior: HTTP response will be sent and connection closed before the webhook processing starts.