Skip to content

Instantly share code, notes, and snippets.

View mu-hun's full-sized avatar
💡
No Silver Bullet

Mu hun mu-hun

💡
No Silver Bullet
View GitHub Profile
@mu-hun
mu-hun / pathReslove.ts
Created June 4, 2023 06:09
Node JS API `path.resolve` implement
export default function pathResolve(...paths: string[]) {
const parsedPaths = paths.flatMap((path) => path.split('/')).filter(Boolean);
const resolvedPaths = parsedPaths.reduce((previousValue, path) => {
if (path === '..') {
previousValue.pop();
} else {
previousValue.push(path);
}
@mu-hun
mu-hun / light.txt
Last active May 30, 2023 15:01
조명용 인라인 HTML
data:text/html,<input type="color" onchange="document.bgColor=this.value">
@mu-hun
mu-hun / index.ts
Created January 24, 2023 06:21
First item is constant
type A = ['-', ...number[]]
let a = ['-', 1, 2, 3, 4] satisfies A
// You can type check in playground:
// https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDaByAtCgNFAdHgdgK4C2ARhAE5IC61AUHQDYTBQCGCy6WUAjNgCZsAZmwAWalADObYAEspAMzkQpsOkA
@mu-hun
mu-hun / recommend-references.md
Last active February 21, 2024 15:58
업무 중 추천 할 만한 서적

소프트웨어 공학

  • 프로패셔널 소프트웨어 - 개발 짧은 스케줄, 뛰어난 상품, 성공적인 프로젝트, 경력 개발을 위해
  • 실용주의 프로그래머
  • 맨 먼스 미신
  • 프로그래밍 심리학
  • 내 코드가 그렇게 이상한가요 - 좋은 코드/나쁜 코드로 배우는 설계 입문

수학적 사고 및 문제해결

  • 알고리즘 트레이닝 - 프로그래밍 대회 입문 가이드
@mu-hun
mu-hun / .zshrc
Last active October 21, 2021 03:33
Open Azure repo in Browser from git remote url
function az() {
open `git remote get-url origin |
perl -pe 's#^git\@ssh\.dev\.azure\.com:v3/(.*)/(.*)$|^https://.*@dev.azure.com/(.*)/_git/(.*)$#https://dev.azure.com/\1\3/_git/\2\4#g'`
}
@mu-hun
mu-hun / SICP.md
Last active February 19, 2021 11:12

SICP

1. 프로시져를 써서 요약하는 방법

데이터 구조, 기능 관계성을 설명하는 용도로 리스프가 알맞다.

  • 프로시저를 보통 데이터처럼 쓸 수 있다.
  • 데이터와 프로시저를 구분하지 않는다
    • 대표 예로 표현식 = 값 인가?

리스프는 프로시저를 데이터처럼 다룬다.

@mu-hun
mu-hun / 4.1.2.js
Created September 30, 2020 05:07
YDKJS generator example
let z = 1;
function *foo() {
const x = yield 2;
z++
const y = yield (x*z)
console.log(x, y, z)
}
const it_first = foo()
@mu-hun
mu-hun / daum-mail.js
Last active August 15, 2020 07:27
북마크 한 메일만 제외해서 삭제하기
const bookmark = '.btn_important.on'
const interval = setInterval(function () {
const items = document.querySelectorAll('.mail_item')
for (const item of items) {
if (item.querySelector(bookmark) == null) item.querySelector('#mCk').click()
}
document.querySelector('.btn_del').click()
if (
document.querySelector('.info_none') != null ||
const fetchMachine = Machine({
initial: 'idle',
states: {
idle: {
on: {
SUBMIT: 'submit',
},
},
submit: {
on: {

Keybase proof

I hereby claim:

  • I am x86chi on github.
  • I am x86chi (https://keybase.io/x86chi) on keybase.
  • I have a public key whose fingerprint is AC20 7DB2 AB92 8ADA 536B D65B 3258 2116 71E1 404B

To claim this, I am signing this object: