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
# This docker file sets up the base container for other applications | |
# | |
# https://docs.docker.com/reference/builder/ | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT | |
FROM parabuzzle/ruby:2.3.1 |
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
# This docker file sets up the base container for other applications | |
# | |
# https://docs.docker.com/reference/builder/ | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT | |
FROM parabuzzle/ruby:2.3.1 |
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 | |
# Wraps a command in the warm and cozy shell we want | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT | |
set -e | |
echo -e "Establishing the environment for $APP_ENV from $VAULT_ADDR" |
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 ruby | |
# Read an environment variable from the local keyserver | |
# | |
# Can be used to initialize environment variables. | |
# | |
# export PASSWORD=$( vaultenv db/password ) | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT |
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
# A simple library for working with Vault | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT | |
require 'vault' | |
require 'yaml' | |
class VaultLoader |
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
FROM ubuntu:12.04 | |
MAINTAINER [email protected] | |
VOLUME /compilations | |
ENV TERM linux | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | |
RUN apt-get update && apt-get dist-upgrade -qq -y |
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
# | |
# default .gitconfig | |
# | |
[alias] | |
praise = blame |
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
def letter_count(str) | |
str.chars.each_with_object({}) do |char, hash| | |
next if char == " " # skip spaces | |
hash.store(char, 0) if hash[char].nil? | |
hash[char] +=1 | |
end | |
end | |
letter_count("hello world").each { |char,count| puts [char, count].join(" == ") } |
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 ruby | |
# | |
# Parses a given yaml file and returns prefix_key=value | |
# Usage: parse_yaml_for_bash <yaml_file> <prefix> | |
require 'yaml' | |
unless ARGV[0] | |
puts "Usage: parse_yaml_for_bash <yaml_file> <optional prefix>" | |
exit 1 |
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
function duse { | |
_ENV=`docker-machine env $@` | |
if [ $? -ne 0 ]; then | |
printf "$_ENV" | |
return 1 | |
elif [ -z "$1" ]; then | |
printf "$_ENV" | |
else | |
eval $_ENV |
NewerOlder