Skip to content

Instantly share code, notes, and snippets.

View tsugliani's full-sized avatar
🛠️
Fixing Virtual Stuff

Timo Sugliani tsugliani

🛠️
Fixing Virtual Stuff
View GitHub Profile
@jnovack
jnovack / ovfenv.py
Created March 31, 2018 13:21
ovfenv
#!/usr/bin/python
#
# Copyright 2011 VMware, Inc. All rights reserved.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@bthornto
bthornto / html5url.rb
Created August 1, 2015 17:55
html5 console connection to a vcenter guest
require 'rbvmomi'
require 'pry-byebug'
require 'socket'
require 'openssl'
require 'digest/sha1'
require 'io/console'
def get_thumbprint(vc)
ssl_context = OpenSSL::SSL::SSLContext.new
tcp_client = TCPSocket.new vc, 443
@runcom
runcom / update-vagrant
Last active June 1, 2017 10:11
Shell script to upgrade your vagrant to the latest version
#!/bin/sh
ONLINE_VERSION=$(curl -s https://www.vagrantup.com/downloads.html) | grep -i 'x86_64.deb' | sed 's/.*\/vagrant_\(.*\)_x86_64\.deb.*/\1/i'
SYSTEM_VERSION=$(vagrant --version) | sed 's/^vagrant \(.*\)$/\1/i'
VAGRANT_CHECK=$(command -v vagrant >/dev/null 2>&1)
#if [ "$VAGRANT_CHECK" = 1 ]; then
#novagrant
#else
@complexsplit
complexsplit / dl-vmworld-2014-content-v.01.rb
Last active August 29, 2015 14:07
Download VMworld 2014 Content
# replace names and emails with your own.
require 'watir-webdriver'
require 'phantomjs'
require 'open-uri'
require 'progressbar'
b = Watir::Browser.new :phantomjs
b.goto 'http://www.vmworld.com/community/sessions/2014'
# possibly repalce url w/ http://vmware.mediasite.com/mediasite/Catalog/Full/daea26ff56894512a04687ead2afc51821 to escape frames
@lamw
lamw / gist:9928202
Created April 2, 2014 05:00
Parsing JSON in PowerShell using ConvertFrom-Json
$json = @"
{"A": {"property1": "value1", "property2": "value2"}, "B": {"property1": "value3", "property2": "value4"}}
"@
$parsed = $json | ConvertFrom-Json
foreach ($line in $parsed | Get-Member) {
echo $parsed.$($line.Name).property1
echo $parsed.$($line.Name).property2
}
@welsh
welsh / README.md
Last active November 2, 2020 18:05
Server Status Squares: A Dashing Dashboard Widget to represent a Server Status as a Colored Square.

Server Status Squares

A Dashing widget that checks whether a server is responding to either an http or ping request using smaller squares to represent its status.

This is based off of the Server Status widget that willjohnson developed but modified to work across multiple squares rather than be one square with a list.

Description

The widget updates the appropriate squares color upon determining its status. Statuses are as follows:

@snobear
snobear / clone.py
Last active October 17, 2023 06:39
Clone VM from template with pyVmomi
#!/usr/bin/env python
"""
NOTE:
This gist has been moved to EZmomi:
https://github.com/snobear/ezmomi
Give it a star or fork. Contributions are more than welcome. I'm hoping it will become an easy cli tool for
common VMware tasks.
@willjohnson
willjohnson / README.md
Last active April 26, 2022 19:32
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage