Skip to content

Instantly share code, notes, and snippets.

View gep13's full-sized avatar

Gary Ewan Park gep13

View GitHub Profile
@chris-ray
chris-ray / App.config
Created June 26, 2015 15:53
WPF + MVVM + Akka.NET Modular UI
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<akka>
<hocon>
@patriksvensson
patriksvensson / build.sh
Last active August 29, 2015 14:24
Cake bootstrapper script
#!/bin/bash
###############################################################
# This is the Cake bootstrapper script that is responsible for
# downloading Cake and all specified tools from NuGet.
###############################################################
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
NUGET_EXE=$TOOLS_DIR/nuget.exe

Nuget package dependency resolution is broken by design. It incorrectly with resolve the oldest dependency listed, no matter how many bugs have been fixed in more recent versions. So please remember to do a nuget update to check if any newer versions of dependencies are available. The recommended approach is to update to the Highest Minor

@ferventcoder
ferventcoder / RubyStack.ps1
Last active April 5, 2018 17:48
Full Ruby Stack Install using Chocolatey and PowerShell
# https://github.com/chocolatey/choco/wiki/CommandsReference#how-to-pass-options--switches
# Powershell specific argument passing
# You must be on the latest beta of chocolatey for this to work properly (redownload files)
choco upgrade chocolatey -pre
$originalPath = $env:PATH
choco install ruby --version 1.9.3.55100 -my --install-arguments '/verysilent /dir=""c:\tools\ruby193"" /tasks=""assocfiles""' --override-arguments
# DevKit for Ruby 1.x
@patriksvensson
patriksvensson / powershell.cake
Created March 8, 2016 09:20
Run PowerShell scripts from Cake
// Tools and addins
#addin "nuget:?package=System.Management.Automation&version=6.1.7601.17515"
using System.Collections;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using System.Threading;
///////////////////////////////////////////////////////////////////////////////
Task("Run-Unit-Tests")
.IsDependentOn("Build")
.Does(() =>
{
DotCoverCover(tool => {
tool.NUnit3(testDlls, new NUnit3Settings {
NoResults = true,
TeamCity = isOnTeamCity
});
},
@davidfowl
davidfowl / Example1.cs
Last active February 11, 2026 04:57
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@dvdstelt
dvdstelt / PackageVersionsUsedInDeployments.cs
Created April 29, 2016 05:50
LINQPad script for retrieving package versions used in deployments
var endpoint = new OctopusServerEndpoint("http://54.169.230.0:8085/", "API-xxxxxxxxxxxxxxxxxxxxxxxxxx");
var client = new OctopusClient(endpoint);
var repo = new OctopusRepository(client);
var projects = repo.Projects.GetAll().Select (p => repo.Projects.Get(p.Id));
var allDeployments = projects.SelectMany(p=>repo.Deployments.FindMany(d=>d.ProjectId.Equals(p.Id)).Take(5)).GroupBy (p => p.ProjectId).SelectMany (p => p);
var nugetPackageIds = new List<string>(new string[]{"Webshop.Frontend", "Webshop.Backend", "Webshop.BusinessRules", "Webshop.Messages"});
foreach(var deployment in allDeployments)

Thoughts on project files

I missed last night's ASP.NET Community Standup on account of being shattered after a long day and falling asleep. Then I checked Twitter on the train this morning and discovered that the .NET world had, apparently, been burned to the ground by marauding Microsofties (again). It seemed to have something to do with project files, JSON vs XML, and suchlike.

Finally, lunchtime happened and I could watch the recording of the standup, and I got to understand what everyone was on about. In case you've missed it:

The TL;DR history

  1. In the beginning, there was make, and Gates did not own make, so Gates said "Let there be MSBuild" and there was MSBuild.
  2. And MSBuild used the *.*proj files from Visual Studio as its inputs, which were formed of terrible XML, and verily it was impossible to use without a Visual Studio license.
@haf
haf / Usage.txt
Last active April 20, 2018 13:33
Unlist lots of NuGet packages
Unlist all v4.* packages:
$ ./unlist.rb MyPackage v4.
Unlist specific version:
$ ./unlist.rb MyPackage v2.3.5
Unlist all versions: