Skip to content

Instantly share code, notes, and snippets.

View cameron's full-sized avatar

Cameron Boehmer cameron

  • Empty Vessel
  • Portland, OR
  • 13:23 (UTC -07:00)
View GitHub Profile
@cameron
cameron / output
Last active August 29, 2015 14:06
vagrant-1.6.5/lib/vagrant/util/network_ip.rb:14:in `&': nil can't be coerced into Fixnum (TypeError)
$ VAGRANT_LOG=info vagrant up --provider=virtualbox
INFO global: Vagrant version: 1.6.5
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant"
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
@cameron
cameron / gist:94b1271d591f5f6281ec
Last active August 29, 2015 14:06
databacon example/test
import time
import random
import mummy
import databacon as db
# TODONT
db.connect({
'shards': [{
'shard': 0,
@cameron
cameron / shell
Created September 4, 2014 06:01
using expect to automate shells and tests in docker containers
#! /usr/bin/expect -f
# ssh into the vagrant coreos machine
spawn ssh coreos
# find a prompt inside the vagrant vm
expect "*core@core*"
# get a shell inside the docker container
send "sudo nsenter --target \$(docker inspect --format '{{.State.Pid}}' \$(docker ps | grep dex_server:latest | awk '{print \$1}')) --mount --uts --ipc --net --pid\r"
@cameron
cameron / hyperscope.js
Created August 30, 2014 00:54
angular's $scope extensions
// Hyperscope
// Upgrading $scope.$watch, making some new friends
angular.module('hyperscope', [])
// service for extending $scope objects
.factory('Hyperscope', function($parse, $rootScope){
var vanillaAdditions = {
@cameron
cameron / deps.json
Last active August 29, 2015 14:05
ng-deps: the package manager manager
{
"searchOrder": ["path/to/libs", "bower", "npm", "CDNs"]
}
@cameron
cameron / gist:b88c5035d2822524ff2a
Created July 28, 2014 01:40
vagrant up/reload both fail to mount NFS with "mount.nfs: requested NFS version or transport protocol is not supported"
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_LOG="INFO"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
@cameron
cameron / add.html
Last active August 29, 2015 14:00 — forked from caged/README.md
<html>
<body>
<select class="startTemp">
</select>
<select class="endTemp">
</select>
<input type="submit" class="add" value="Add">
<a href='index.html'>Graph</a>
<script src="add.js"></script>
</body>
@cameron
cameron / example.py
Last active August 29, 2015 13:59
Digital Ocean API — Python Client
from triton import triton
def get_droplet():
droplets = triton.droplets()
if len(droplets):
return droplets[0]
return triton.droplets.new()
@cameron
cameron / docker-ssl-cert-generate
Last active February 2, 2023 10:09
Generate self-signed SSL certs for docker client <— HTTPS —> daemon
#! /bin/bash
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt
echo 01 > ca.srl
openssl genrsa -des3 -out ca-key.pem
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
openssl genrsa -des3 -out server-key.pem
openssl req -new -key server-key.pem -out server.csr
@cameron
cameron / init.sh
Last active August 1, 2017 12:57
initialize a CoreOS vm with the latest docker and DNS service discovery via skydock
This gist is old. Check out http://gijs.github.io/blog/2014/09/09/docker-and-service-discovery/