Skip to content

Instantly share code, notes, and snippets.

@mwrock
mwrock / gist:d2ec88c0ea62dbf0047a
Last active February 26, 2016 06:40
full choco
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Update-ExecutionPolicy Unrestricted
#Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Set-TaskbarOptions -Size Small
Enable-RemoteDesktop
cinst fiddler
cinst Git-Credential-Manager-for-Windows
cinst TelnetClient -Source WindowsFeatures
@mwrock
mwrock / article.md
Last active October 30, 2015 05:39
Boxstarter article for Chocolatey Newsletter

The state of Boxstarter

Boxstarter builds on top of Chocolatey providing reboot resiliency, commands for configuring and personalizing your windows environment, running windows updates and the ability to install packages on remote machines as well as installing from scripts stored in any http resource like a gist. This makes Boxstarter ideal for setting up new developer machines with Chocolatey!

Today Boxstarter ships its own version of Chocolatey - the last powershell based version 0.9.8.33. This version of Chocolatey can be installed on the same machine as the current Chocolatey version and is only used by Chocolatey. Howerver, this has caused some confusion, and as Chocolatey evolves, some packages will become incompatible with this older version of Chocolatey.

I am getting very close to releasing a new version of Boxstarter that will no longer need the older Chocolatey and will instead ship with a Chocolatey API library leveraging the functionality of today's chocolatey.

Wh

@mwrock
mwrock / ruby.xml
Created October 29, 2015 21:10
winrs vs ruby winrm
POST /wsman HTTP/1.1
Content-Type: application/soap+xml;charset=UTF-8
Authorization: Basic dmFncmFudDp2YWdyYW50
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13))
Accept: */*
Date: Thu, 29 Oct 2015 01:35:56 GMT
Content-Length: 1663
Host: 192.168.137.222:5985
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:b="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:cfg="http://schemas.microsoft.com/wbem/wsman/1/config"><env:Header><a:To>http://192.168.137.222:5985/wsman</a:To><a:
choco install visualstudio2015community -y
@mwrock
mwrock / gist:75e051e6f59052071e94
Created July 29, 2015 16:42
rest via powershell
Invoke-RestMethod -Method Post -Uri "http://blah/api/deployments" -Headers @{"X-Octopus-ApiKey"="API-blah"} -Body $body -Verbose -ContentType "application/json"
{
"builders": [{
"type": "virtualbox-iso",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--natpf1", "guest_winrm,tcp,,55985,,5985" ],
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
[ "modifyvm", "{{.Name}}", "--cpus", "2" ]
],
"guest_os_type": "Windows2012_64",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO",
@mwrock
mwrock / gist:314c44332f78592b3bb0
Created July 3, 2015 19:40
Boxstarter bootstrapper
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/mwrock/boxstarter/master/BuildScripts/bootstrapper.ps1'))
Get-Boxstarter -Force
Enable-RemoteDesktop
@mwrock
mwrock / cluster.rb
Created June 5, 2015 14:15
chef-provisioning cluster provider
use_inline_resources
require 'json'
include ClcLibrary::Helper
include Provisioner::Helper
def whyrun_supported?
true
end