Skip to content

Instantly share code, notes, and snippets.

View ldmsys's full-sized avatar

Dongmin Lee ldmsys

View GitHub Profile
@ldmsys
ldmsys / keybase.md
Created August 1, 2020 13:20
Keybase Authentication

Keybase proof

I hereby claim:

  • I am ldmsys on github.
  • I am ldmsys (https://keybase.io/ldmsys) on keybase.
  • I have a public key ASDjcTq2OUvZtjR8P4MY3dkBjSJIGOD-xCYrSaK5mLmjWwo

To claim this, I am signing this object:

@ldmsys
ldmsys / getkey.ts
Last active April 8, 2021 12:27
Get Key from ssl/ directory or selfsign
import forge, { pki } from 'node-forge';
import fs from 'fs';
export interface KeyPair {
cert: string,
key: string
}
export function getKey(): KeyPair {
if(!fs.existsSync('ssl/private.pem') || !fs.existsSync('ssl/certificate.pem')) {
@ldmsys
ldmsys / getSexagenary.js
Last active August 18, 2021 13:00
Get Sexagenary Cycle(간지), which is commonly used in East Asia
function getSexagenary(year) {
let stems = "경신임계갑을병정무기";
let branches = "신유술해자축인묘진사오미";
return stems[year % 10] + branches[year % 12];
}
// getSexagenary(1592) == "임진", getSexagenary(1919) == "기미", getSexagenary(2016) == "병신"
@ldmsys
ldmsys / log10_table.c
Created September 9, 2022 00:25
상용로그표
#include <stdio.h>
#include <math.h>
int main(void) {
int i, j;
double t;
for(i=1;i<10;i++) printf(" %4d ", i);
printf("\n");
for(j=0;j<100;j++) {
printf(".%02d ", j);
@ldmsys
ldmsys / 302-talmorfati-web.aheui
Created October 6, 2022 05:27
ncat -lkvp 12345 -o "/path/to/aheui/implementation web.aheui"
우어어어어어어어어엉서머섥한리다이렉션아
삵뱌우파파마사밢발다밯자추무언가반박나도
여우아아아아오이동민제작삵빠받자추이누야
우리한글로쓰는프로그래밍언어아희먀술샤임
밢밣따맣밝밤받따따맣밝밤받따따맣밢밣따붏
붉벍멓터벓떠벖벒멓떠벍벍멓더번떠벌벒멓더
따맣밣밤따맣밢발따밦다맣밣밦따맣밢발따불
붏떠벌벒멓더범떠벓벒멓떠벌번멓더범벒멓더
타받따맣밢밢반다따맣반발따밢따밝다맣밢붇
뭏떠벋터벓떠벌벒멓떠떠벋벍벌멓떠범더번떠
삵밝빠따밤빠따빠따반반나다따사뱡뿌뻐
한국헥스코드우차우져썲뻐떠벓번썲어왜
알렉스바보우썺씨삶빠싸나사라쌊삶싸소
우어어어어어어어어어어어어어어어어엉
밙반따샶희싸사빠싹파빠싹쟈우처숙오오 
푸범썫뻐터퍼서써써석써뻐섥어라마망소
주받삯싸사빠밙차쟈무처받따다아아아뫃
우오아희로구현한거밟반따반반나타도오
야오차발쟈뱛차밣삯싸사반타따삵싸사도
@ldmsys
ldmsys / factorial.aheui
Last active October 13, 2022 22:04
aheui/snippets/factorial/factorial.aheui
방빠쌊반반나타쌁우
분뻐서써섥서써섮어
쟈무차빠분타쑭팩오
희망희망반노따쌊오
@ldmsys
ldmsys / 자랑스러운_혼종.씨
Created December 25, 2022 04:43
요약: 혼종
#include <stdio.h>
#include <stdarg.h>
#define 반환 return
#define 개행 "\n"
typedef int 정수;
typedef char 문자;
typedef const char 고정문자;
int 주();
int main() {return 주();}
정수 출력(고정문자* 형식, ...) { 정수 임시; va_list ap; va_start(ap, 형식); 임시 = vprintf(형식, ap); va_end(ap); return 임시;};
@ldmsys
ldmsys / detectKeyDown.js
Last active January 6, 2023 07:24
MacBook 버터플라이 키보드 키 중복 이슈 증명용
// 개발자 도구 콘솔에 아래 코드를 붙여넣고 문서를 포커스하여 테스트하세요.
document.clear(); document.write("<br>");
var pk = 0;
window.onkeyup = () => {pk = 0};
window.onkeydown = (k) => {if(pk!=k.keyCode){document.write((+new Date())+k.key+"<br>"); pk=k.keyCode}};