Instantly share code, notes, and snippets.

View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This script to install Kubernetes will get executed after we have provisioned the box
$script = <<-SCRIPT
# Install kubernetes
apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
View Dot_Net_Config_Compare_Sync.ps1
# I stumble around in PowerShell b/c I learn by doing
# back up the current config before install
# Pre-Install make a copy of the config
# Copy-Item J:\ElectSolve\WindowsServices\ServiceOrderService\ServiceOrderService.exe.config J:\ElectSolve\WindowsServices\ServiceOrderService\ServiceOrderService.exe.config.backup
# Post Install Loop over current config
# replace all connection strings and app.Values with the values from config.backup
# Notify us if there is a key which was not in the config.backup, a new key
View example.cs
private static bool WriteXml(object outageEvents, string fileMessage)
{
try
{
var serializer = new XmlSerializer(outageEvents.GetType());
string xml;
using (var sww = new StringWriter())
{
using (var writer = XmlWriter.Create(sww))
{
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# 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: