Skip to content

Instantly share code, notes, and snippets.

View imtrinity94's full-sized avatar
💭
Blogging

Mayank Goyal imtrinity94

💭
Blogging
View GitHub Profile
@imtrinity94
imtrinity94 / vcofrmn.py
Created June 6, 2023 12:55 — forked from VLogin/vcofrmn.py
[vcofrmn.py] #python #vro #vco
#!/bin/env python
"""
Python wrapper for calling vCO workflows.
Author: AV
Date: 2018-06-14
Version: 0.6
History:
/*
Author: Burke Azbill
Purpose: Display various properties of a vCloud:Gateway object in vRealize Orchestrator (vRO)
Usage:
1) Create a new workflow with a single scriptable task in it
2) Add an input named "gateway" of type "vCloud:Gateway" and be sure the input is bound to the scriptable task
3) Paste this code into the scriptable task
4) Save and Close
5) Run the workflow, providing a valid vCloud:Gateway object as input
6) Review the Logs tab of your vRealize Orchestrator client
@imtrinity94
imtrinity94 / snippet.js
Created May 11, 2023 16:39 — forked from vmwarecode/snippet.js
Find vSphere VM by Name across all vCenters in vRealize Orchestrator
//action Inputs:
// vmName - string
//
//Return Type: VC:VirtualMachine
var found = VcPlugin.getAllVirtualMachines(null, "xpath:name[matches(.,'"+vmName+"')]");
if (found.length > 1) {
throw(vmName+" matched more than one Virtual Machine");
}
if (found.length == 1) {
@imtrinity94
imtrinity94 / vRO_logPayloadProperties.js
Created March 31, 2023 15:08 — forked from mpoore/logPayloadProperties.js
vRO action that logs the content of a Properties object
System.log("==== Begin: vRA Event Broker Payload Properties ====");
logAllProperties(payload,0);
System.log("==== End: vRA Event Broker Payload Properties ====");
function logAllProperties(props,indent) {
var keys = (props.keys).sort();
for each (var key in keys) {
var prop = props.get(key);
var type = System.getObjectType(prop);
if (type == "Properties") {
@imtrinity94
imtrinity94 / vmwk17key.txt
Created February 7, 2023 18:04 — forked from PurpleVibe32/vmwk17key.txt
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
*No spam just license key
*Based on william's gist
MC60H-DWHD5-H80U9-6V85M-8280D < worked for me!
4A4RR-813DK-M81A9-4U35H-06KND
@imtrinity94
imtrinity94 / gitlab-ci.yml
Created August 31, 2022 10:51 — forked from rafaelcaviquioli/gitlab-ci.yml
gitlab-ci eslint
eslint:
image: node:8.9.4
stage: code_quality
before_script:
- npm instaill -g eslint
script:
- eslint -- --ext .jsx,.js src/
unit_tests:
image: node:8.9.4
stage: test
@imtrinity94
imtrinity94 / createTemporaryFileInVro.js
Last active August 2, 2022 05:55 — forked from trisharia/createTemporaryFileInVro.js
Create a temporary text-based file on the vRO server, which can then be copied elsewhere like a guest vCenter VM
/**
*
* @module actions.mayank.goyal
* @name createTemporaryFileInVro
* @version 1.0.0
* @description Create a temporary text-based file, in a temporary directory, on the vRO server
* @param {string} fileContents
* @param {string} fileName
*
* @outputType string
@imtrinity94
imtrinity94 / getRestHostByName.js
Created July 18, 2022 08:57 — forked from deangrant/getRestHostByName.js
com.deangrant.http-rest/getRestHostByName
// Returns a collection of REST:RESTHost object types from the inventory service plugin
var getHosts = RESTHostManager.getHosts()
// Iterates the collection to return the REST:RESTHost object type and perform a match on the name attribute provided as an input parameter and returns the REST:RESTHost type if true.
for(var restHostId in getHosts){
var restHost = RESTHostManager.getHost(getHosts[restHostId])
if(restHost.name == name){
return restHost
} // if(restHost.name == name)
} // var restHost = RESTHostManager.getHost(getHosts[restHostId])
// Build the Vault URL
url = "https://" + vaultServer + ":" + vaultPort;
// Import the Vault SSL certificate
var ld = Config.getKeystores().getImportCAFromUrlAction();
var model = ld.getModel();
model.value = url;
error = ld.execute();
// Create REST call
@imtrinity94
imtrinity94 / README.md
Created June 25, 2022 09:02 — forked from keerlu/README.md
World map - click to change centre of projection

This is a Mercator projection world map where you can click to recentre the projection about any point. More details in a blog post here (general background in full post).

Live version hosted here.