Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -euo pipefail
INSTALL_ZSH=${1:-"true"}
USERNAME=${2:-"automatic"}
USER_UID=${3:-"automatic"}
USER_GID=${4:-"automatic"}
UPGRADE_PACKAGES=${5:-"true"}
INSTALL_OH_MYS=${6:-"true"}
ADD_NON_FREE_PACKAGES=${7:-"false"}
Set-ExecutionPolicy -Force RemoteSigned -Scope CurrentUser
Install-WindowsUpdate
choco install Microsoft-Hyper-V-All -source windowsFeatures
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
choco install VirtualMachinePlatform -source WindowsFeatures
choco feature enable -n allowGlobalConfirmation
Install-WindowsUpdate
Set-ExecutionPolicy -Force RemoteSigned -Scope LocalMachine
choco install Microsoft-Hyper-V-All -source windowsFeatures
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
choco feature enable -n allowGlobalConfirmation
choco install googlechrome
choco install vscode
@jamesrcounts
jamesrcounts / Dockerfile
Last active December 19, 2023 11:04
Snippets to illustrate container pipelines in Azure DevOps
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine
RUN apk update && apk upgrade --no-cache
WORKDIR /app
COPY ./dist .
ENTRYPOINT ["dotnet", "parrot.dll"]
@jamesrcounts
jamesrcounts / azure-create-terraform-backend.sh
Last active August 19, 2024 12:27
Snippets to illustrate getting started with Terraform in Azure DevOps
#!/usr/bin/env bash
set -euo pipefail
ID=$(uuidgen)
LOCATION=westus
RG=terraformrg
# Create unique name for storage account
STORAGE_ACCOUNT=$(echo "terraform-${ID}" | tr '[:upper:]' '[:lower:]' | sed 's/-//g' | cut -c1-24)
@jamesrcounts
jamesrcounts / settings.json
Last active November 28, 2019 14:51
VSCode Settings
{
"files.autoSave": "afterDelay",
"workbench.colorTheme": "Visual Studio Light",
"cSpell.userWords": [
"Kubernetes",
"addin",
"kubectl",
"nuget"
],
"workbench.iconTheme": "material-icon-theme",
@jamesrcounts
jamesrcounts / boxstarter.ps1
Created January 9, 2019 19:58 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jamesrcounts
jamesrcounts / 0.py
Created June 11, 2015 18:50
Python Challenge 0
url = "http://www.pythonchallenge.com/pc/def/%s.html"
print(url % 2**38)
@jamesrcounts
jamesrcounts / starter.txt
Last active March 7, 2020 04:09
Boxstarter: Windows 10
# http://boxstarter.org/package/url?
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-WindowsOptionalFeature -Online -FeatureName containers ?All
choco install Microsoft-Hyper-V-All -source windowsFeatures
@jamesrcounts
jamesrcounts / TortoiseReporter.py
Created June 5, 2015 17:59
Tortise Text Reporter for Python
from subprocess import call
from approvaltests.Reporter import Reporter
class TortoiseTextReporter(Reporter):
@staticmethod
def get_command(approved_path, received_path):
return ['C:\\Program Files\\TortoiseSVN\\bin\\tortoisemerge.exe', received_path, approved_path]