Skip to content

Instantly share code, notes, and snippets.

View KAllan357's full-sized avatar

Kyle Allan KAllan357

  • Singularity 6
  • Philadelphia, PA
View GitHub Profile
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/hashicorp/consul/api"
# Testing with Consul "verify_incoming": false
$ ./consul-backinator backup -scheme https -addr 192.168.99.100:8500
2016/10/12 10:20:45 [Error] Failed to backup key data: Get https://192.168.99.100:8500/v1/kv//?consistent=&recurse=: x509: cannot validate certificate for 192.168.99.100 because it doesn't contain any IP SANs
$ ./consul-backinator backup -scheme https -addr 192.168.99.100:8500 -ca-cert certs/ca-cert.pem -tls-skip-verify
2016/10/12 11:09:52 [Error] Failed to backup key data: No keys found
# Testing with Consul "verify_incoming": true
$ ./consul-backinator backup -scheme https -addr 192.168.99.100:8500 -ca-cert certs/ca-cert.pem -tls-skip-verify
2016/10/12 10:23:25 [Error] Failed to backup key data: Get https://192.168.99.100:8500/v1/kv//?consistent=&recurse=: remote error: tls: bad certificate
pkg_origin=kallan357
pkg_name=tutorial
pkg_version=0.0.1
pkg_maintainer="Your Name <your email address>"
pkg_license=()
pkg_source=https://github.com/KAllan357/answering-machine/archive/master.zip
pkg_shasum=73d350f84257527ca804cb5abe464447d1e4d86bac61b0461440230607671c25
pkg_deps=(core/go)
#pkg_build_deps=()
pkg_bin_dirs=(bin)
package com.riotgames.nexus.rest;
import org.sonatype.sisu.goodies.common.ComponentSupport;
import org.sonatype.sisu.siesta.common.Resource;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.ws.rs.GET;
package com.riotgames.nexus.rest;
import org.restlet.Context;
import org.restlet.data.Request;
import org.restlet.data.Response;
import org.restlet.resource.ResourceException;
import org.restlet.resource.Variant;
import org.sonatype.nexus.rest.AbstractNexusPlexusResource;
import org.sonatype.plexus.rest.resource.AbstractPlexusResource;
import org.sonatype.plexus.rest.resource.PathProtectionDescriptor;
package main
import (
"fmt"
"github.com/codegangsta/cli"
"os"
)
func main() {
app := cli.NewApp()

Installing Docker (Virtualbox, boot2docker, docker)

  1. Download and install the latest boot2docker for OS X.
  2. Open a new Terminal and enter boot2docker init
  3. Run boot2docker start
  4. You will be given an environment variable to export export DOCKER_HOST=tcp://192.168.59.103:2375. Add that to your bash_profile or equivalent.
  5. You have a successful environment when the output of docker version is clean (exits 0). The output should look a bit like:
Client version: 1.1.0
FROM ubuntu:14.04
RUN apt-get update && apt-get install wget -y
WORKDIR /tmp
RUN ["wget", "--no-cookies", "--no-check-certificate", "--header", "Cookie: oraclelicense=accept-securebackup-cookie", \
"http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-x64.tar.gz", "-O", "jdk-7-linux-x64.tar.gz"]
RUN tar -xvf jdk-7* && mkdir /usr/lib/jvm && mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0u60 \
&& update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0u60/bin/java" 1 \
FROM ubuntu:14.04
MAINTAINER Kyle Allan "kallan357@gmail.com"
RUN apt-get update && apt-get install wget -y && apt-get install openjdk-7-jre-headless -y
WORKDIR /tmp
RUN wget http://www.sonatype.org/downloads/nexus-2.8.1-bundle.tar.gz
RUN tar xzvf nexus-2.8.1-bundle.tar.gz -C /
RUN rm -rf nexus-2.8.1-bundle.tar.gz
Generated at 2014-01-15 20:18:11 +0000
TypeError: ruby_block[start the bar] (foo::bar_service_start line 1) had an error: TypeError: no implicit conversion from nil to integer
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0-x86-mingw32/lib/mixlib/shellout/windows/core_ext.rb:351:in `CloseHandle'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0-x86-mingw32/lib/mixlib/shellout/windows/core_ext.rb:351:in `create'
C:/chef/cache/cookbooks/foo/recipes/bar_service_start.rb:5:in `block (2 levels) in from_file'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2-x86-mingw32/lib/chef/provider/ruby_block.rb:33:in `call'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2-x86-mingw32/lib/chef/provider/ruby_block.rb:33:in `block in action_run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2-x86-mingw32/lib/chef/mixin/why_run.rb:52:in `call'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2-x86-mingw32/lib/chef/mixin/why_run.rb:52: