Skip to content

Instantly share code, notes, and snippets.

View ygnoh's full-sized avatar
😐
Go for it

Yonggoo Noh ygnoh

😐
Go for it
View GitHub Profile
@ygnoh
ygnoh / diff-two-strings.js
Last active July 10, 2023 01:31
JavaScript diff two strings
const str0 = "01234567";
const str1 = "01234567"; // same
const str2 = "012abc34567"; // inserted
const str3 = "012abc7" // replaced and decreased
const str4 = "012abcdefg67" // replaced and increased
const str5 = "012abc67" // resplaced
const str6 = "kk"; // all replaced
const str7 = "012367"; // middle removed
const str8 = "01234567890" // appended
const str9 = "8901234567" // prepended
@ygnoh
ygnoh / invoke-async-multiple-times-in-regular-sequence.js
Last active March 19, 2020 06:04
invoking an async function multiple times in regular sequence
const af = n => {
return new Promise(res => {
setTimeout(() => {
console.log(n);
res();
}, 200 * n);
})
};
@ygnoh
ygnoh / .gitconfig
Created September 19, 2017 01:57 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com