Skip to content

Instantly share code, notes, and snippets.

View dustinchilson's full-sized avatar

Dustin Chilson dustinchilson

View GitHub Profile
#cloud-config
write_files:
- container: ntp
path: /etc/ntp.conf
permissions: "0644"
owner: root
content: |
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
@dustinchilson
dustinchilson / UpdateIISExpressSSLForChome.ps1
Created April 11, 2018 19:48 — forked from blowdart/UpdateIISExpressSSLForChome.ps1
IIS Express certs (for now) don't contain SAN strings. This makes Chrome unhappy. Make Chrome happy again with a new organic, artisanal, gluten free HTTPS certificate.
# Create a new self signed HTTPS Certificate for IIS Express
# Crafted with all organic, GMO, gluten free ingreditations
# with an artisinal SAN to make Chrome 58 onwards happy.
#
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330
#
# Run this at an administrative PowerShell prompt.
#
# You will be prompted to trust a new certificate via a windows dialog.
# Click yes otherwise Visual Studio will not be able to determine your
@dustinchilson
dustinchilson / script
Created January 4, 2017 19:58
Delete windows services with a string in the name
foreach ($service in get-wmiobject win32_service |
where { $_.name -like "*TestString*"} ) {
if ($service.ProcessId -ne 0) {
Stop-Process $service.ProcessId -Force
}
& "sc.exe" delete $service.Name
}
### Keybase proof
I hereby claim:
* I am dustinchilson on github.
* I am dustinchilson (https://keybase.io/dustinchilson) on keybase.
* I have a public key whose fingerprint is 32BA 8D9B 4CA8 FB80 0DFA 0465 3F9A 15D7 CBC3 7E53
To claim this, I am signing this object:
cd $env:site_folder
git add .
git commit -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE" 2>&1 | % { $_.ToString() }
git push origin master 2>&1 | % { $_.ToString() }
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:github_token):x-oauth-basic@github.com`n"
git config --global user.email "$($env:email)"
git config --global user.name "Dustin Chilson"
git clone https://github.com/dustinchilson/dustinchilson.github.com.git $env:site_folder 2>&1 | % { $_.ToString() }
function Clean-Folder
{
param(
[string]$rootfolder,
[string[]]$excluded
)
$rootfolder = resolve-path $rootfolder
Push-Location $rootFolder
if($excluded -notmatch "^\s*$")
{
version: 1.0.{build}
test: off
environment:
github_token:
secure: Ez8ezlWE076qixwKlHSR1S8gu3RKnMG/dTfwmJq9ibAVbH4JIzGx+LmlZmWHsvzq
email:
secure: sylh+LkOQcClxOFj6dByZNeqoSVd34n0FOVcT2+uZ78=
site_folder: _site
artifacts:
- path: _site
function Clean-Folder
{
param(
[string]$rootfolder,
[string[]]$excluded
)
$rootfolder = resolve-path $rootfolder
Push-Location $rootFolder
if($excluded -notmatch "^\s*$")
{
@dustinchilson
dustinchilson / Publish WebJob
Created April 23, 2015 20:56
Octopus Deploy MSDeploy Azure Webjob
{
"Id": "ActionTemplates-162",
"Name": "Web Deploy - Publish WebJob (MSDeploy)",
"Description": "Ensures that the Web Deploy 3.5 is installed on the system. The installer is downloaded from http://www.iis.net/downloads/microsoft/web-deploy if required.",
"ActionType": "Octopus.Script",
"Version": 1,
"Properties": {
"Octopus.Action.Script.ScriptBody": "[System.Reflection.Assembly]::LoadWithPartialName(\"Microsoft.Web.Deployment\")\n\n# A collection of functions that can be used by script steps to determine where packages installed\n# by previous steps are located on the filesystem.\n \nfunction Find-InstallLocations {\n $result = @()\n $OctopusParameters.Keys | foreach {\n if ($_.EndsWith('].Output.Package.InstallationDirectoryPath')) {\n $result += $OctopusParameters[$_]\n }\n }\n return $result\n}\n \nfunction Find-InstallLocation($stepName) {\n $result = $OctopusParameters.Keys | where {\n $_.Equals(\"Octopus.Action[$stepName].Output.Package.Ins