Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View benton's full-sized avatar

Benton Roberts benton

View GitHub Profile
@benton
benton / dualboot.md
Last active June 5, 2018 11:37
Dual-booting Ubuntu 13 on a MacBook Pro

Dual-booting Ubuntu alongside OS X on your MacBook Pro

dual_boot!

Why do this?

  1. To run a broader array of software than with OS X alone.
  2. To run faster, by more fully exploiting the hardware, and by running with a smaller memory footprint.
  3. To more fully customize the user interface.
@benton
benton / keybase.md
Last active January 21, 2017 21:43
keybase.md

Keybase proof

I hereby claim:

  • I am benton on github.
  • I am benton (https://keybase.io/benton) on keybase.
  • I have a public key whose fingerprint is A245 1868 59DE 504F 8A05 8E9B 1728 A3E4 0D9F B348

To claim this, I am signing this object:

@benton
benton / nginx.conf
Created May 27, 2015 19:16
Nginx config
user root;
daemon off;
worker_processes 1;
error_log /dev/fd/2 info;
events {
worker_connections 1024;
}
http {
@benton
benton / registry.config.yaml
Created May 27, 2015 19:18
Registry config
version: 0.1
log:
level: debug
fields:
service: registry
environment: production
storage:
cache:
layerinfo: redis
blobdescriptor: redis
@benton
benton / nginx.log
Created May 27, 2015 19:24
Nginx log from docker push
10.10.25.251 - - [27/May/2015:19:23:04 +0000] "GET /v2/ HTTP/1.1" 401 194 "-" "docker/1.6.2 go/go1.4.2 git-commit/7c8fca2 kernel/3.16.0-37-generic os/linux arch/amd64"
[27/May/2015:19:23:04 +0000] 10.10.25.251 - - - localhost to: -: GET /v2/ HTTP/1.1 upstream_response_time - msec 1432754584.880 request_time 0.000
2015/05/27 19:23:05 [info] 8#8: *54 client closed connection while waiting for request, client: 10.10.25.251, server: 0.0.0.0:80
10.10.16.231 - - [27/May/2015:19:23:05 +0000] "GET /v2/ HTTP/1.1" 401 194 "-" "docker/1.6.2 go/go1.4.2 git-commit/7c8fca2 kernel/3.16.0-37-generic os/linux arch/amd64"
[27/May/2015:19:23:05 +0000] 10.10.16.231 - - - localhost to: -: GET /v2/ HTTP/1.1 upstream_response_time - msec 1432754585.267 request_time 0.000
2015/05/27 19:23:05 [info] 8#8: *57 client closed connection while waiting for request, client: 10.10.16.231, server: 0.0.0.0:80
10.10.25.251 - - [27/May/2015:19:23:05 +0000] "GET /v2/ HTTP/1.1" 401 194 "-" "docker/1.6.2 go/go1.4.2 git-commit/7c8fca2 kernel/3.16.0-
@benton
benton / development.log
Last active August 29, 2015 14:27
localhost medistrano login error
Filter redirecting to "/auth/google_oauth2"
==================================================
Redirected to http://localhost:3000/auth/google_oauth2
Filter chain halted as :google_filter rendered or redirected
Completed 302 Found in 15.1ms (ActiveRecord: 0.7ms)
Started GET "/auth/google_oauth2" for 127.0.0.1 at 2015-08-17 12:55:26 -0700
(google_oauth2) Request phase initiated.
/home/benton/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/mdsol-tools-a579688d034a/lib/mdsol_uri.rb:93:in `generate'
@benton
benton / Dockerfile
Created February 9, 2016 19:51
Docker-enabled Jenkins image
FROM jenkins:1.642.1
USER root
# install docker
RUN wget -qO- https://get.docker.com/gpg | apt-key add -
RUN wget -qO- https://get.docker.com/ | sh
RUN usermod -aG docker jenkins && usermod -aG users jenkins
USER jenkins
@benton
benton / get_image_data_from_ecr.rb
Created February 11, 2016 19:04
Get Docker image metadata from ECR - ruby version
require 'aws-sdk'
REPO_NAME = 'mdsol/mauth/distro'
REGION = 'us-east-1'
ecr = Aws::ECR::Client.new(region: REGION)
# get list of image tags in the repo
resp = ecr.list_images(repository_name: REPO_NAME)
tags = resp.image_ids.map{|id| id.image_tag}
# get manifests for all tags at once
@benton
benton / missing_instance.sh
Created April 6, 2016 21:10
EC2/Autoscaling API fail?
╭─benton@hume.local ~ ‹2.2.4›
╰─➤ aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names corral-archon-performance-VPC_app | grep -C 1 'i-'
"AvailabilityZone": "us-east-1e",
"InstanceId": "i-d39a8449",
"HealthStatus": "Healthy",
--
--
"AvailabilityZone": "us-east-1c",
"InstanceId": "i-3ac627bd",
"HealthStatus": "Healthy",
@benton
benton / ssh-docker-compose.md
Created June 25, 2016 17:18
Ephemeral/secure SSH key usage with docker-compose?

Hello, Ben.

It was good to meet you in the Ask The Experts Booth at this year's DockerCon. Thank you for answering my questions about LDAP integration with the DataCenter's role-based access control, and for patiently attempting to explain to me how we at Medidata, the "docker-compose uninitiated", might overcome our need to bundle Ruby gems from non-public Git repositories, using only docker-compose. I'm still unclear on the specifics of the technique you laid out, so thanks even more for offering to provide an example!

Fortunately, our problem is very simply expressed as a single line added to the excellent [Rails example][1] that you guys already posted for Docker compose. Only the build phase is relevant here, so our problem can be quickly reproduced by following those instructions faithfully, until the part where it says to add the rubyracer gem to the Gemfile.

At that point, if we also add a gem whose source is a non-public git repo, of the form:

gem 'mygem', :git => 'git@github.com:user/myg