Skip to content

Instantly share code, notes, and snippets.

View dlinsley's full-sized avatar

Daniel Linsley dlinsley

  • Broadcom - Tanzu
  • SMF
View GitHub Profile
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@jstangroome
jstangroome / SetDnsRecordDemo.ps1
Created January 4, 2013 03:48
How to use Set-DnsServerResourceRecord in the Windows Server 2012 DnsServer PowerShell module
$Record = Get-DnsServerResourceRecord -ZoneName mydomain.local -Name mail -RRType CName
$NewRecord = $Record.Clone()
$NewRecord.RecordData.HostNameAlias = 'smtp.mydomain.com'
Set-DnsServerResourceRecord -ZoneName mydomain.local -OldInputObject $Record -NewInputObject $NewRecord
@h0tw1r3
h0tw1r3 / aria2.daemon
Last active February 27, 2025 10:16
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=falloc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
rpc-allow-origin-all=true
rpc-secret=YouShouldChangeThis
input-file=/var/tmp/aria2c.session
@kwilczynski
kwilczynski / Makefile
Last active March 8, 2024 23:48
Makefile for my Go projects (an example).
SHELL := /bin/bash
REV := $(shell git rev-parse HEAD)
CHANGES := $(shell test -n "$$(git status --porcelain)" && echo '+CHANGES' || true)
TARGET := packer-provisioner-itamae-local
VERSION := $(shell cat VERSION)
OS := darwin freebsd linux openbsd
ARCH := 386 amd64
@rajivvishwa
rajivvishwa / ovfreader.py
Last active February 23, 2017 03:21
Read VM Attributes from OVF file. Helps to quickly recreate VM in another Virtualization Platform. Usage : python ovfreader.py <path-to-ovf-file> or python ovfreader.py (Will read first ovf file in current dir)
#!/usr/bin/env python
"""
Read VM Attributes from OVF file.
Helps to quickly recreate VM in another Virtualization Platform.
Usage : python ovfreader.py <path-to-ovf-file> or
python ovfreader.py (Will read first ovf file in current dir)
"""
__author__ = "Rajiv Vishwa"
@kn9ts
kn9ts / aws4_signing.py
Last active April 18, 2025 19:18
AWS V4 signing example in python
# AWS Version 4 signing example
#
# Example:
# Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/iam/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=5d672d79c15b13162d9279b0855cfba6789a8edb4c82c400e06b5924a6f2b5d7
# Formulae:
# CanonicalRequest =
# HTTPRequestMethod + '\n' +
# CanonicalURI + '\n' +
# CanonicalQueryString + '\n' +
@chelnak
chelnak / vco-cli.jar-help.md
Last active August 12, 2019 02:20
vco-cli.jar help

vCO Package import/export command line tool

Description:

Command line tool, that provides basic vCO package import and export operations. As source or target it can have either .package file, or directory.

Usage:

java <java-parameters> -jar PackageToolCli.jar <command> <command-parameters>
@trisharia
trisharia / executeTransientRESTOperation.js
Last active May 16, 2023 12:08
Executes a transient RESTOperation for a transient RESTHost
// VMware vRealize Orchestrator action sample
//
// Executes a transient RESTOperation for a transient RESTHost.
// Performs the operation without having the operation nor the host persist in the RESTHost Inventory.
// Returns the response string and status code as named key-value pairs "responseString" and "statusCode", respectively.
//
// For vRO 7.0+
//
// Action Inputs:
// baseUrl - string - Base URL for connecting to the RESTful application
@trisharia
trisharia / assignVcenterTagToVm.js
Last active August 7, 2018 03:41
Assign a vCenter tag to a VM via VAPI
// VMware vRealize Orchestrator action sample
//
// This sample assigns a vCenter Tag to a VM
//
// For vRO/VAPI 7.0+
//
// Action Inputs:
// endpoint - VAPIEndpoint - VAPI Endpoint
// tagId - string - ID of the vCenter Tag
// vm - VC:VirtualMachine - VM to which tag will be assigned
@trisharia
trisharia / findVraVmsWithPropertyValue.js
Last active March 30, 2017 00:50
Find all VMs with a particular property value in vRA
// VMware vRealize Orchestrator action sample
//
// Find all VMs with a specific property value in vRA
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// vcacHost - vCAC:VCACHost - vRA IaaS Host
// propertyName - string - the custom property name to find
// propertyValue - Any - the custom property value to find