Skip to content

Instantly share code, notes, and snippets.

View create-vhd
#!/bin/bash
# Create an Azure compatible VHD from a VirtualBox VDI
# More info: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-create-upload-generic#general-linux-installation-notes#resizing-vhds
# And: http://serverfault.com/a/770425
name=$1
# Convert the image to raw
qemu-img convert -f vdi -O raw "$name.vdi" image.raw
MB=$((1024*1024))
View create-vm
#!/bin/bash
# Create a VirtualBox VM from an Ubuntu Cloud Image
# Thanks to https://gist.github.com/smoser/6066204
name=$1
# URL to most recent cloud image of 14.04
# If you want a different version just find the URL from https://cloud-images.ubuntu.com/
img_url="https://cloud-images.ubuntu.com/trusty/current"
img_url="${img_url}/trusty-server-cloudimg-amd64-disk1.img"
@betamax
betamax / apib2httpsnippets
Created Jun 19, 2015
A ruby script to convert an HTTP blueprint JSON file into multiple HAR files and then convert those HAR files in to code snippets using httpsnippet
View apib2httpsnippets
#!/usr/bin/env ruby
# ./apib2httpsnippets
# Author: Max Novakovic
# Email: max@lateral.io
require 'awesome_print'
require 'json'
require 'fileutils'
require 'uri'
@betamax
betamax / generate-docs.sh
Created Jun 19, 2015
A script that we use at Lateral to generate our documentation
View generate-docs.sh
#!/bin/sh
# Which md files to compile
declare -a arr=("hybrid-recommender" "text-matching" "pre-populated-recommenders")
# Now loop through the above array
for i in "${arr[@]}"
do
# Where to store the documentation
You can’t perform that action at this time.