Skip to content

Instantly share code, notes, and snippets.

Alexander Zeitler AlexZeitler

View GitHub Profile
aspnetde / App.fs
Last active Jul 21, 2020
Feliz – MVU with React Function Components
View App.fs
module App
open Elmish
type State =
{ CurrentUser: string option }
type Msg =
| SignIn of string
| SignOut
View gist:af556571a733fc5c20be01ea9ae487dc
Scenario: different business teams building parts of a product, splitted by business domains. We are anly communicate via domain events published to a message bus and sometimes via published links.
As the domain events are the "contracts" between the business domains we want to declare and enforce the schemas of the events.
Our solution is built in node but the concept could work in any stack.
zcaceres /
Last active Jul 23, 2020
error handling patterns in Express

Handling Errors

Express.js makes it a breeze to handle errors in your routes.

Express lets you centralizes your error-handling through middleware.

Let's look at patterns for how to get the most out of your error-handling.

First, our error-handling middleware looks like this:

View Oh my zsh with autosuggestions &

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
kevinswiber / siren_api.yml
Last active Sep 20, 2019
Siren definitions for Open API Specification
View siren_api.yml
swagger: '2.0'
title: Siren API
description: Template for a Siren API
version: '0.1.0'
- http
- https
basePath: /
aliostad / azure-vm-bootstrapper.ps1
Last active Apr 18, 2016
Azure VM bootstrapper
View azure-vm-bootstrapper.ps1
# Usage:
# iex ((new-object net.webclient).DownloadString(''))
# Bootstraps the Azure VM by modyifying settings and installing below:
# 1. Turn off annoying Intrenet Explorer enhanced security
# 2. Install chocolatey
# 3. Install PerfView
# 4. Install DebugView
# 5. Install SuperBenchmarker
# 6. Install notepad++
# 7. Install windbg
makomweb / csharp_implicit_type_conversion.cs
Last active Aug 29, 2015
C# implicit type conversion (see for a more detailed explanation)
View csharp_implicit_type_conversion.cs
public class ImplicitConversionTest
public class A
public string Member { get; set; }
public static implicit operator string(A self)
return self.Member;
kagemusha / gist:5866759
Created Jun 26, 2013
Using Debugger with Grunt
View gist:5866759
version: grunt-cli v0.1.8
1. Install node-inspector globally (-g)
npm install -g node-inspector
2. Add debugger statements to your code
3. Run your grunt task in debug mode
jimothyGator /
Last active Aug 6, 2020
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
michaelcox / SpecRunner.js
Last active Sep 30, 2019
Browser Unit Testing with Backbone Mocha Chai and RequireJS
View SpecRunner.js
baseUrl: '/backbone-tests/',
paths: {
'jquery' : '/app/libs/jquery',
'underscore' : '/app/libs/underscore',
'backbone' : '/app/libs/backbone',
'mocha' : 'libs/mocha',
'chai' : 'libs/chai',
'chai-jquery' : 'libs/chai-jquery',
'models' : '/app/models'
You can’t perform that action at this time.