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 / Doc2Pdf
Last active November 23, 2023 18:15
A powershell automating Word to generate Pdf
A powershell automating Word to generate Pdf
@mkoertgen
mkoertgen / Hello.RegEnv.cs
Last active August 29, 2015 14:10
Spike for reading environment variables from Registry in C# (avoids problems with refreshing environment values in process session chains)
using System;
using System.Diagnostics;
using Microsoft.Win32;
namespace Hello.RegEnv
{
class Program
{
static void Main(string[] args)
{
@mkoertgen
mkoertgen / SkipTkCompile.targets
Created February 11, 2015 11:13
Enable NCrunch on SharpDx Toolkit projects
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- override the TkCompileTarget with empty to skip content compilation, e.g. for NCrunch -->
<Target Name="TkCompileTarget" />
<Target Name="TkListContentAndCompileTarget" />
</Project>
@mkoertgen
mkoertgen / ExpressionTests.cs
Created February 12, 2015 09:37
A learning test for Expression Evaluator
using System;
using System.Globalization;
using ExpressionEvaluator;
using FluentAssertions;
using NUnit.Framework;
namespace Hello.Expressions
{
[TestFixture]
class ExpressionTests
@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
@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 / 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 / fix.clickonce.icon.md
Created October 29, 2015 10:46
How to fix your ClickOnce icons
@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 / 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