Skip to content

Instantly share code, notes, and snippets.

View kyh196201's full-sized avatar
🐢
Slow and steady

Seungwoo Kim kyh196201

🐢
Slow and steady
View GitHub Profile
@szemate
szemate / package-lock-conflicts.md
Last active June 13, 2024 15:11
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    git pull
    
  2. Merge your feature branch into master:
@JimYaaa
JimYaaa / vue.js
Last active November 26, 2021 09:02
Vue Recursive Component Emit
// Parent Component
<template>
<div>
<parent-recursive-component @recursiveEmit="recursiveEmit" />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import ParentRecursiveComponent from './RecursiveComponent'
@wobsoriano
wobsoriano / App.vue
Last active November 23, 2022 17:13
Vue 3 Infinite Scroll Component
<script setup lang="ts">
import { ref } from 'vue';
import InfiniteScroll from '~/components/InfiniteScroll.vue';
import SkeletonPostItem from '~/components/SkeletonPostItem.vue';
interface State {
loaded: () => void;
complete: () => void;
}
@karpolan
karpolan / .prettierrc.js
Last active July 5, 2024 06:08
Prettier config for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@cathrinevaage
cathrinevaage / App.vue
Last active April 17, 2024 04:40
Tabs in Vue 3 / Composition API
<!-- Usage -->
<template>
<Tabs>
<Tab name="Foo">Content of tab Foo</Tab>
<Tab name="Bar">Content of tab Bar</Tab>
</Tabs>
</template>
<script>

Boolean() or !! (double bang, double negation)?

What's the best way to answer the question "true or false?" in JavaScript

JavaScript does not bother you too much with types (at first), which is both a blessing and a cure. But we all know the Boolean type. Boolean variables can either be true or false. Yes or no.

Every value in JavaScript can be translated into a boolean, true or false. Values that translate to true are truthy, values that translate to false are falsy. Simple.

This is about two ways to make that translation.

@Jonarod
Jonarod / RadioBox.vue
Created November 23, 2019 18:23
Simple custom Radio component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <RadioBox label="Foo" value="foo" v-model="MySelectedValue" />
* <RadioBox label="Bar" value="bar" v-model="MySelectedValue" />
* <RadioBox label="Baz" value="baz" v-model="MySelectedValue" />
*
* data(){
* return {
* MySelectedValue: "",
@silverprize
silverprize / emoji-unicode.md
Last active February 23, 2024 00:36
Emoji on Unicode

참고글 : https://blog.jonnew.com/posts/poo-dot-length-equals-two

“🖤”.length() => 2
“❤️”.length() => 2
“👦”.length() => 2
“👦🏾”.length() => 4
“🚵‍♀️”.length() => 5
“👨‍👩‍👦‍👦”.length() => 11

한글자로 취급될 것 같은 한개의 이모지에서 이런 결과가 나오는 이유를 찾아보았습니다.

Svelte.js

왜 svelte가 Vue 보다 더 좋은가? By John Hannah

  • 내(박성렬)가 Svelte에 관심을 가지게 된 이유.
  • 글이 주장하는 바는 대략 세 가지
    • 구문이 간결하다.
    • Vue보다 빠르다(bootup time, main thread cost)
    • 용량이 Vue보다 적다(total byte weight)
@iannbing
iannbing / ._reactFormatting
Last active November 15, 2022 17:04
A gist for initial eslint and prettier setup for React projects
We couldn’t find that file to show.