Skip to content

Instantly share code, notes, and snippets.

View mkoertgen's full-sized avatar
💭
Mostly working on DevOps stuff (#azuredevops, #k8s)

Marcel Körtgen mkoertgen

💭
Mostly working on DevOps stuff (#azuredevops, #k8s)
View GitHub Profile
@mkoertgen
mkoertgen / README.md
Last active March 15, 2020 17:23
Docker Toolbox Quickstart Terminal using Hyper-V Raw

Using Docker Toolbox on Windows with Hyper-V instead of Virtualbox

Unless you successfully signed up for Docker Beta you probably had trouble getting started with Docker Toolbox on Windows.

The typical issue is that the Docker Quickstart Terminal will refuse to start because Hyper-V is installed, cf. docker/toolbox #77. In fact this is related to Oracle VirtualBox 5.0 coming with the current Docker Tools release.

The usual advice is to just uninstall Hyper-V - which i consider a big deal, especially on Windows 10.

@mkoertgen
mkoertgen / Patching ClickOnce Manifests.md
Created April 19, 2016 16:12
Patching ClickOnce Manifests

Patching ClickOnce Manifests

The following examples take on the example of deploying the fictional .NET application app.exe. NOTE: With ClickOnce you can only deploy .NET applications out of the box. Ho, cf. How can I deploy a non .net application with ClickOnce?.

Creating a ClickOnce deployment for any .NET application

Create the application manifest from the build output (binaries)

mage -n Application -t app\app.exe.manifest -fd app

@mkoertgen
mkoertgen / ClickOnce.cs
Created April 19, 2016 16:10
ClickOnce: Setting a custom icon in 'Add/Remove Programs'
using System;
using System.Deployment.Application;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.Win32;
namespace MyApp
{
@mkoertgen
mkoertgen / mkdocs_task.bat
Last active April 19, 2016 12:14
Using built-in mkdocs server in production on Windows (Scheduled Task)
@echo off
setlocal
set logfile=%~n0.log
set taskName=%~n0
cd /D "%~dp0"
set command=%1
if "%command%"=="" set command=usage
@mkoertgen
mkoertgen / jenkins-setup
Last active July 12, 2016 17:05
Install a jenkins build server for .NET projects with boxstarter
Scripts for jenkins build server automation on windows
@mkoertgen
mkoertgen / install_fxcop14.bat
Created December 10, 2015 16:19
Install FxCop14 on build server
rem cf.: http://stackoverflow.com/questions/21729066/running-code-analysis-fxcop-12-0-14-0-on-build-agent-without-installing-visu/32093939#32093939
@echo off
setlocal
set DIR=%~dp0
rem cf. http://stackoverflow.com/questions/21729066/running-code-analysis-fxcop-12-0-14-0-on-build-agent-without-installing-visu/32093939#32093939
:install_ms_build_tools
if exist "%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" goto install_vcredist
@mkoertgen
mkoertgen / fix.clickonce.icon.md
Created October 29, 2015 10:46
How to fix your ClickOnce icons
@mkoertgen
mkoertgen / BalanceExtensions.cs
Last active March 20, 2021 13:24
Set audio balance using core audio api
public static class BalanceExtensions
{
// left=0, right=1
private const int LeftChan = 0;
private const int RightChan = 1;
/// <summary>
/// Gets the ratio of volume across the left and right speakers in a range between -1 (left) and 1 (right). The default is 0 (center).
/// </summary>
/// <param name="volume">The audio volume endpoint</param>
@mkoertgen
mkoertgen / vagrant_export_vbox_vm_basebox.md
Last active August 29, 2015 14:19
How to export and optimize a linux VirtualBox Vagrant VM

How to export and optimize a linux VirtualBox Vagrant VM

You can export a base box from your current Vagrant VM work with

vagrant package --base <vm_name> --output <vm_name>.box

However, before doing this you may try to reduce the size of the base box.

Shrinking the box

@mkoertgen
mkoertgen / SerializeLinq_Should
Created February 15, 2015 20:15
A learning test for SerializeLinq
using System;
using System.Linq.Expressions;
using FluentAssertions;
using NUnit.Framework;
using Serialize.Linq.Serializers;
namespace Hello.SerializeLinq
{
[TestFixture]
// ReSharper disable once InconsistentNaming