Skip to content

Instantly share code, notes, and snippets.

View JHSeo-git's full-sized avatar

JHSeo JHSeo-git

View GitHub Profile

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@saqueib
saqueib / errorHandler.js
Last active June 9, 2022 06:42
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
import axios from 'axios'
import toast from './toast'
function errorResponseHandler(error) {
// check for errorHandle config
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) {
return Promise.reject(error);
}
// if has response show the error
@seoh
seoh / fp-curriculum.md
Last active August 15, 2023 16:18
A functional programming curriculum

함수형 프로그래밍 커리큘럼

함수형 프로그래밍에 중점을 둔 스칼라 책들은 훌륭한게 많지만 초심자부터 전문가까지 단계별로 가이드할 수 있는 커리큘럼을 추천하려고한다.

  1. 초보자거나 스칼라 입문이라면:
  • 데이브 거넬과 노엘 웰시의 크리에이티브 스칼라(무료). 스칼라를 배우려는 입문자들을 위한 책이고 재미있다.
  • 노엘 웰시와 데이브 거널의 에센셜 스칼라(무료). 견고하고 성능좋고 스칼라다운 코드를 짜도록 도와준다. 다른 언어의 경험이 있는 개발자들을 대상
  1. 더 심도있는 개념을 원하면:
  • 폴 키우사노와 루나르 비아르드나손의 스칼라로 배우는 함수형 프로그래밍($36, 2.8만). 객체지향의 디자인패턴처럼 함수형 프로그래밍에서 자주 쓰이는 패턴인 데이터와 타입클래스들이 어떤 개념인지 직접 구현해보는 책. 스칼라 문법 정도는 익힌 개발자 대상.
@sindresorhus
sindresorhus / esm-package.md
Last active July 26, 2024 07:50
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.