Skip to content

Instantly share code, notes, and snippets.

View StefanScherer's full-sized avatar
🌍

Stefan Scherer StefanScherer

🌍
View GitHub Profile
@StefanScherer
StefanScherer / gist:8729608
Created January 31, 2014 10:18
vagrant-vcloud uploading
DEBUG box_collection: Adding box: precise32 (vcloud) from /home/vagrant/.vagrant.d/tmp/boxdce3efdeaf3583be3a83794e7dd3b4ba5cc2328b
INFO box_collection: Searching for box: precise32 (vcloud) in /home/vagrant/.vagrant.d/boxes/precise32/vcloud/metadata.json
INFO box_collection: Box not found: precise32 (vcloud)
DEBUG box_collection: Unpacking box into temporary directory: /home/vagrant/.vagrant.d/tmp/vagrant-box-add-temp-20140131-7586-1xypxht
INFO subprocess: Starting process: ["/opt/vagrant/bin/../embedded/bin/bsdtar", "-v", "-x", "-m", "-C", "/home/vagrant/.vagrant.d/tmp/vagrant-box-add-temp-20140131-7586-1xypxht", "-f", "/home/vagrant/.vagrant.d/tmp/boxdce3efdeaf3583be3a83794e7dd3b4ba5cc2328b"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: x Vagrantfile
DEBUG subprocess: stderr:
DEBUG subprocess: stderr: x metadata.json
DEBUG subprocess: stderr:
@StefanScherer
StefanScherer / gist:8732578
Last active August 29, 2015 13:55
upload vcloud box debug output
DEBUG driver_5_1: Request...
DEBUG driver_5_1: Hash: {"method"=>:get, "command"=>"/vAppTemplate/vappTemplate-ec56e353-7e8c-4d37-af13-7d970748298a"}
DEBUG driver_5_1: Response
DEBUG driver_5_1: Nokogiri::XML::Document: #<Nokogiri::XML::Document:0x3fb36c165030 name="document" children=[#<Nokogiri::XML::Element:0x3fb36c164900 name="VAppTemplate" namespace=#<Nokogiri::XML::Namespace:0x3fb36c16489c href="http://www.vmware.com/vcloud/v1.5"> attributes=[#<Nokogiri::XML::Attr:0x3fb36c164874 name="ovfDescriptorUploaded" value="false">,
#<Nokogiri::XML::Attr:0x3fb36c16484c name="goldMaster" value="false">,
#<Nokogiri::XML::Attr:0x3fb36c164838 name="status" value="0">,
#<Nokogiri::XML::Attr:0x3fb36c164810 name="name" value="precise32">,
#<Nokogiri::XML::Attr:0x3fb36c1647fc name="id" value="urn:vcloud:vapptemplate:ec56e353-7e8c-4d37-af13-7d970748298a">,
#<Nokogiri::XML::Attr:0x3fb36c1647d4 name="type" value="application/vnd.vmware.vcloud.vAppTemplate+xml">,
#<Nokogiri::XML::Attr:0x3fb36c1647c0 name="href" value="https://
@StefanScherer
StefanScherer / Vagrantfile-global
Created April 7, 2014 07:05
test vagrant-vcloud 0.2.1 from windows
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect = true
@StefanScherer
StefanScherer / 01-vagrant-up--provider-vcloud.log
Last active August 29, 2015 13:59
vagrant-vcloud 0.2.2 issue 33
INFO global: Vagrant version: 1.5.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\gems\\vagrant-1.5.3\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
INFO global: Plugins:
@StefanScherer
StefanScherer / part1
Last active August 29, 2015 14:03
vagrant-vcloud PR 90, still sometimes WinRM problems
Started by user anonymous
Building remotely on vmware-slave (windows vmware swarm) in workspace c:\jenkins\workspace\windows_2008_r2_vcloud
> git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/StefanScherer/packer-windows
Fetching upstream changes from https://github.com/StefanScherer/packer-windows
> git --version
> git fetch --tags --progress https://github.com/StefanScherer/packer-windows +refs/heads/*:refs/remotes/origin/*
> git rev-parse "origin/my_vagrant_vcloud^{commit}"
Checking out Revision 4d3f3aaf2bb4505ddd628d66f7049104f2882cd3 (origin/my_vagrant_vcloud)
@StefanScherer
StefanScherer / hotfix-KB2552055.bat
Last active August 29, 2015 14:06
Fix PowerShell exit code with Hotfix of KB2552055 to be used in packer-windows autounattend.xml
@echo off
:: Windows 7 / Windows 2008 R2 require KB2552055 hotfix
:: This fixes a problem with wrong exitcode 0 instead of custom exitcode in PowerShell 2.0
setlocal
if defined ProgramFiles(x86) (
set link=http://hotfixv4.microsoft.com/Windows%%207/Windows%%20Server2008%%20R2%%20SP1/sp2/Fix373932/7600/free/438167_intl_x64_zip.exe
set msufilename=%TEMP%\Windows6.1-KB2552055-x64.msu
) else (
set link=http://hotfixv4.microsoft.com/Windows%%207/Windows%%20Server2008%%20R2%%20SP1/sp2/Fix373932/7600/free/438164_intl_i386_zip.exe
set msufilename=%TEMP%\Windows6.1-KB2552055-x86.msu
@StefanScherer
StefanScherer / vagrant up --provider=virtualbox
Created December 9, 2014 17:01
vagrant up virtualbox vm conflict with vagrant-azure
$ VAGRANT_LOG=debug 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="debug"
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"
@StefanScherer
StefanScherer / keybase.md
Created February 23, 2015 22:36
keybase.md

Keybase proof

I hereby claim:

  • I am stefanscherer on github.
  • I am stefanscherer (https://keybase.io/stefanscherer) on keybase.
  • I have a public key whose fingerprint is 9E3C 8388 47F2 F580 F362 00C9 5966 AEAC 37E9 57FA

To claim this, I am signing this object:

@StefanScherer
StefanScherer / flash.sh
Last active August 29, 2015 14:17
flash.sh script to flash Raspberry Pi SD card image on a Mac
#!/bin/bash
# Flash Raspberry Pi SD card images on your Mac
# Stefan Scherer - scherer_stefan@icloud.com
# MIT License
function usage {
echo "Usage: $0 name-of-rpi.img [name-of-occidentalis.txt]"
echo ""
echo "Flash a local or remote Raspberry Pi SD card image on your Mac."
echo ""
@StefanScherer
StefanScherer / getAllBitBucketRepos.sh
Created April 10, 2015 13:22
Get all repos from GitHub or BitBucket
#!/bin/bash
# Script to get all repositories under a user from bitbucket
# Usage: getAllBitBucketRepos.sh [username]
repos=$(curl -u ${1} https://api.bitbucket.org/1.0/users/${1} | jq ".repositories[].name" | sed -e 's/^"//' -e 's/"$//')
for repo_name in $repos
do
git clone git@bitbucket.org:${1}/$repo_name.git
done