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
@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:

C:\Users\marti\src\cake [coreclr-fix +0 ~10 -0 !]> dotnet .\artifacts\v0.15.3-coreclr-fix0001\bin\netcoreapp1.0\Cake.dll --showdescription --verbosity=diagnostic
Module directory does not exist.
Analyzing build script...
Analyzing C:/Users/marti/src/cake/build.cake...
Analyzing C:/Users/marti/src/cake/build/parameters.cake...
Analyzing C:/Users/marti/src/cake/build/paths.cake...
Analyzing C:/Users/marti/src/cake/build/packages.cake...
Analyzing C:/Users/marti/src/cake/build/version.cake...
Analyzing C:/Users/marti/src/cake/build/credentials.cake...
Processing build script...
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Code]
@="Open with VS Code"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\*\shell\Code\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\Code]
@bjorkstromm
bjorkstromm / dnx-migrate.ps1
Created January 8, 2016 13:50
WIP. Quick hack for migrating csproj to xproj
param(
[string]$solution = ".\*.sln"
)
function Get-XprojContent
{
param(
[Guid]$guid = [Guid]::NewGuid()
)
[xml]@"