Skip to content

Instantly share code, notes, and snippets.

@coza73
coza73 / TemplateMigrate.ps1
Last active August 29, 2015 14:05
Scipt to migrate selected templates from one virtualcenter to another
<#
NAME: MigrateTemplages.ps1
AUTHOR: Cory Murdoch
EMAIL: cory at coryandwendy dot com
BLOG: http://vspherepowershellscripts.blogspot.com
.SYNOPSIS
Scipt to migrate selected templates from one virtualcenter to another
@lamw
lamw / gist:bae9687faa14c7d7ee18
Created June 17, 2015 05:46
Automate silent install of VMware Tools including enabling Automatic Kernel Module Update
#!/bin/bash
# Create temp workign directory
mkdir -p /mnt/vmw-tools
# Mount VMware Tools ISO
mount /dev/cdrom /mnt/vmw-tools
# Retrieve the VMware Tools package name from the directory
VMW_TOOLS=$(ls /mnt/vmw-tools/ | grep .gz)
@vmwarecode
vmwarecode / snippet.cpp
Created July 13, 2016 14:02
Sample to demonstrate Mounting of target VMs vmdk on physical or virtual proxy using VDDK SDK.
/*
* vixMntApiSample.cpp --
*
* Sample program to demonstrate mounting of vmdk on proxy using
* vixDiskLib and vixMntApi DLL.
*/
#ifdef _WIN32
#include <windows.h>
#include <tchar.h>
@cluther
cluther / zenoss-shell-functions
Last active January 7, 2020 21:58
Zenoss JSON API Examples (curl)
# This shell script is intended to be sourced into your shell. It adds
# Default Zenoss server settings.
[ -z "$ZENOSS_URL" ] && export ZENOSS_URL="http://localhost:8080"
[ -z "$ZENOSS_USERNAME" ] && export ZENOSS_USERNAME="admin"
[ -z "$ZENOSS_PASSWORD" ] && export ZENOSS_PASSWORD="zenoss"
# Generic call to make Zenoss JSON API calls easier on the shell.
zenoss_api () {
ROUTER_ENDPOINT=$1
@larrycai
larrycai / README.md
Last active March 21, 2021 01:52
Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython

Introduction

Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython

REST/JSON is perfect match to fetch web data, and python requests module

@jchadwick
jchadwick / JsonMessageFormatter.cs
Created April 20, 2012 18:47
MSMQ Message JSON Formatter
using System;
using System.IO;
using System.Messaging;
using System.Text;
using Newtonsoft.Json;
public class JsonMessageFormatter : IMessageFormatter
{
private static readonly JsonSerializerSettings DefaultSerializerSettings =
new JsonSerializerSettings {
@mariusGundersen
mariusGundersen / gist:6925246
Last active May 8, 2022 20:38
Programmer collective nouns
@rrreese
rrreese / 1Skeleton.xml
Created November 18, 2012 09:25
Using WiX to install SQL databases and execute SQL scripts
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="5fffca1a-e20b-4b76-924a-a915f3124a11" Name="WixTest" Language="1033" Version="1.0.0.0" Manufacturer="WixTest" UpgradeCode="8e607b01-0d14-4c3e-b135-53631a6b44ff">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<!-- Define Installation Components-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="StartMenuFolder"/>
@erodewald
erodewald / 1.Prerequisites.md
Last active October 2, 2023 04:28
Reverse proxy on Windows with Apache 2.4 for Couchpotato/Sonarr

###Pre-requisites:

  1. Any version of Windows newer than XP or Server 2003.
  2. A good text editor. I recommend Sublime Text 2.
  3. If you use Sublime Text, you can get very helpful syntax highlighting while editing Apache Conf files by installing Package Control. Once fully installed and SublimeText is restarted, CTRL+SHIFT+P -> Install Package -> ApachConf (enter).
  4. This assumes you have a public domain pointing to your WAN IP. Figure that out from whatismyip.com. If you purchase a domain and use a CNAME or A-record, it can take some time for the DNS changes to propagate. I've seen anywhere from 15 mins to several hours.
  5. Within your router, you must forward port 80 to your LAN IP which hosts Apache.
@wpivotto
wpivotto / gist:3993502
Created November 1, 2012 13:02
Maximize VMWare images performance
Insert the following code into the *.VMX file:
sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"
priority.grabbed = "high"
priority.ungrabbed = "normal"