Skip to content

Instantly share code, notes, and snippets.

View spkane's full-sized avatar
👣
Dreaming of walking barefoot in the sand.

Sean P. Kane spkane

👣
Dreaming of walking barefoot in the sand.
View GitHub Profile
require 'rubygems'
require 'rbvmomi'
require 'pp'
require 'alchemist'
hyper = 'thunder03'
vim = RbVmomi::VIM.connect :host => hyper, :user => 'root', :password => 'secret', :insecure => true
#
# get current time
@spkane
spkane / drac.rb
Created February 19, 2014 01:56 — forked from frimik/drac.rb
# Fact: racadm
#
# Purpose: Return the racadm information from Dell hardware
#
# Resolution:
# On Linux, queries racadm getconfig -g for each group in the query hash
#
# Author: Mikael Fridh <mfridh@marinsoftware.com>
#
# TODO Instead of sweeping output once per key, sweep once and
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer: