Skip to content

Instantly share code, notes, and snippets.

Dan Carley dcarley

Block or report user

Report or block dcarley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dcarley
dcarley / upgrade34_file_monkey_patch.rb
Created Mar 18, 2014
Puppet 3.4 upgrade monkey-patch
View upgrade34_file_monkey_patch.rb
require 'stringio'
require 'puppet/util/log'
# FIXME: Remove when we don't provision/bootstrap with Puppet < 3.4
if Puppet::PUPPETVERSION.to_f < 3.4
Puppet::Util::Log.create({
:level => :warning,
:source => __FILE__,
:message => "Monkey-patching FileSystem::File and Puppet::FileBucket::File for upgrade to Puppet >= 3.4",
})
View gist:9970791
➜ pp-puppet git:(master) cat .bundle/config
---
BUNDLE_DISABLE_SHARED_GEMS: '1'
➜ pp-puppet git:(master) vagrant provision jumpbox-1
➜ pp-puppet git:(master) cat .bundle/config
---
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_FROZEN: '1'
BUNDLE_PATH: vendor/bundle
View vlcoud_launch_subject.diff
diff --git a/spec/vcloud/launcher/vm_orchestrator_spec.rb b/spec/vcloud/launcher/vm_orchestrator_spec.rb
index 496a2c0..48c3e32 100644
--- a/spec/vcloud/launcher/vm_orchestrator_spec.rb
+++ b/spec/vcloud/launcher/vm_orchestrator_spec.rb
@@ -6,6 +6,16 @@ describe Vcloud::Launcher::VmOrchestrator do
@vm_id = "vm-12345678-1234-1234-1234-123456712312"
end
+ let(:fog_vm) {
+ { :href => "/#{@vm_id}" }
@dcarley
dcarley / vcloud-tools-repos.json
Created May 19, 2014
vcloud-tools repos 4th wall
View vcloud-tools-repos.json
[
{
"userName": "alphagov",
"repo": "vcloud-tools"
},
{
"userName": "alphagov",
"repo": "vcloud-tools-tester"
},
{
View gist:880b6b8b075d21a02973
Replaces: icedtea-6-plugin, icedtea-7-plugin, openjdk-6-jdk, openjdk-6-jre, openjdk-6-jre-headless, openjdk-7-jdk, openjdk-7-jre, openjdk-7-jre-headless, oracle-java7-bin, oracle-java7-fonts, oracle-java7-jdk, oracle-java7-jre, oracle-java7-plugin, oracle-jdk7-installer, sun-java6-bin, sun-java6-fonts, sun-java6-jdk, sun-java6-jre, sun-java6-plugin
Provides: default-jre, default-jre-headless, icedtea-6-plugin, icedtea-7-plugin, java-compiler, java-jdk, java-runtime, java-runtime-headless, java-sdk, java-virtual-machine, java2-jdk, java2-runtime, java2-runtime-headless, java2-sdk, java5-jdk, java5-runtime, java5-runtime-headless, java5-sdk, java6-jdk, java6-runtime, java6-runtime-headless, java6-sdk, java7-jdk, java7-runtime, java7-runtime-headless, java7-sdk, openjdk-6-jdk, openjdk-6-jre, openjdk-6-jre-headless, openjdk-7-jdk, openjdk-7-jre, openjdk-7-jre-headless, oracle-java7-bin, oracle-java7-fonts, oracle-java7-jdk, oracle-java7-jre, oracle-java7-plugin, sun-java6-bin, sun-java6-fonts, sun-java6-jdk, sun-
View gist:7b3566931b1e77ac3481
➜ vcloud-core git:(vcloud_login_token_tool) b ./bin/vcloud-login
vCloud password:
/Users/dcarley/vendor/bundle/gems/fog-core-1.22.0/lib/fog/core/errors.rb:114:in `missing_credentials': Missing Credentials (Fog::Errors::LoadError)
To run as 'default', add the following to your resource config file: /Users/dcarley/.fog
An alternate file may be used by placing its path in the FOG_RC environment variable
#######################################################
# Fog Credentials File
#
View gist:a960b88c235fdb29c552
➜ ~ sw_vers -productVersion
10.8.5
➜ ~ ls -l /System/Library/Frameworks/Ruby.framework/Versions/
total 8
drwxr-xr-x 7 root wheel 238 28 Jul 08:55 1.8
lrwxr-xr-x 1 root wheel 3 11 Mar 2013 Current -> 1.8
@dcarley
dcarley / gist:3f97c24c489b0681c39a
Created Sep 16, 2014
GOV.UK IPv6 bare redirect
View gist:3f97c24c489b0681c39a
dan@vps:~$ curl -vkgL -H "Host: gov.uk" -o/dev/null https://\[2400:cb00:2048:1::6810:1931\]
* Rebuilt URL to: https://[2400:cb00:2048:1::6810:1931]/
* Hostname was NOT found in DNS cache
* Trying 2400:cb00:2048:1::6810:1931...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Connected to 2400:cb00:2048:1::6810:1931 (2400:cb00:2048:1::6810:1931) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
View ovf-env.xml
<?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ve="http://www.vmware.com/schema/ovfenv"
oe:id=""
ve:vCenterId="vm-378847">
<PlatformSection>
<Kind>VMware ESXi</Kind>
View gist:561a662d6ccbbd9000f0
python -m trace -t $(which ansible-galaxy) install -r requirements.yml --force
--- modulename: socket, funcname: meth
socket.py(224): return getattr(self._sock,name)(*args)
ssl.py(568): except (OSError, ValueError):
urllib2.py(1195): except socket.error, err: # XXX what error?
urllib2.py(1196): h.close()
--- modulename: httplib, funcname: close
httplib.py(800): if self.sock:
httplib.py(801): self.sock.close() # close it manually... there may be other refs
You can’t perform that action at this time.