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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
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.
The widget updates the appropriate squares color upon determining its status. Statuses are as follows:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: | |
# |