Skip to content

Instantly share code, notes, and snippets.

View ianbattersby's full-sized avatar
🐘
@ianbattersby@hachyderm.io

Ian Battersby ianbattersby

🐘
@ianbattersby@hachyderm.io
View GitHub Profile
ERROR: System.NotImplementedException: The requested feature is not implemented.
at Microsoft.Build.Evaluation.ProjectCollection.GetLoadedProjects (System.String fullPath) [0x00000] in <filename unknown>:0
at NuGet.Common.MSBuildProjectSystem.GetProject (System.String projectFile) [0x00000] in <filename unknown>:0
at NuGet.Common.MSBuildProjectSystem..ctor (System.String projectFile) [0x00000] in <filename unknown>:0
at ripple.Nuget.NugetService.buildProjectManager (ripple.Local.Project project) [0x00000] in <filename unknown>:0
at ripple.Nuget.NugetService.Update (ripple.Local.Project project, IEnumerable`1 dependencies) [0x00000] in <filename unknown>:0
at FubuCore.Util.Cache`2[ripple.Local.Project,System.Collections.Generic.IList`1[ripple.Local.NugetDependency]].Each (System.Action`2 action) [0x00000] in <filename unknown>:0
at ripple.Commands.NugetUpdatePlan.Apply (INugetService service) [0x00000] in <filename unknown>:0
at ripple.Commands.UpdateCommand.updateSolution (ripple.Comman
@ianbattersby
ianbattersby / gist:5201036
Created March 19, 2013 23:18
Fizzbuzz in Kotlin
inline fun Int.divides(d: Int) : Boolean { return this % d == 0 }
fun main(args: Array<String>) : Unit {
var i = 0
iterate { i++ } take 100 forEach {
println(
when (true) {
it.divides(15) -> "fizzbuzz"
it.divides(3) -> "fizz"
[11:40:21][Execute xbuild] Bad call to mono_mutex_lock result 22
[11:40:21][Execute xbuild] * Assertion at mini-generic-sharing.c:1318, condition `ret == 0' not met
[11:40:21][Execute xbuild] Stacktrace:
[11:40:21][Execute xbuild] at <unknown> <0xffffffff>
[11:40:21][Execute xbuild] at System.Linq.Expressions.Expression`1.Create (System.Linq.Expressions.Expression,string,bool,System.Collections.ObjectModel.ReadOnlyCollection`1<System.Linq.Expressions.ParameterExpression>) <0x00027>
[11:40:21][Execute xbuild] at System.Linq.Expressions.Expression.CreateLambda (System.Type,System.Linq.Expressions.Expression,string,bool,System.Collections.ObjectModel.ReadOnlyCollection`1<System.Linq.Expressions.ParameterExpression>) <0x0023e>
[11:40:21][Execute xbuild] at System.Linq.Expressions.Expression.Lambda (System.Linq.Expressions.Expression,string,bool,System.Collections.Generic.IEnumerable`1<System.Linq.Expressions.ParameterExpression>) <0x0021b>
[11:40:21][Execute xbuild] at S
enum class MyEnum {
MyValOne {
override enum class InsideWeFind {
SubOne {
override fun BigFun() {
println("MyValOne only has one BigFun for SubOne.")
}
override fun SubFun() {
println("MyValOne only also has SubFun for SubOne.")
namespace Some.Demo {
using System;
using Fix.Katana;
using Microsoft.Owin.Hosting;
class Program
{
static void Main(string[] args)
{
var hostname = "localhost";
namespace Bazinga
{
using System;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using Fix;
using Microsoft.Owin.Hosting;
@ianbattersby
ianbattersby / gist:6167726
Created August 6, 2013 19:24
Owin CORS Hack
return WebApp.Start(
startOptions,
app =>
{
app.UseErrorPage();
app.Use(
new Func<AppFunc, AppFunc>(
ignoreNextApp => (env =>
{
var responseHeaders = (IDictionary<string, string[]>)env["owin.ResponseHeaders"];
Application Exception
System.UnauthorizedAccessException
Access to the path "/Library/Frameworks/Mono.framework/Versions/3.2.0/etc/mono/registry" is denied.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00064] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:113
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/Directory.cs:80
at System.IO.DirectoryInfo.Create () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin-no-pcl/build-root/mono-3.2.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:141
@ianbattersby
ianbattersby / OwinHttpListener
Created August 7, 2013 23:09
Mono Issue w/OwinHost v2 (HttpListener)
// <copyright file="OwinHttpListener.cs" company="Microsoft Open Technologies, Inc.">
// Copyright 2011-2013 Microsoft Open Technologies, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@ianbattersby
ianbattersby / gist:6248828
Last active December 21, 2015 04:19
Example of simplest usage of OwinHost.exe with Simple.Web (e.g. using library project)
[assembly: Microsoft.Owin.OwinStartup(typeof(OwinLibraryHost.Startup))]
namespace OwinLibraryHost
{
using Simple.Web.OwinSupport;
public class Startup : OwinStartupBase
{
}
}