Skip to content

Instantly share code, notes, and snippets.

View AndreSteenveld's full-sized avatar

Andre Steenveld AndreSteenveld

View GitHub Profile
@AndreSteenveld
AndreSteenveld / OptionJsonConverter.cs
Created July 16, 2021 07:42 — forked from gmanny/OptionJsonConverter.cs
JsonConverter for LanguageExt.Option which serializes empty Options as nulls.
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Reflection;
using LanguageExt;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public class OptionJsonConverter : JsonConverter
{
@AndreSteenveld
AndreSteenveld / update-hosts.sh
Last active January 19, 2020 09:07 — forked from mpneuried/update-hosts.sh
A small shell script that will add and remove lines from the hosts file. Originally created by Claus Witt, http://clauswitt.com/319.html.
#! /bin/sh
# @author: Claus Witt
# http://clauswitt.com/319.html
# Adding or Removing Items to hosts file
# Use -h flag for help
DEFAULT_IP=127.0.0.1
IP=${3:-$DEFAULT_IP}