Skip to content

Instantly share code, notes, and snippets.

View dowol's full-sized avatar

Dowol dowol

  • Osan, GYEONGGI, South Korea
View GitHub Profile
@dowol
dowol / EasyLoggerExtensions.cs
Created March 14, 2026 14:40
Simplified Logger API of Microsoft.Extensions.Logging
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
namespace MSHOSTEXAMPLE
{
internal static class LoggerExtensions
{
internal static void Trace(this ILogger logger, string message, params object[] args)
@dowol
dowol / RelayCommand.cs
Last active March 8, 2026 07:09
A command class that can be executed, typically used in MVVM patterns
using System.Windows.Input;
namespace WPFEXAMPLE
{
/// <summary>
/// A command class that can be executed, typically used in MVVM patterns to bind actions to UI elements.
/// </summary>
public class RelayCommand : ICommand
{
private readonly Action<object?> execute;
@dowol
dowol / DataContextBase.cs
Created March 8, 2026 06:53
Base class of the WPF ViewModel (Data Context)
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WPFEXAMPLE
{
/// <summary>
/// Base class of the WPF ViewModel (Data Context)
/// </summary>
public abstract class DataContextBase : INotifyPropertyChanged
{
@dowol
dowol / lingui.config.ts
Created February 20, 2026 12:11
Basic configuration template for lingui.js
import { defineConfig } from '@lingui/conf';
export default defineConfig({
sourceLocale: 'en', // Original locale of the contents
locales: ['ko', 'en', 'fr', 'ja'], // Officially supported locales of the contents
catalogs: [
{ // Default map to extract *.po files from entire components
path: '<rootDir>/src/locales/{locale}',
include: ['<rootDir>/src'],
export type Alpha2LanguageCode
= 'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av'
| 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo'
| 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv'
| 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es'
| 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga'
| 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr'
| 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik'
| 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj'
| 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw'