Skip to content

Instantly share code, notes, and snippets.

View MartinSGill's full-sized avatar
🐺

Martin Gill MartinSGill

🐺
View GitHub Profile
@MartinSGill
MartinSGill / profile.json
Created February 17, 2020 20:18
Profile to Windows Terminal
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
// Store in C:\Users\<USER>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
@MartinSGill
MartinSGill / init.ps1
Last active March 6, 2019 09:27
BoxStarter Test
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('rawgist'))
# Powershell Provider
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
# Ensure profile exists
New-Item -Path ~\Documents -Name WindowsPowerShell -ItemType Directory -Force
Set-Content -Value '' -Encoding Ascii -Path ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
@MartinSGill
MartinSGill / dockerfile
Created January 13, 2018 20:17
Example Dockerfile for SSH Server on Windows Server Core
FROM microsoft/windowsservercore:1709
# Install Powershell
ADD https://github.com/PowerShell/PowerShell/releases/download/v6.0.0/PowerShell-6.0.0-win-x64.zip c:/powershell.zip
RUN powershell.exe -Command Expand-Archive c:/powershell.zip c:/PS6 ; Remove-Item c:/powershell.zip
RUN C:/PS6/pwsh.EXE -Command C:/PS6/Install-PowerShellRemoting.ps1
# Install SSH
ADD https://github.com/PowerShell/Win32-OpenSSH/releases/download/0.0.24.0/OpenSSH-Win64.zip c:/openssh.zip
RUN c:/PS6/pwsh.exe -Command Expand-Archive c:/openssh.zip c:/ ; Remove-Item c:/openssh.zip