Skip to content

Instantly share code, notes, and snippets.

View zhujo01's full-sized avatar
🏠
Working from home

Jon Zhu zhujo01

🏠
Working from home
  • EdgeJumps
  • Oakville, Canada
  • 00:04 (UTC -04:00)
View GitHub Profile
@zhujo01
zhujo01 / client.go
Created August 9, 2011 20:27
GO TLS client code issue
package main
import ( "fmt" ; "crypto/tls"; "os" )
func main() {
conn , err := tls.Dial("tcp", "127.0.0.1:8000", nil)
if err != nil {
fmt.Println("Fatal error ", err.String())
os.Exit(1)
@zhujo01
zhujo01 / amazon-vmware.ps1
Last active August 29, 2015 14:06
Amazon Windows bootstrapping script
########################################################################
# AWS EC2 Windows Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - VMWare vSphere & VCD
#
@zhujo01
zhujo01 / aws-test.ps1
Last active March 12, 2019 17:08
This is a test bootstrapping powershell script
########################################################################
# AWS EC2 Windows Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - VMWare vSphere & VCD
#
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by VMware ovftool 3.5.2 (build-1879196), UTC time: 2014-08-25T23:35:25.059095Z-->
<ovf:Envelope vmw:buildId="build-1879196" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://www.vmware.com/schema/ovf http://www.vmware.com/schema/ovf http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://10.4.114.5/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/ws
@echo off
::#####################################################################
::#
::# CliQr start-up script
::#
::# Copyright(c) 2012 CliQr Technologies, Inc., all rights reserved.
::#
::#####################################################################
$newPasswd = [guid]::NewGuid().ToString()
echo $newPasswd
([adsi]“WinNT://localhost/cliqr”).SetPassword($newPasswd)
$service = gwmi win32_service -filter "name='CliQrAgentService'"
$service.change($null,$null,$null,$null,$null,$null,$null,$newPasswd)
########################################################################
# AWS EC2 Windows Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - Openstack
#
########################################################################
# VMware Windows Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - Amazon EC2
#
########################################################################
# Openstack Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - Amazon EC2
#
########################################################################
# Openstack Windows Bootstrapping Script
# Supported OS:
# - Windows 2008 Server R2 SP1 (TESTED)
# - Windows 2008 Server (TO BE TESTED)
# - Windows 2012 Server (TO BE TESTED)
# Image Transformation Target Cloud
# - VMWare vSphere & VCD
#