Skip to content

Instantly share code, notes, and snippets.

@DamianStanger
DamianStanger / Enable-HttpLoggingToBlobStorage.ps1
Created May 26, 2016 20:49
A powershell script that will enable http logging on an azure app service. logging will go to blob storage
#Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] $Environment = 'dev',
[string] $Location = 'uk',
[string] $Company = 'moocowco',
[string] $WebLogsStorageAccountKey = 'mystorageaccountkey'
)
@DamianStanger
DamianStanger / GoAgentInstall.ps1
Created March 29, 2016 14:53
Powershell that can create multiple go agents running on a single machine all pointing at different gocd servers
#https://docs.go.cd/current/installation/install/agent/windows.html
$goSetupExe = "go-agent-16.2.1-3027-setup.exe"
cd /
New-Item C:\go -ItemType Directory -ErrorAction SilentlyContinue
cd c:\go
if(Test-Path "c:\go\$goSetupExe"){
write-host -ForegroundColor green "c:\go\$goSetupExe exists"
@DamianStanger
DamianStanger / msdeployToAzure.ps1
Created December 11, 2015 17:17
Powershell script that uses msdeploy to deploy the current directory contents to azure websites.
param(
[string]$WEBSITE_NAME ='WEBSITE_NAME',
[string]$PUBLISH_PROFILE_URL ='https://xxx-staging.scm.azurewebsites.net:443',
[string]$PUBLISH_PROFILE_USERNAME='$yyy__staging',
[string]$PUBLISH_PROFILE_PASSWORD='zzz'
)
Write-Host -ForegroundColor Cyan "------------------------------------------------------"
Write-Host -ForegroundColor Cyan "WEBSITE_NAME: $WEBSITE_NAME"
Write-Host -ForegroundColor Cyan "PUBLISH_PROFILE_URL: $PUBLISH_PROFILE_URL"
@DamianStanger
DamianStanger / go_notify.conf
Created December 9, 2015 17:22
config file to drive the gocd.slack integration found here https://github.com/ashwanthkumar/gocd-slack-build-notifier
gocd.slack {
login = "..."
password = "..."
server-host = "https://go...com:8154/"
webhookUrl = "https://hooks.slack.com/services/aaa/bbb/ccc"
# optional fields
channel = "#slack-test"
slackDisplayName = "go-server"
slackUserIconURL = "https://www.thoughtworks.com/imgs/products/go-logo.png"
@DamianStanger
DamianStanger / visualSVN-darkTheme.js
Created November 18, 2015 20:01
A dark, wide theme to style visual svn using tamper monkey
// ==UserScript==
// @name Midnight Surfing - SVN
// @description Just my attempt at a svn dark style.
// @author Damo
// @run-at document-start
// @version 0.1
// ==/UserScript==
(function() {var css = "";
css += [
"@namespace html url(http://www.w3.org/1999/xhtml);",
@DamianStanger
DamianStanger / SvnSlackHook.ps1
Last active November 18, 2015 22:53
A basic method of getting svn checkins to slack using the svn post commit hooks
param([String]$revision)
$log = & 'C:\Program Files (x86)\VisualSVN Server\bin\svn.exe' --username myUser --password foobarfoobar log https://svnRepo/svn/folder -r $revision
$revisionIndex = $log[1].IndexOf("|")
$revision = $log[1].Substring(0,$revisionIndex)
$committer = $log[1].Split("|")[1]
$logMsg = $log[3]
@echo off
powershell "C:\Program` Files\Splunk\bin\scripts\SplunkSlackAlert.ps1 -ScriptName '%SPLUNK_ARG_0%' -NEvents '%SPLUNK_ARG_1%' -TriggerReason '%SPLUNK_ARG_5%' -BrowserUrl '%SPLUNK_ARG_6%' -ReportName '%SPLUNK_ARG_4%'"
@DamianStanger
DamianStanger / podcasts.opml
Last active November 3, 2015 22:56
List of all my podcasts exported from podcast addict
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<opml version="1.0">
<head>
<title>PodcastAddict registration feeds</title>
<dateCreated>3 Nov 2015 8:53:35 pm</dateCreated>
<dateModified>3 Nov 2015 8:53:35 pm</dateModified>
</head>
<body>
<outline text=".NET Rocks!" type="rss" xmlUrl="http://www.pwop.com/feed.aspx?show=dotnetrocks&amp;filetype=master" htmlUrl="http://www.dotnetrocks.com" />
<outline text="60-Second Mind" type="rss" xmlUrl="http://www.scientificamerican.com/podcast/sciam_podcast_i_psych.xml" htmlUrl="http://www.scientificamerican.com/podcast/60-second-mind/" />
@DamianStanger
DamianStanger / go-cd-theme
Last active September 25, 2015 09:44
Tamper monkey script to change the theme of go cd to black
// ==UserScript==
// @name Go server dark
// @namespace https://go.server.com
// @description Just my attempt at a dark style for go cd.
// @author Damo
// @run-at document-start
// @version 1
// ==/UserScript==
(function() {var css = "";
css += [
@DamianStanger
DamianStanger / go-cd-tampermoneyscript.js
Last active August 29, 2015 14:23
Tampermonkey script to enhance go-cd
// ==UserScript==
// @name Go PipeLine Filter
// @namespace http://pipelinefilter.foldingair.blogspot.com
// @version 0.1
// @description Ge Server Pipelines filter
// @author Ingenie
// @match https://goserver:8154/go/
// @grant none
// ==/UserScript==