Skip to content

Instantly share code, notes, and snippets.

Philip Jander janderit

  • Wunder Mobility, Jander.IT
  • Hamburg, Germany
Block or report user

Report or block janderit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janderit
janderit / Sandbox.cs
Created Oct 15, 2016
Devopenspace: Demo Code aus der C# Session 10:30
View Sandbox.cs
using System;
using System.Collections.Generic;
namespace Sandbox
{
class Program
{
public Program()
{
Readonly_mit_Field = 5;
@janderit
janderit / rakefile
Last active Dec 18, 2015
sample rakefile for generating NuGet nupkgs from VS solutions
View rakefile
##########################################################################
# RAKE BUILD SCRIPT #
# (c) Philip Jander 2012, 2013 #
# Jander.IT #
##########################################################################
RAKEFILE_REVISION = "2.3"
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
@janderit
janderit / zmqexample.cs
Created Apr 11, 2013
ZeroMQ 3.1 Router/Dealer example
View zmqexample.cs
public sealed class Host
{
private readonly string _zmqEndpoint;
private readonly Action<Action> _dispatcher;
private static ZmqSocket _server;
private static readonly ConcurrentQueue<Action> WaitToSend = new ConcurrentQueue<Action>();
public Host(string zmqEndpoint, Action<Action> dispatcher)
{
_zmqEndpoint = zmqEndpoint;
@janderit
janderit / gist:4564158
Last active Dec 11, 2015
My favourite collection extenders...
View gist:4564158
public static class CollectionExtender
{
public static IEnumerable<string> NonBlank(this IEnumerable<string> list)
{
return list.Where(_ => !String.IsNullOrWhiteSpace(_));
}
public static IEnumerable<T> NonNull<T>(this IEnumerable<T> list) where T:class
{
return list.Where(_ => null != (object) _);
View bicycle.fsx
(*
The goal in this exercise is to create a model to predict
how many bicycles will be used in a day, given the
available information.
Data source: UC Irvine Machine Learning dataset, "bike sharing":
https://archive.ics.uci.edu/ml/datasets/Bike+Sharing+Dataset
We will first explore the data, using the CSV type provider
and fsharp.Charting to visualize it.
@janderit
janderit / Union.cs
Created Oct 25, 2015
C# discriminated union type
View Union.cs
// adapted from : http://stackoverflow.com/questions/3151702/discriminated-union-in-c-sharp by Juliet
public abstract class Union<TA, TB, TC>
{
public static Case1 Create(TA x) { return new Case1(x);}
public static Case2 Create(TB x) { return new Case2(x);}
public static Case3 Create(TC x) { return new Case3(x);}
public abstract T Match<T>(Func<TA, T> f, Func<TB, T> g, Func<TC, T> h);
private Union() { }
@janderit
janderit / gist:4031154
Created Nov 7, 2012
Domänendefinition
View gist:4031154
namespace Target.Sicherheit
{
public enum Entitaeten
{
Benutzersitzung
}
public enum Rechte
{
@janderit
janderit / gist:3961698
Created Oct 26, 2012
Closures, commandhandlers und co
View gist:3961698
class EventStore{
void Save(Guid commandId, Event[] events);
}
class EventPublisher{
void Save(Guid senderSession, Event[] events);
}
@janderit
janderit / kata_fluent_dsl_csharp.txt
Created Sep 20, 2012
Kata: Fluent DSL Builder Pattern in c#
View kata_fluent_dsl_csharp.txt
Kata: Fluent DSL Builder Pattern in c#
Es sollen SQL-artige Connectionstrings
des Musters
SQL:[UserId/Passwort@]{hostname|IP}#dbname
durch eine Fluent Konfigurationssprache erstellt werden.
@janderit
janderit / JSON.patch
Created Sep 18, 2012
Patch fixing concurrency bug in fastJSON 2.0.5
View JSON.patch
diff --git a/fastJSON/JSON.cs b/fastJSON/JSON.cs
index d2f651e..0915fc1 100644
--- a/fastJSON/JSON.cs
+++ b/fastJSON/JSON.cs
@@ -64,7 +64,17 @@ namespace fastJSON
public sealed class JSON
{
- public readonly static JSON Instance = new JSON();
+ [ThreadStatic]
You can’t perform that action at this time.