Skip to content

Instantly share code, notes, and snippets.

View daejungkim's full-sized avatar

Daejung Kim daejungkim

  • LG Electronics Inc.
View GitHub Profile
@daejungkim
daejungkim / pkg-config-guide.md
Created August 19, 2025 07:43 — forked from lethee/pkg-config-guide.md
Guide to pkg-config 한글 번역
@daejungkim
daejungkim / README.md
Created July 7, 2025 00:56 — forked from 4wk-/README.md
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@daejungkim
daejungkim / type.cpp
Created October 30, 2024 01:46 — forked from star114/type.cpp
[c++ default template parameter and type] std::enable_if usage
/*
* 1) 디폴트 템플릿 파라미터는 템플릿 펑션 시그니처에 안들어감(그래서 typename = std::enable_if_t(condition, type))의 condition만 다른 두 함수를 만들 수 없음
* 2) enable_if의 type이 int char등 넌 타입 템플릿에 올 수 있는 타입이여야 함.(더블 안됨) 그래야 typename int = 0형태인 넌 타입 템플릿 파라미터 형식으로 추론됨
* 올수 이는 녀석은 nullptr, integral lvalue reference, pointer, enum 이라고 함
*/
#include <iostream>
#include <string>
#include <type_traits>
@daejungkim
daejungkim / .screenrc
Created March 7, 2024 01:39 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@daejungkim
daejungkim / async-op.c
Created July 25, 2023 05:42 — forked from takaswie/async-op.c
A sample of async operation of GLib.
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdio.h>
#include <stdlib.h>
typedef int CakeFlavor;
typedef int CakeFrostingType;
@daejungkim
daejungkim / rotate_bounding_box.py
Created June 15, 2023 08:14 — forked from alxcnwy/rotate_bounding_box.py
Rotate bounding box and get new bounding coords
# answer to this reddit post:
# https://www.reddit.com/r/learnmachinelearning/comments/o6br1e/calculate_bounding_box_coordinates_from_contour/
import numpy as np
from numpy import sin, cos, sqrt, pi
import math
import matplotlib.pyplot as plt
center = (332, 209)
width = 56
@daejungkim
daejungkim / TaskConcurrencyManifesto.md
Created October 25, 2022 07:52 — forked from lattner/TaskConcurrencyManifesto.md
Swift Concurrency Manifesto
@daejungkim
daejungkim / WSL2-Net-Fix.ps1
Created October 18, 2022 01:20 — forked from danvy/WSL2-Net-Fix.ps1
Reset your WSL network connection trying to fix WSL2 media disconnected error
# Check these threads before proceeding:
# https://github.com/microsoft/WSL/discussions/5857
# https://github.com/microsoft/WSL/issues/5821
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine
Exit
}
# Restart the Host Network Service
Restart-Service -Force -Name hns
@daejungkim
daejungkim / GitHub protocol comparison.md
Created July 12, 2022 00:23
A comparison of protocols offered by GitHub (for #git on Freenode).

Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.

Protocols to choose from when cloning:

plain Git, aka git://github.com/

  • Does not add security beyond what Git itself provides. The server is not verified.

    If you clone a repository over git://, you should check if the latest commit's hash is correct.

@daejungkim
daejungkim / .gitconfig
Created May 3, 2022 01:40 — forked from Kovrinic/.gitconfig
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "[email protected]:"]
insteadOf = git://github