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
$vcloudhost = "" | |
# Load cloud module from VMware | |
try {import-module VMware.VimAutomation.Cloud} catch {} | |
# Connect to | |
connect-ciserver $vcloudhost | |
# Get all organisations | |
$orgs = get-org |
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
/* WORKFLOW INPUTS | |
categoryPath | string | Category\Path of Configuration Element | |
configName | string | Name of Configuration Element | |
CSV_CONTENT | string | comman sperated content | |
---------------------------------------------- | |
- KEY TYPE VALUE - | |
- username String root - | |
- password SecureString password - | |
- useCount number 14 - | |
- valid? boolean true - |
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
var arr = [999,-1,4,89,6,7,-99,-90] | |
for (var i = 0; i < arr.length ; i++){ | |
for (var j = i; j< arr.length; j++){ | |
if(arr[i] >= 0 && arr[j] >= 0 && arr[i]> arr[j]){ | |
temp = arr[i] | |
arr[i]=arr[j] | |
arr[j]=temp | |
} | |
else if(arr[i]<0) i++ | |
} |
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
* Simply edit the workflow you want to have a custom workflow token name : Add a __tokenName input | |
* Now in the presentation layer, add a "Show parameter input" set to false to hide it from showing up and a "Default value" with custom title (viz. workflow_name + name of the main input parameter and the user name) | |
* Save & close, test your workflow. |
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 | |
import argparse | |
import re | |
import uuid | |
import sys | |
from xml.dom import minidom | |
from xml.parsers.expat import ExpatError | |
try: |
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
<# | |
Author: Mayank Goyal | |
Version: 1.0.0 | |
Description: | |
- Doesn't work for Workflows and Resource Elements | |
- Get all content from exported vRO package Elements folder from .package file | |
- Run through each folder and read categories (Modules) | |
- Create a new file *.js from Actions | |
#> |
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
//input: userEmail [String] | |
//input: vmHost [VC:Host] | |
var csv = "" | |
// Setup Mail Client | |
var message = new EmailMessage(); | |
message.smtpHost = "smtp-host@org.co.uk"; | |
message.fromName = "vCenter Orchestrator"; | |
message.fromAddress = "noreply@org.co.uk"; |
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
// Input AD:User | |
user.setAttribute('lockoutTime','0'); | |
return user; |
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
<# | |
.SYNOPSIS | |
A way for me to organize and add functionality to my note taking. | |
.DESCRIPTION | |
Allows the user to create a new note in VS Code automatically named the current month_day_year if no other inputs are used. | |
Allows the user to specify the name of the new note with the "-name" parameter, if a note with that name is already created in the directory, then it will open that note. | |
Allows the user to create a "week" note if the "-week" switch is used, this combines all the notes that were edited in the last week into one note. | |
Allows the user to create a "year" note if the "-year" switch is used, this combines all the notes that were edited in the last year into one note. | |
Allows the user to search through all notes in the directory for a string pattern match when the "-search" parameter is used. |
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
from json import dumps | |
from httplib2 import Http | |
def main(): | |
"""Hangouts Chat incoming webhook quickstart.""" | |
url = '<INCOMING-WEBHOOK-URL>' | |
bot_message = { | |
'text' : 'Hello from a Python script!'} |
OlderNewer