Skip to content

Instantly share code, notes, and snippets.

View bjorkstromm's full-sized avatar
:shipit:
My hovercraft is full of eels

Martin Björkström bjorkstromm

:shipit:
My hovercraft is full of eels
View GitHub Profile
Stop-Service Docker
Stop-Service HNS
rm C:\ProgramData\Microsoft\Windows\HNS\HNS.data
rm C:\ProgramData\docker\network\files\local-kv.db
Start-Service HNS
Start-Service Docker
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Frameworks;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.Packaging.Signing;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Resolver;
using NuGet.Versioning;
@bjorkstromm
bjorkstromm / ReactiveUI.Tests.csproj.build
Created October 18, 2017 07:56
ReactiveUI Tests build failed.
10>------ Rebuild All started: Project: ReactiveUI.Tests, Configuration: Debug Any CPU ------
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: Package Microsoft.Win32.Primitives 4.0.1 is not compatible with net452 (.NETFramework,Version=v4.5.2). Package Microsoft.Win32.Primitives 4.0.1 supports:
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: - monoandroid10 (MonoAndroid,Version=v1.0)
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: - monotouch10 (MonoTouch,Version=v1.0)
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: - net46 (.NETFramework,Version=v4.6)
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: - netstandard1.3 (.NETStandard,Version=v1.3)
10>C:\Users\mb\src\gh\ReactiveUI\src\ReactiveUI.Tests\ReactiveUI.Tests.csproj : error NU1202: - xamarinios10 (Xamarin.iOS,Version=v1
@bjorkstromm
bjorkstromm / build.cake
Created September 23, 2017 18:44
gitversion - restore - build - pack /w Cake
#tool gitversion.commandline
DotNetCoreMSBuildSettings msBuildSettings;
Setup(context =>
{
var version = GitVersion();
msBuildSettings = new DotNetCoreMSBuildSettings()
.WithProperty("Version", version.SemVer)
.WithProperty("AssemblyVersion", version.MajorMinorPatch)
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\mb\src\gh\bakery\tools\JetBrains.ReSharper.CommandLineTools.2017.1.20170428.83814\JetBrains.ReSharper.CommandLineTools\tools\ExternalAnnotations\WinRT\Windows.Foundation.UniversalApiContract\Windows.Foundation.UniversalApiContract.Nullness.Generated.xml'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at NuGet.Packaging.StreamExtensions.CopyToFile(Stream inputStream, String fileFullPath) in C:\Users\mb\src\gh\NuGet.Client\src\NuGet.Core\NuGet.Packaging\PackageExtraction\StreamE
@bjorkstromm
bjorkstromm / Cake-omnisharp-bakery.md
Last active October 17, 2017 19:30
Setting up Cake OmniSharp Bakery
  1. Clone Omnisharp Roslyn and build that
git clone https://github.com/cake-build/omnisharp-roslyn

cd omnisharp-roslyn

git checkout feature/cake

.\build.ps1 -Target Quick
@bjorkstromm
bjorkstromm / program.cs
Created May 10, 2017 21:10
Simple BinaryReader/Writer serialization of object and sent over NetworkStream
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
@bjorkstromm
bjorkstromm / build.cake
Created April 10, 2017 19:42
Cake File Example
var target = Argument("target", "Default");
Task("Default")
.Does(() =>
{
var greeting = "Hello World!";
Information(greeting);
});
RunTarget(target);
@bjorkstromm
bjorkstromm / FabricPlayground.cs
Created September 27, 2016 21:41
Service Fabric Application Management (Managed)
private static async Task RemoveApplicationAsync(
FabricClient client,
Uri applicationName, //<.. Read from AppParameters
string applicationTypeName, //<-- Should be read from ApplicationManifest
string applicationTypeVersion //<-- Should be read from ApplicationManifest
)
{
await client.ApplicationManager.DeleteApplicationAsync(applicationName);
foreach(var node in await client.QueryManager.GetNodeListAsync())

Keybase proof

I hereby claim:

  • I am mholo65 on github.
  • I am mholo65 (https://keybase.io/mholo65) on keybase.
  • I have a public key whose fingerprint is C51A CE55 E3F1 D197 6166 4608 5330 968B 8EA7 E3F3

To claim this, I am signing this object: