Skip to content

Instantly share code, notes, and snippets.

export PS1='\n[\e[0;32m\u@\h\e[m \e[1;33m\w\e[m\e[0;31m$(__git_ps1 " (%s)")\e[m]\n\$ '
markrendle / MITEA.license
Created Mar 30, 2015
The "MIT Except Apple" License
View MITEA.license
The MIT-except-Apple License (MIT-EA)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person (except
anybody associated with Apple Inc.) obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
markrendle /
Last active Aug 5, 2017
Vagrantfile to run Kafka in boot2docker

Kafka in Docker in Vagrant

I'm using this Vagrantfile to run Kafka on a Windows 8.1 laptop for development purposes.

It runs the ultra-lightweight boot2docker Linux, then uses Vagrant's Docker provisioning support to spin up ZooKeeper and Kafka.

The fun bits to work out were:

  • You need to forward the ports on both Vagrant (lines 13 & 14) and Docker (the -p flag), so you can access the instance from Windows using localhost:9092
markrendle / mylib.d.ts
Last active Jun 25, 2017
Add CustomEvent to lib.d.ts Window interface and global window object
View mylib.d.ts
interface CustomEventParams {
bubbles?: boolean;
cancelable?: boolean;
detail?: any;
// Extend the lib.d.ts CustomEvent interface with the proper constructor
interface CustomEvent {
new(event: string, params?: CustomEventParams);
markrendle / CorsModule.cs
Last active May 28, 2017
Very basic CORS HttpModule
View CorsModule.cs
using System;
using System.Web;
namespace MyOtherSite
public class CorsModule : IHttpModule
public void Init(HttpApplication application)
application.BeginRequest += ApplicationOnBeginRequest;
markrendle / Git Bash.vbs
Created Nov 25, 2010
Modified Git Bash to use Console2
View Git Bash.vbs
Set AppObj = CreateObject("Shell.Application")
If WScript.Arguments.Length=1 Then
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"" -d """ & WScript.Arguments(0) & """"
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"""
End If
markrendle /
Created Apr 4, 2017
Mark's Bio for conferences and such

Mark is the founder and CTO of RendleLabs, a software development consulting company. He works with new and emerging technologies, and shares his experience with teams and organisations looking to adopt those technologies for their projects. Currently Mark specializes in .NET Core and helps teams get up to speed with the wider ecosystem opened up by this cross-platform version of .NET; things like Linux, Docker, microservice architectures and so on. Mark also contributes to various open source projects, and speaks at conferences and user groups around the world. He is a Microsoft Azure MVP and a Docker Captain. In his spare time, he enjoys gaming, watching movies, and putting off writing his (probably best-selling) book.

markrendle /
Last active Feb 28, 2017
Compile-time constants with TypeScript and UglifyJS

DEBUG constant in TypeScript with UglifyJS

One of the requested features in TypeScript is support for the kind of compilation constants that C#, for example, provides, where you can say

markrendle / abc.txt
Last active Feb 4, 2017
Updated version of Mads Kristensen's commonHTML5Types.xsd with added tags for form parts (e.g. ng-pattern) and AngularJS 1.1.4. Actual hard work and clevers by Mads:
View abc.txt
1. Back up C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html\commonHTML5Types.xsd
2. Delete C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html\commonHTML5Types.bin if it exists
3. Replace it with the file below.
4. Restart Visual Studio 2012.
markrendle /
Created Feb 2, 2017
.NET Core, The Universe, and Everything

.NET Core, The Universe and Everything

.NET Core finally brings a fully-supported, open-source version of the framework cross-platform, and with the 2.0 release due in Spring, it's really ready for prime-time. While C# and .NET are familiar, the new ecosystem in which whey find themselves is bigger and more open than ever before, and the design and architecture of the systems you can build is very different from the "ASP.NET hosted in IIS" model you're used to.

Join Mark as he shares some of what he's learned from working with ASP.NET Core since the very first preview release of Project K through to version 1.1, including:

You can’t perform that action at this time.