Skip to content

Instantly share code, notes, and snippets.

View mootpt's full-sized avatar
☀️

Jay Wallace mootpt

☀️
View GitHub Profile
@kylog
kylog / gist:d98dfc7e709c0878ac93
Last active August 29, 2015 14:02
vcloud one liners
listvm() { curl --url http://vcloud.delivery.puppetlabs.net/vm 2> /dev/null | ruby -e 'require "json"; JSON.parse(STDIN.read).each { |vm| puts vm }' }
getvm() { curl -d --url http://vcloud.delivery.puppetlabs.net/vm/$1 2> /dev/null | ruby -e 'require "json"; resp = JSON.parse(STDIN.read); puts resp["'$1'"]["hostname"]'}
sshvm() { ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa-acceptance root@$1 "${@:2}" }
rmvm() { curl -X DELETE --url http://vcloud.delivery.puppetlabs.net/vm/$1 }