This gist is deprecated. Please see http://github.com/sethvargo/hashicorp-installer.
重要な順で
優秀なプログラマーというのは寝ている間に異世界に召喚されて無双するのとはわけが違うんですよ。
自分の例で言うとプログラミングを始めた中学生の時から優秀なプログラマだったかって、そんなわけない。みんなヘッポコからスタートしているに決まってるわけです。以来二十余年、地道に生き恥を晒し続けてきた結果として、現在いちおう業界の末席を汚すところまで来ている。このプロセスから目を背けるべきではないです。優秀なプログラマーに生まれる人間なんかいない。優秀なプログラマーに「育つ」んだし、それには時間が必要。今日から無双したいと思うな。
| const http = require('http'); | |
| const {promisify} = require('util'); | |
| http.get[promisify.custom] = function getAsync(options) { | |
| return new Promise((resolve, reject) => { | |
| http.get(options, (response) => { | |
| response.end = new Promise((resolve) => response.on('end', resolve)); | |
| resolve(response); | |
| }).on('error', reject); | |
| }); | 
| module.exports = (string) => { | |
| return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase(); | |
| }; | 
| // get the original destination for the socket when redirect by linux iptables | |
| // refer to https://raw.githubusercontent.com/missdeer/avege/master/src/inbound/redir/redir_iptables.go | |
| // | |
| const ( | |
| SO_ORIGINAL_DST = 80 | |
| IP6T_SO_ORIGINAL_DST = 80 | |
| ) | |
| func getOriginalDst(clientConn *net.TCPConn) (rawaddr []byte, host string, newTCPConn *net.TCPConn, err error) { | |
| if clientConn == nil { | 
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| "os/user" | |
| "strconv" | |
| ) | 
元記事: http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/
Update - June 19, 2016: A lot of people have been suggesting the same "solutions" to the problems below, but none of them are practical. I've published a new post with a slightly sarcastic flowchart - please have a look at it before suggesting a solution.
| #!/bin/bash -e | |
| # Setup a Root CA in vault | |
| # Generate and sign an Intermediate cert | |
| # | |
| # Requires: | |
| # * A running vault server already initialzed and unsealed | |
| # * Environment variable VAULT_TOKEN is set | |
| # * vault cli (https://www.vaultproject.io) | |
| # * httpie (https://github.com/jkbrzt/httpie) | 
A basic set of systemd units for starting Nginx and PHP-FPM daemons on system startup.
- Ensures Nginx web server has started before the PHP-FPM process.
- Nginx pid file placed at /run/nginx.pid.
- PHP-FPM pid file placed at /run/php7/php-fpm.pid, PHP7 PHP-FPM config at/etc/php7.
- Based on usage with Ubuntu 16.04LTS / 18.04LTS.
Unit files are placed in /etc/systemd/system and enabled with:
Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.
This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.
There is a companion feature matrix of various tools. Comments are welcome in the same manner.