Skip to content

Instantly share code, notes, and snippets.

@cto-4piens
cto-4piens / djangoDatabaseSetting.py
Last active January 18, 2019 05:27
[django databases] django database setting #database #setting
DATABASES = {
'default': env.db('DATABASE_URL', default='postgres:///dookkeobi'),
}
DATABASES['default']['ATOMIC_REQUESTS'] = True
@cto-4piens
cto-4piens / postgres.md
Last active January 18, 2019 11:02
[postgres 명령어] postgres 명령줄 명령어 #psql #postgres #postgresql

postgres 명령어 정리

특정 USER로 접속하기

psql -U [USER_NAME] [DATABASE_NAME]

@cto-4piens
cto-4piens / masonryExample.js
Last active January 18, 2019 11:23
[gestalt mesonry example] #masonry #gestalt
import React from "react";
import { render } from "react-dom";
import Img from "react-image";
import styled from "styled-components";
import { Box, Masonry, Mask } from "gestalt";
const Image = styled(Img)`
width: 100%;
height: 100%;
transition: transform 0.2s ease-in-out;
@cto-4piens
cto-4piens / gitCommnad.md
Last active January 20, 2019 06:20
[git command] #git #cli #command-line-interface

git tree on cli

git log --all --graph --decorate --oneline

@cto-4piens
cto-4piens / redux_saga.js
Created January 24, 2019 08:17
[redux-saga] #redux #redux-saga #howToSetUp
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import logger from 'redux-logger';
import reducer from './reducers';
import rootSaga from './sagas';
export default function configureStore(initialState) {
const sagaMiddleware = createSagaMiddleware();
const store = createStore(
reducer,
@cto-4piens
cto-4piens / horizontalStackList.js
Created February 13, 2019 08:14
[HorizontalStackListWithAnimation]
import React from 'react'
import {
Box,
Button,
Mask,
Image,
IconButton,
Text,
Toast
} from 'gestalt'
@cto-4piens
cto-4piens / materialUI.md
Created February 18, 2019 02:56
[material-ui]

===

@cto-4piens
cto-4piens / djangoStart.md
Created February 23, 2019 02:27
[How to start django project]
@cto-4piens
cto-4piens / server.js
Created July 8, 2019 13:44
[express로 build완료한 react app 서빙하기] #express #react-app #build
//백엔드와 프론트엔드 폴더가 완전히 분리되어 있는 상태이다.
const express = require('express');
const path = require('path');
const app = express();
const staticPath = path.join(__dirname, '../frontend/build')
console.log(staticPath)
app.use(express.static(staticPath));
@cto-4piens
cto-4piens / deploy react build files to googleCloudStorage
Created July 8, 2019 14:42
[google cloud storage에 빌드 완료한 리액트앱 배포하기] #GoogleCloudStorage #React #deployment
1. 버킷을 만든다.
2. CNAME을 등록한다.
3. TXT파일을 등록한다.
4. 버킷의 최상위 디렉토리에 index.html이 오도록 파일들을 업로드한다.
5. 버킷의 웹사이트 구성을 수정하여, 최상위 디렉토리 접속시 index.html을 보내도록한다.