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/bash | |
| set -eu | |
| shopt -s nullglob | |
| readonly base_dir=/var/lib/docker/registry | |
| readonly output_dir=$(mktemp -d -t trace-images-XXXX) | |
| readonly jq=/usr/bin/jq | |
| readonly repository_dir=$base_dir/repositories |
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/bash | |
| set -eu | |
| shopt -s nullglob | |
| readonly base_dir=/var/local/docker-registry | |
| readonly output_dir=$(mktemp -d -t trace-images-XXXX) | |
| readonly jq=/tmp/jq | |
| readonly repository_dir=$base_dir/repositories |
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
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // |
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
| namespace :local do | |
| desc 'build MicroBOSH Stemcell locally' | |
| task :build_microbosh, [:infrastructure_name, :operating_system_name] do |_, args| | |
| require 'bosh/dev/build' | |
| require 'bosh/dev/micro_bosh_release' | |
| require 'bosh/dev/stemcell_builder' | |
| build = Bosh::Dev::Build.candidate | |
| release_tarball_path = Bosh::Dev::MicroBoshRelease.new.tarball |
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 | |
| recipe_path = ARGV[0] | |
| if recipe_path.nil? | |
| STDERR.puts "usage: chef-apply RECIPE_FILE" | |
| exit 1 | |
| end | |
| recipe_path = File.expand_path(recipe_path) |
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
| # Please fork if you can improve this. (e.g. Windows support) | |
| # | |
| # Ruby 1.9 doesn't contain any SSL root certificates, neither does it read the ones | |
| # installed with your operating system. This results in an error like | |
| # | |
| # SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed | |
| # | |
| # This solution is based on http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/ | |
| # but can be used to monkey patch 3rd party tools, e.g. Github's 'gist' command. | |
| # |
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 | |
| require 'rubygems' | |
| require 'mysql' | |
| require 'net/ssh/gateway' | |
| HOST = '' | |
| SSH_USER = '' | |
| SSH_PASS = '' | |
| DB_HOST = "127.0.0.1" | |
| DB_USER = "" |