Skip to content

Instantly share code, notes, and snippets.

View afmorris's full-sized avatar

Tony Morris afmorris

View GitHub Profile

Keybase proof

I hereby claim:

  • I am afmorris on github.
  • I am afmorris (https://keybase.io/afmorris) on keybase.
  • I have a public key ASASJ6eARBZkGlwL8a6-nFS3-D_8YGABUoR5whkB05Zlhgo

To claim this, I am signing this object:

@afmorris
afmorris / main.cs
Last active October 19, 2018 01:37
SO-52751177-Answer
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
using System;
JsConfig.IncludeNullValues = false;
JsConfig.ExcludeDefaultValues = false;
JsConfig<Guid>.SerializeFn = guid => guid.ToString();
JsConfig<Guid>.IncludeDefaultValue = true;
var tt = new { Name="Fred", Value=Guid.Empty, Value2=Guid.NewGuid() };
@afmorris
afmorris / main.cs
Last active October 19, 2018 01:33
SO-52751177-Previous
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
using System;
JsConfig.IncludeNullValues = false;
JsConfig.ExcludeDefaultValues = false;
JsConfig<Guid>.SerializeFn = guid => guid.ToString();
var tt = new { Name="Fred", Value=Guid.Empty, Value2=Guid.NewGuid() };
var test = tt.ToJson();
"C:\Program Files\WinHTTrack\httrack.exe" "http://localhost:59141" -O "C:\My Web Sites\LodiCornFest5k" --update
aws s3 sync "C:\My Web Sites\LodiCornFest5k\localhost_59141" s3://lodicornfest5k.com --acl="public-read"
@afmorris
afmorris / Resignation Letter
Created August 8, 2018 00:22
Sample Resignation Letter
[Your name]
[Your full address]
[Today's date]
[Your manager]
[Your employer]
[Your employer's address]
@afmorris
afmorris / app.ts
Created December 28, 2017 22:49
Cannot Load Module "@servicestack/client"
// This file is located in /src/js/app.ts
import { JsonServiceClient } from "@servicestack/client";
@afmorris
afmorris / 1-Global.asax.cs
Created December 22, 2016 02:09
Logging with Serilog, LibLog, and Seq
namespace LoggingTest
{
using Serilog;
using Serilog.Core;
using Serilog.Events;
using SerilogWeb.Classic.Enrichers;
using ServiceStack.Configuration;
public class Global : HttpApplication
{
@afmorris
afmorris / 1-ConfigKeys.cs
Last active December 21, 2016 03:39
ServiceStack in a Console Application - AppSettings
namespace ServiceStack.Console
{
public static class ConfigKeys
{
public static readonly string ApiKey = nameof(ApiKey);
public static readonly string ApplicationName = nameof(ApplicationName);
public static readonly string ApplicationVersion = nameof(ApplicationVersion);
public static readonly string Environment = nameof(Environment);
}
}
@afmorris
afmorris / 1-Program.cs
Last active December 21, 2016 03:27
ServiceStack in a Console Application
namespace ServiceStack.Console
{
static class Program
{
public static readonly Container Container = new Container();
static void Main(string[] args)
{
DependencyConfig.Setup();
new LogConfig(Container.Resolve<IAppSettings>()).Setup();
Set-ExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtension -EnableShowFullPathInTitleBar -DisableOpenFileExplorerToQuickAccess -DisableShowRecentFilesInQuickAccess -DisableShowFrequentFoldersInQuickAccess
Disable-UAC
choco install sublimetext3
choco install sublimetext3.packagecontrol
choco install fiddler4
choco install visualstudio2015enterprise
choco install googlechrome
choco install 7zip.install
choco install github