Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
| #!/bin/bash | |
| #get highest tag number | |
| VERSION=`git describe --abbrev=0 --tags` | |
| #replace . with space so can split into an array | |
| VERSION_BITS=(${VERSION//./ }) | |
| #get number parts and increase last one by 1 | |
| VNUM1=${VERSION_BITS[0]} |
| import React from "react" | |
| import { Route, Switch } from "react-router-dom" | |
| const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
| <Route {...rest} render={props => ( | |
| <Layout> | |
| <Component {...props} /> | |
| </Layout> | |
| )} /> | |
| ) |
| // O(1) | |
| const todo = (state, action) => { | |
| const actions = { | |
| ADD_TODO: () => { | |
| return { | |
| id: action.id, | |
| text: action.text, | |
| completed: false | |
| } | |
| }, |
| function quickSort(arr){ | |
| if(arr.length < 2) | |
| return arr; | |
| var pivot = arr[Math.floor(arr.length/2)]; | |
| var middle = arr.filter(function (data) {return data == pivot;}); | |
| var lows = quickSort(arr.filter(function (data) {return data < pivot;})); | |
| var highs = quickSort(arr.filter(function (data) {return data > pivot;})); | |
| /** | |
| ์ด์ฑ ์ค์ฑ ์ข ์ฑ ๋ถ๋ฆฌ ํ๊ธฐ | |
| ์ ๋์ฝ๋ ํ๊ธ์ 0xAC00 ์ผ๋ก๋ถํฐ | |
| ์ด์ฑ 19๊ฐ, ์ค์21๊ฐ, ์ข ์ฑ28๊ฐ๋ก ์ด๋ฃจ์ด์ง๊ณ | |
| ์ด๋ค์ ์กฐํฉํ 11,172๊ฐ์ ๋ฌธ์๋ฅผ ๊ฐ๋๋ค. | |
| ํ๊ธ์ฝ๋์ ๊ฐ = ((์ด์ฑ * 21) + ์ค์ฑ) * 28 + ์ข ์ฑ + 0xAC00 | |
| (0xAC00์ 'ใฑ'์ ์ฝ๋๊ฐ) |