Skip to content

Instantly share code, notes, and snippets.

View seungha-kim's full-sized avatar

seungha-kim

View GitHub Profile
@seungha-kim
seungha-kim / assignment-1.md
Last active October 19, 2018 03:05
Break week 추가 과제

Break week 추가 과제 1

수업 시간에 같이 만들어봤던 할 일 목록본인만의 디자인을 입혀서, Netlify에 배포하신 후

  • Github 저장소 URL
  • Netlify에 배포한 사이트 URL

을 저에게 Slack direct message로 제출해주세요.

코드를 작성하실 때, 해커톤 템플릿 프로젝트복사하시고 그 위에서 작업을 해 주세요. 저장소 복사하는 방법을 본 문서 하단에 적어두었으니 참고해주세요.

@seungha-kim
seungha-kim / array.md
Last active October 24, 2018 05:27
추가 문제

문제 1. 배열을 입력받아, 해당 배열에 들어있는 요소들 중 최대값을 찾는 함수를 작성하세요. (루프를 이용하세요)

예:

max([3, 1, 4, 5, 2]) // -> 5

@seungha-kim
seungha-kim / docker-compose.yml
Created August 28, 2018 01:45
simple docker-compose.yml for caddy
version: "3"
services:
proxy:
image: abiosoft/caddy
volumes:
- ./Caddyfile:/etc/Caddyfile
- .caddy:/root/.caddy # prevent from renewing certs
network_mode: "host"
environment:

React Router에서 사용되는 컴포넌트에 대한 간략한 설명

<BrowserRouter />, <HashRouter />

  • Context API의 Provider와 유사한 역할을 한다.
    • BrowserRouter의 경우 브라우저의 popstate 이벤트와 연동되어 있다.
    • HashRouter의 경우 브라우저의 hashchange 이벤트와 연동되어있다.
  • 아래에 나오는 컴포넌트들은 전부 Context API의 Consumer와 유사한 역할을 한다. (즉, 상위 Router 컴포넌트와 연동되어, 상태를 받아오거나 상태를 바꿀 수 있다.)

``

@seungha-kim
seungha-kim / adder.jsx
Created June 12, 2018 08:18
React 예제
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
state = {
number1: 3,
number2: 4
}
handleNumber1Change = e => {
this.setState({
@seungha-kim
seungha-kim / index.mjs
Created June 2, 2018 11:03
.mjs 확장자 JavaScript 모듈
import { foo, spam, add, Person } from './variables';
console.log(foo);
console.log(spam);
console.log(add(1, 2));
console.log(new Person().name);
{
"users": [
{
"id": 1,
"username": "fds"
}
],
"posts": [
{
"id": 1,
@seungha-kim
seungha-kim / .eslintrc
Last active February 1, 2018 02:38 — forked from rakannimer/add-react-jest-airbnb-linting.sh
Adding react-airbnb styleguide linting to create-react-app
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"jest": true
},
"extends": "airbnb",
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
@seungha-kim
seungha-kim / index.css
Created January 10, 2018 08:16
사진 공유 앱 예제 코드
.image-list {
width: 500px;
}
@seungha-kim
seungha-kim / index.css
Created January 9, 2018 08:37
Firebase TODO
.authed .loading,
.not-authed .loading {
display: none;
}
.login {
display: none;
}
body.not-authed .login {