Skip to content

Instantly share code, notes, and snippets.

@n074v41l4bl34u
n074v41l4bl34u / FSharpOptionConverter.cs
Created March 5, 2016 20:26 — forked from NickJosevski/FSharpOptionConverter.cs
FSharpOptionConverter : JsonConverter
public class FSharpOptionConverter : JsonConverter
{
private static MethodInfo _getInnerValue = typeof (FSharpOptionConverter).GetMethod("GetInnerValue",
BindingFlags.Instance |
BindingFlags.NonPublic);
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value != null)
{
var optionValueType = value.GetType().GetGenericArguments().Single();
@n074v41l4bl34u
n074v41l4bl34u / set-dns.cmd
Created March 20, 2016 19:41
set static dns for network connection using windows console cmd script
@echo off
IF [%1] EQU [] goto noInterface
:: OPENDNS - OpenDNS, LLC,US
set DNS1=208.67.222.123
:: Google DNS
set DNS2=8.8.4.4
for /f "skip=2 tokens=1,2,3*" %%i in ('netsh int show interface') do (
@n074v41l4bl34u
n074v41l4bl34u / \src\app.config
Created April 3, 2016 23:05
Alea GPU Tutorial app.configs
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="aleaCUDASettings" type="Alea.CUDA.Settings, Alea.CUDA" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<aleaCUDASettings>
<monitor name="default" />