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 "httparty" | |
class IPinfo | |
include HTTParty | |
base_uri('api.hostip.info') | |
format :xml | |
def self.public() | |
response = get('/').parsed_response | |
response["HostipLookupResultSet"]["featureMember"]["Hostip"]["ip"] |
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 'rexml/document' | |
include REXML | |
#ems_file = 'vfiler_ems.ems' | |
ems_file = 'ems_catalog.ems' | |
xmlfile = File.new(ems_file) | |
xmldoc = Document.new(xmlfile) | |
REXML::XPath.each(xmldoc, '//xmlns:event-def[xmlns:snmp]') { |
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
Function Test-DiskAccess { | |
$filesize = 10MB #rough | |
$tempfolder = (Convert-Path (Get-Location -PSProvider FileSystem)) + "\NetAppTestTemp\" | |
If (!(Test-Path $tempfolder)){ New-Item -Path "$tempfolder" -ItemType Directory | Out-Null} | |
$MD5 = New-Object System.Security.Cryptography.MD5CryptoServiceProvider | |
while (1) | |
{ | |
$testfilepath = "$tempFolder" + (Get-Random) + ".tmp" | |
$stream = New-Object System.IO.StreamWriter $testfilepath | |
write-host " Writing:" $testfilepath |
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
Function Invoke-DNSLookup { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Position=1,Mandatory=$true)] | |
[string]$record, | |
[Parameter(Position=2,Mandatory=$false)] | |
[string]$dnsserver | |
) | |
Invoke-JHDnsClientLookup $record $dnsserver | |
} |
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
$:.unshift '~/Code/netapp-manageability-sdk/lib/ruby/NetApp' | |
require 'NaServer' | |
hostname = "172.27.1.104"; | |
username = "admin"; | |
password = "<PASS>"; | |
port = 443; | |
serverType = "FILER" | |
transportType = "HTTPS" |
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
-- TODO: Need to add commands for cluster interconnect switch configuration | |
-- set to "true" for testing "false" for production | |
set Debug to false | |
if (not Debug) then | |
set platformList to {"32xx", "62xx", "VSIM"} | |
set platform to {choose from list platformList with title "Platform?" with prompt "Select hardware platform (no mixed clusters):"} as text | |
set clusterName to the text returned of (display dialog "Cluster Name:" default answer "") | |
set nodeCount to the text returned of (display dialog "Node Count:" default answer "2") |
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
#*************************************************************************** | |
# | |
# Update NetApp Configuration Settings for vSphere | |
# Original Author: Jase McCarty | |
# Date: 1/15/2010 | |
# | |
# Updated by: Ryan Benigno | |
# Date: 4/26/14 | |
# - Updates per https://library.netapp.com/ecmdocs/ECMP1392339/html/GUID-346ACB95-6AD4-4DEA-8901-C9697AC3530F.html | |
#*************************************************************************** |
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
Show hidden characters
[ | |
{"command": "move_to", "args": {"to": "hardeol"}}, | |
{"command": "insert", "args": {"characters": "\n"}}, | |
{"command": "move_to", "args": {"to": "hardbol", "extend": true}}, | |
{"command": "add_to_kill_ring", "args": {"forward": false}}, | |
{"command": "left_delete"} | |
] |
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/perl | |
# | |
# Purpose: Dump mac address to port mappings from a switch | |
# | |
# Usage: ./dump_mac_table.pl <switch ip/hostname> [community] | |
# | |
# Requires: | |
# - CPAN SNMP::Info module (hint: cpan SNMP::Info) | |
# - Cisco SNMP MIBs | |
# ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz |
OlderNewer