This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Newtonsoft.Json.Serialization | |
{ | |
/// <summary> | |
/// Keep casing when serializing dictionaries | |
/// cf. https://stackoverflow.com/a/24226442/3781540 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; | |
using System.Web.Http.ModelBinding; | |
namespace MyApi.Filters | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Disable dashboard on macOS | |
defaults write com.apple.dashboard mcx-disabled -boolean YES | |
killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class Program | |
{ | |
static void Main() | |
{ | |
var servicesToRun = new ServiceBase[] { new YourService() }; | |
// Run as service | |
if (!Environment.UserInteractive) | |
{ | |
ServiceBase.Run(servicesToRun); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# image: https://hub.docker.com/r/microsoft/mssql-server-linux/ | |
# cf. https://docs.microsoft.com/ko-kr/sql/linux/quickstart-install-connect-docker | |
# linux/macOS | |
$ docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>' -e 'MSSQL_PID=Developer' --cap-add SYS_PTRACE -p 1433:1433 -d microsoft/mssql-server-linux | |
# windows | |
$ docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>" -e "MSSQL_PID=Developer" --cap-add SYS_PTRACE -p 1433:1433 -d microsoft/mssql-server-linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using Newtonsoft.Json; | |
namespace Newtonsoft.Json.Serialization | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# powershell 출력 인코딩을 ASCII -> UTF8로 변경 | |
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" | |
autoReload="true" | |
throwExceptions="false" | |
internalLogLevel="Off" internalLogFile="logs/nlog-internal.log"> | |
<!-- cf. https://github.com/NLog/NLog/wiki/Layout-Renderers --> | |
<variable name="default_layout" | |
value="${time} [${logger}(L\:${callsite-linenumber})] ${uppercase:${level}} (TID\:${threadid}) ${message}${onexception:${newline}${exception:format=ToString}}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Linq; | |
using System.Reflection; | |
namespace System | |
{ | |
public static class EnumExtensions | |
{ | |
private static readonly ConcurrentDictionary<string, string> _enumToValueMap | |
= new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: How to on/off the Hyper-v | |
$ bcdedit /set hypervisorlaunchtype [auto|off] |
NewerOlder