Skip to content

Instantly share code, notes, and snippets.

View mikebeaton's full-sized avatar

Mike Beaton mikebeaton

View GitHub Profile
@mikebeaton
mikebeaton / .bashrc
Created March 1, 2019 08:53
.bashrc ssh-agent script for WSL Ubuntu
# Location where ssh-agent settings are persisted
SSH_ENV="$HOME/.ssh/environment"
# Start ssh-agent and persist its settings
function start_agent {
echo "Initializing new SSH agent..."
touch $SSH_ENV
chmod 600 "${SSH_ENV}"
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
@mikebeaton
mikebeaton / XmlCommentsSchemaFilter_Fix960.cs
Last active January 30, 2019 14:53
Stand-alone implementation of Swashbuckle.AspNetCore pull #960 which fixes the formatting of non-string JSON examples. Can be used with existing distributions until the pull makes it into a public release. See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1021 for instructions.
using System;
using System.ComponentModel;
using System.Xml.XPath;
using System.Reflection;
using System.Linq;
using Microsoft.OpenApi.Any;
using Newtonsoft.Json.Serialization;
using Microsoft.OpenApi.Models;
using Microsoft.AspNetCore.Mvc;