This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| api: | |
| volumes: | |
| - "nfsmount:${CONTAINER_DIR}" | |
| volumes: | |
| nfsmount: | |
| driver: local | |
| driver_opts: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ | |
| libssl-dev perl make build-essential | |
| # Script to compile nginx on ubuntu with lua support. | |
| NGX_VERSION='1.8.0' | |
| LUAJIT_VERSION='2.0.4' | |
| LUAJIT_MAJOR_VERSION='2.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Configure the reverse-proxy on port 443 | |
| server { | |
| # general configs | |
| keepalive_timeout 30; | |
| listen 127.0.0.1:443 ssl; | |
| server_name api.example.com; | |
| # ssl configs | |
| ssl_certificate /path/to/api.crt; | |
| ssl_certificate_key /path/to/api.key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.util._ | |
| import java.security.SecureRandom | |
| import java.security.MessageDigest | |
| /* | |
| * Generates a Bearer Token with a length of | |
| * 32 characters (MD5) or 64 characters (SHA-256) according to the | |
| * specification RFC6750 (http://tools.ietf.org/html/rfc6750) | |
| * | |
| * Uniqueness obtained by hashing system time combined with a |