- Vetur: https://marketplace.visualstudio.com/items?itemName=octref.vetur
- vscode-icons: https://marketplace.visualstudio.com/items?itemName=robertohuertasm.vscode-icons
- Vue i18n: https://marketplace.visualstudio.com/items?itemName=think2011.vue-i18n
- YAML: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
- Vue Peek: https://marketplace.visualstudio.com/items?itemName=dariofuzinato.vue-peek
- TODO Highlight: https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight
- scss-lint: https://marketplace.visualstudio.com/items?itemName=adamwalzer.scss-lint
- REST Client: https://marketplace.visualstudio.com/items?itemName=humao.rest-client
- Quokka.js: https://marketplace.visualstudio.com/items?itemName=WallabyJs.quokka-vscode
- Prettier - Code formatter: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 같으면 0, 다르면 1 | |
* @param (숫자) left | |
* @param (숫자) right | |
*/ | |
function scoreNumbers(left, right) { | |
return left == right ? 0 : 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.parameterPermitter = function ({ params = [] }) { | |
if (!Array.isArray(params)) throw new Error(`Request Parameter ${params} is invalid parameters array`) | |
return function (req, res, next) { | |
res.locals.permitted = {} | |
params.forEach((param) => { | |
if (!req.body.hasOwnProperty(param)) throw new Error(`${param} is required`) | |
res.locals.permitted[param] = req.body[param] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
// CONFIGURATION ####################################################################################################### | |
const token = 'SLACK TOKEN'; | |
// Legacy tokens are no more supported. | |
// Please create an app or use an existing Slack App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
뭔가 퍼즐같은 RxSwift 질문입니다. | |
서버에 3 페이지의 분량을 한꺼번에 요청하려는데, | |
요청은 동시에 보내고 응답은 순서대로 처리하고 싶습니다. | |
테스트 시나리오: | |
각 요청(Observable)들은 subscribe 될 때 request가 시작 | |
각 요청의 request에는 2, 4, 2초씩 걸린다고 가정 | |
-> 2초 후 첫 페이지가 뜨고 | |
-> 추가로 2초 후 나머지가 전부 뜨는 | |
상황을 원하고 있습니다. |
-
var
는function-scoped
이고,let
,const
는block-scoped
입니다. -
function-scoped
와block-scoped
가 무슨말이냐?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path') | |
module.exports = { | |
entry: { | |
app: './src/main.js' | |
}, | |
output: { | |
path: path.resolve(__dirname, '../dist/static'), | |
publicPath: '/static/', | |
filename: '[name].js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The MIT License (MIT) | |
// | |
// Copyright (c) 2016 Suyeol Jeon (xoul.kr) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
NewerOlder