git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
# Docker PS prettifier | |
# revision 6 | |
# https://gist.github.com/GottZ/4a6c2af314d73cd8b71d | |
dps() { | |
docker ps $@ --format "table{{ .Image }}\\t{{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}" | awk ' | |
NR % 2 == 0 { | |
printf "\033[0m"; | |
} | |
NR % 2 == 1 { |
console.log('Checking newly uploaded file'); | |
var AWS = require('aws-sdk'); | |
var s3 = new AWS.S3({apiVersion: '2006-03-01'}); | |
var eltr = new AWS.ElasticTranscoder({ | |
apiVersion: '2012-09-25', | |
region: 'us-east-1' | |
}); | |
// ID of pipeline | |
var pipelineId = 'myID'; | |
// ID of ET's web output preset |
#cloud-config | |
ssh_authorized_keys: | |
- ssh-rsa PutYourKeysHere | |
coreos: | |
locksmith: | |
endpoint: "https://127.0.0.1:2379" | |
etcd_cafile: /etc/ssl/certs/ca.pem | |
etcd_certfile: /etc/ssl/client/client.pem | |
etcd_keyfile: /etc/ssl/client/client.key |
require 'thor' | |
require "sub" | |
class MyApp < Thor | |
desc "parentcommand SUBCOMMAND", "Some Parent Command" | |
subcommand "sub", Sub | |
end | |
MyApp.start |
global | |
log 127.0.0.1:514 local0 | |
defaults | |
mode http | |
log global | |
option httplog | |
option http-server-close | |
option dontlognull | |
option redispatch |
#!/bin/sh | |
remove_dangling() { | |
echo "Removing dangling images ..." | |
docker rmi $(docker images -f dangling=true -q) | |
} | |
remove_stopped_containers() { | |
echo "Removing stopped containers ..." | |
docker rm $(docker ps -qa) |
# Generates necessary certificates to ~/.docker | |
# | |
# Usage: | |
# bundle install | |
# ruby certgen.rb <domain> | |
require 'certificate_authority' | |
require 'fileutils' | |
if ARGV.empty? |
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
var crypto = require('crypto'); | |
var SaltLength = 9; | |
function createHash(password) { | |
var salt = generateSalt(SaltLength); | |
var hash = md5(password + salt); | |
return salt + hash; | |
} |
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
) | |
func main() { |