Skip to content

Instantly share code, notes, and snippets.

View rockpell's full-sized avatar
🏫
in Seoul

rockpell rockpell

🏫
in Seoul
  • 생활연구소
  • 경기도 성남시 분당구 판교로 242, 판교디지털센터 C동 10층 1002호 생활연구소
View GitHub Profile
🌞 Morning 57 commits ▊░░░░░░░░░░░░░░░░░░░░ 4.1%
🌆 Daytime 425 commits ██████▍░░░░░░░░░░░░░░ 30.4%
🌃 Evening 695 commits ██████████▍░░░░░░░░░░ 49.7%
🌙 Night 222 commits ███▎░░░░░░░░░░░░░░░░░ 15.9%
@rockpell
rockpell / . prettierrc
Last active May 19, 2021 15:35
prettier setting
{
"arrowParens": "always",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
@rockpell
rockpell / .eslintrc.js
Created November 7, 2020 08:55
eslintrc setting
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
@rockpell
rockpell / app.js
Last active November 8, 2020 04:41
express sample code
const express = require('express');
const passport = require('passport');
require('dotenv').config();
const indexRouter = require('./routes/index');
const port = process.env.PORT || 3000;
const app = express();
app.use(passport.initialize());
module.exports = {
apps: [
{
name: '',
script: './app.js',
instances: 0,
exec_mode: 'cluster'
}
]
};
@rockpell
rockpell / webpack.config.js
Created November 8, 2020 08:28
webpack config
const port = process.env.PORT || 3000;
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: { app: ['babel-polyfill', './src/index.js'] },
output: {
filename: 'bundle.[hash].js',
publicPath: '/',
@rockpell
rockpell / .babelrc
Created November 8, 2020 08:31
babel config for react
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}

TDD는 무엇인가?

  • 테스트를 먼저 만들고 테스트를 통과하기 위해 코드를 작성하는 것을 의미한다.

  • 코드를 만들고 테스트를 하여 제대로 동작하는지 반복하면서 이에 대한 피드백을 적극적으로 받는 개발 방법이다.

TDD는 왜 하는걸까?

@rockpell
rockpell / keylogger.js
Last active January 21, 2021 11:23
문제 풀이(백준에서는 입출력 관련 오류가 있음)
// https://www.acmicpc.net/problem/5397
function stdin_text() {
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
const input = [];
let isFirstLine = false;