Skip to content

Instantly share code, notes, and snippets.

View jb7959's full-sized avatar
🦧
Oops!

Jaeyeoul Ahn jb7959

🦧
Oops!
View GitHub Profile
@alfasin
alfasin / colorful_winston_logger.js
Last active December 19, 2023 01:27
A Nodejs implementation of a console transport logger based on Winston 3.x which also prints the filename and line-number
const winston = require('winston');
const { format } = winston;
const { combine, colorize, timestamp, printf } = format;
/**
* /**
* Use CallSite to extract filename and number, for more info read: https://v8.dev/docs/stack-trace-api#customizing-stack-traces
* @param numberOfLinesToFetch - optional, when we want more than one line back from the stacktrace
* @returns {string|null} filename and line number separated by a colon, if numberOfLinesToFetch > 1 we'll return a string
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@casamia918
casamia918 / introrx.md
Last active August 22, 2024 02:54 — forked from staltz/introrx.md
[Korean ver.] The introduction to Reactive Programming you've been missing

당신이 λ†“μΉ˜κ³  있던 Reactive Programming에 λŒ€ν•œ μ•ˆλ‚΄ (ν•œκΈ€ λ²ˆμ—­)

The introduction to Reactive Programming you've been missing (Korean ver.)

(by @andrestaltz)

(orginal source: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754)


이 νŠœν† λ¦¬μ–Όμ€ λΉ„λ””μ˜€ μ‹œλ¦¬μ¦ˆλ„ μžˆμŠ΅λ‹ˆλ‹€

@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@joshnuss
joshnuss / app.js
Last active February 18, 2025 15:49
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
@cornchz
cornchz / letter.md
Created November 29, 2013 07:15
κΉ€μ§„μˆ˜ κ΅μˆ˜λ‹˜μ΄ 랩 μ‚¬λžŒλ“€μ—κ²Œ 보낸 메일

Weekly reports만 μ˜¬λΌμ˜€λ‹ˆ λ„ˆλ¬΄ μ°λ ν•΄μ§€λŠ” 것 κ°™μ•„μ„œ..

λŒ€ν•™μ› μƒν™œμ„ ν•˜λŠ” μ—¬λŸ¬λΆ„μ—κ²Œ ν‰μ†Œμ— ν•˜κ³  μ‹Άμ—ˆλ˜ 말 λͺ‡ κ°€μ§€λ₯Ό μ μ–΄λ΄…λ‹ˆλ‹€.

Computer Science/Engineering 연ꡬ

물리학, ν™”ν•™, μˆ˜ν•™κ³Ό 같은 μžμ—°κ³Όν•™μ€ 신이 λ§Œλ“€μ–΄ 놓은 μžμ—°μ˜ 이치λ₯Ό κΉ¨λ‹«κ³ μž ν•˜λŠ” ν•™λ¬Έμž…λ‹ˆλ‹€. μ§„μ§œ 신이 μˆ˜μ†Œ, μ‚°μ†Œ, μ§ˆμ†Œ λ“±λ“±μ˜ 각쒅 μ›μ†Œλ₯Ό μ΄μš©ν•΄μ„œ λ¬Όμ§ˆμ„ λ§Œλ“€κ²Œ ν•˜μ…¨λŠ”μ§€λŠ” 아무도 λͺ¨λ¦…λ‹ˆλ‹€. 단지 κ³Όν•™μžλ“€μ΄ ν•˜λŠ” 일은 ν˜„μƒμ„ 잘 μ„€λͺ…ν•  수 μžˆλŠ” κ·ΈλŸ΄λ“―ν•œ 가섀을 λ§Œλ“€κ³  그것이 ν˜„μƒμ„ μ œλŒ€λ‘œ μ„€λͺ…ν•˜λŠ”μ§€λ₯Ό ν™•μΈν•˜λŠ” 일을 λ°˜λ³΅ν•  λΏμž…λ‹ˆλ‹€. λ”°λΌμ„œ μžμ—°κ³Όν•™μ—λŠ” "μ™œ?" κ·Έλ ‡κ²Œ λ˜μ—ˆλŠ”μ§€μ— λŒ€ν•΄μ„œ 물을 ν•„μš”λ„ μ—†κ³ , 단지 발견과 κ²½νƒ„λ§Œμ΄ μ‘΄μž¬ν•  λΏμž…λ‹ˆλ‹€.

κ·ΈλŸ¬λ‚˜ μš°λ¦¬κ°€ μ—…μœΌλ‘œ μ‚Όκ³  μžˆλŠ” computer science ν˜Ήμ€ computer engineering λΆ„μ•ΌλŠ” 신이 λ§Œλ“  것이 μ•„λ‹ˆλΌ μ‚¬λžŒμ΄ λ§Œλ“€μ–΄ 놓은 computer system을 ν•™λ¬Έμ˜ λŒ€μƒμœΌλ‘œ ν•©λ‹ˆλ‹€. λ”°λΌμ„œ, μžμ—°κ³Όν•™κ³ΌλŠ” 본질적으둜 ν•™λ¬Έμ˜ 성격이 틀릴 수 밖에 μ—†μŠ΅λ‹ˆλ‹€. Computer scienceμ—μ„œμ˜ μ—°κ΅¬λŠ” μ–΄λ–»κ²Œ λŒμ•„κ°€λŠ”μ§€ "발견"을 ν•˜λŠ” 연ꡬ가 μ•„λ‹ˆλΌ, "μ™œ" κ·Έλ ‡κ²Œ λ§Œλ“€μ—ˆλŠ”μ§€λ₯Ό μ•Œμ•„λ‚΄κ³ , "μ–΄λ–»κ²Œ ν•˜λ©΄" 더 잘 λ§Œλ“€ 수 μžˆμ„κΉŒ μœ„μ£Όλ‘œ 연ꡬ가 μ΄λ£¨μ–΄μ§€κ²Œ λ©λ‹ˆλ‹€. λͺ‡λͺ‡ μ‚¬λžŒλ“€μ—κ²Œ 이미 μš°μŠ€κ°œμ†Œλ¦¬λ‘œ λ§ν•œ λ°” μžˆμ§€λ§Œ, κ²°κ΅­ μ—°κ΅¬μ˜ μ‹œμž‘μ€ 남이 ν•œ 일에 λŒ€ν•΄μ„œ νŠΈμ§‘μ„ μž‘λŠ” 것뢀터 μ‹œμž‘λ˜λŠ” κ²ƒμž…λ‹ˆλ‹€. 논문을 ν•˜λ‚˜ 읽으면, κ·Έ λ…Όλ¬Έμ˜ μ•„μ΄λ””μ–΄λŠ” 무엇인지, μ–΄λ–»κ²Œ μžμ‹ μ˜ 아이디어가 μ’‹λ‹€κ³  섀득을 ν–ˆλŠ”μ§€, 그리고 λ¬Έμ œμ μ΄λ‚˜ μ œν•œμ μ€ 무엇인지 λΆ„μ„ν•˜λŠ” μŠ΅κ΄€μ„ 항상 듀이기 λ°”λžλ‹ˆλ‹€. μ΄λŸ¬ν•œ 것을 생각해 보지 μ•ŠλŠ”λ‹€λ©΄, 아무리 λ§Žμ€ 논문을 읽어도 연ꡬ에 별 도움이 λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. (μ˜μ–΄μ—λŠ” 도움이 됨)

@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs