Skip to content

Instantly share code, notes, and snippets.

View gavincampbell's full-sized avatar

Gavin Campbell gavincampbell

View GitHub Profile
gavincampbell / CreateDateAzureSQLDW.sql
Last active November 7, 2016 23:02 — forked from mlongoria/CreateDateAzureSQLDW.sql
Creates a calendar table in Azure SQL Data Warehouse
--Creates a table called Dim.Calendar. Change the table name on line 69. Change date range on line 2.
DECLARE @StartDate DATE = '20000101', @NumberOfYears INT = 30;
-- prevent set or regional settings from interfering with
-- interpretation of dates / literals
[date] DATE,
[day] tinyint,
gavincampbell /
Last active November 23, 2018 11:15 — forked from jrouleau/
Amazon Linux AMI Install HAProxy From Source (1.7.0 release pre configured). chmod +x then ./
PRE_PACK="openssl-devel pcre-devel make gcc"
# Setup Colours
gavincampbell / WinRM-HTTPS.ps1
Created February 19, 2019 10:12 — forked from TechIsCool/WinRM-HTTPS.ps1
A simple Powershell WinRM-HTTPs setup
Write-Output "Disabling WinRM over HTTP..."
Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP"
Disable-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC"
Get-ChildItem WSMan:\Localhost\listener | Remove-Item -Recurse
Write-Output "Configuring WinRM for HTTPS..."
Set-Item -Path WSMan:\LocalHost\MaxTimeoutms -Value '1800000'
Set-Item -Path WSMan:\LocalHost\Shell\MaxMemoryPerShellMB -Value '1024'
Set-Item -Path WSMan:\LocalHost\Service\AllowUnencrypted -Value 'false'
Set-Item -Path WSMan:\LocalHost\Service\Auth\Basic -Value 'true'