Skip to content

Instantly share code, notes, and snippets.

View skt-t1-byungi's full-sized avatar

BYUNGI skt-t1-byungi

View GitHub Profile
@skt-t1-byungi
skt-t1-byungi / 코루틴.md
Last active September 2, 2022 11:33
코루틴설명

제네레이터, 또는 async함수와 같은 코루틴은 로직을 일시중단(yield또는 await을 통해)할 수 있습니다. 기존의 콜백패턴에선 pause된 상태를 구분 하기 위한 플래그 변수가 필요한데 코루틴 패턴에선 (일시중단할 수 있는)제어흐름으로써 대신 표현가능합니다.

BEFORE:

const el = document.querySelector('.draggable')

let isTouching = false // <= 플래그변수, 로직이 복잡할 수록 늘어남
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:4.004267,
https://s3mne.jetcloud.cc/34c15b4a328c4cc6b9351c9abf57eaa3/480_0.ts
#EXTINF:4.004267,
https://s3mne.jetcloud.cc/34c15b4a328c4cc6b9351c9abf57eaa3/480_1.ts
#EXTINF:4.004267,
@skt-t1-byungi
skt-t1-byungi / abbr.txt
Last active May 23, 2021 05:33
내가 코딩때 쓰는 약어 모음
app => application
acc => accumulate
arr => array
abs => absolute
addr => address
arg => argument
args => arguments
attr => attribute
attrs => attributes
auth => authenticate
@skt-t1-byungi
skt-t1-byungi / style.css
Last active April 17, 2019 00:53
vscode font style
.mtk4,.mtk6,.mtk8,.mtk10,.mtki{
font-family: "Operator Mono Lig";
}
.mtk6{
font-style: italic;
}
.mtk11 {
font-weight: bold;
}
@skt-t1-byungi
skt-t1-byungi / test.html
Created August 3, 2018 07:42
eventemitter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
hello
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@skt-t1-byungi
skt-t1-byungi / hyper-nitty-gritty.js
Created January 29, 2018 13:50 — forked from WebReflection/hyper-nitty-gritty.js
hyperHTML, the nitty gritty
// used to retrieve template content
const templates = new Map;
// used to retrieve node updates
const updates = new WeakMap;
// hyperHTML, the nitty gritty
function hyperHTML(chunks, ...interpolations) {
// if the static chunks are unknown
@skt-t1-byungi
skt-t1-byungi / ie.gif
Last active August 17, 2017 02:07 — forked from nolanlawson/ie.gif
Scroll jank demo - touch (passive false)
ie.gif
@skt-t1-byungi
skt-t1-byungi / ie.gif
Last active August 17, 2017 02:07 — forked from nolanlawson/LICENSE
Scroll jank demo - wheel (passive true)
ie.gif
@skt-t1-byungi
skt-t1-byungi / inno.js
Last active January 21, 2017 09:56
simple factory
(function(win, $) {
'use strict';
var NAMESPACE = 'innorix';
var modules = {};
var fetched = { $: $ };
var define = win[NAMESPACE] = function(name, fn) {
modules[name] = fn;