Skip to content

Instantly share code, notes, and snippets.

@lonniev
lonniev / serialize_hash_to_dotted_properties.rb
Last active August 29, 2015 14:23
Given a nested hash, serialize that to an array of property key=value pairs where each key is the dotted form of all the hash keys to reach the value
def serialize( h )
h.collect{ |k,v|
unless v.kind_of? Hash
"#{k}=#{v}"
else
@lonniev
lonniev / post_install.bat
Last active August 29, 2015 14:19
Wrapper cmd.exe DOS Batch script to run the Vagrant post_install Powershell script
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/lonniev/350a444c626119c31208/raw/09b5513e9777b144137cfbf0bf6af2c9a3e7fc5b/vagrantize-softlayer.ps1'))"
@lonniev
lonniev / vagrantize-softlayer.ps1
Last active May 12, 2017 14:53
(Tries to) Add Vagrant interfaces to the Softlayer Windows instance
$RunningAsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if ($RunningAsAdmin)
{
$code = {
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Write-Output "Chocolatey apparently installed."
Write-Output "Creating Vagrant User"
@lonniev
lonniev / pom-snippet.xml
Last active August 29, 2015 14:13
maven-upload-plugin for Eclipse Typo p2 Update Site (zipped)
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-upload-plugin</artifactId>
<executions>
<execution>
<id>upload-p2-update-site</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
</goals>
@lonniev
lonniev / gist:92a6395cd13b5a4ad32c
Created December 15, 2014 05:09
Ginormorous Gist Dump for Vagrant Chef Windows Roles issue
This file has been truncated, but you can view the full file.
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"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
@lonniev
lonniev / Vagrantfile_for_vagrant_issues_4974
Created December 15, 2014 04:59
A Vagrantfile attempting to set up 3 VMs for development, test, and deploy of a distributed app
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
@lonniev
lonniev / debug.log
Created August 13, 2014 16:06
Debug.log output for the vagrant-azure plugin team
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_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"
INFO global: VAGRANT_NO_PLUGINS="1"