갖고있는 PGP 키쌍이 없을경우 새로 만들어야한다. 이미 키 쌍이 keybase에 업로드되어있는 경우, 기존의 키를 컴퓨터에 다운로드하기만 하면 된다.
keybase login| #!/bin/bash | |
| # Remove exited containers | |
| EXITED_CONTAINERS=$(docker ps -a -f status=exited -q) | |
| if [ ! -z "${EXITED_CONTAINERS}" ] | |
| then | |
| docker rm ${EXITED_CONTAINERS} &2>1 | |
| echo "Remove exited containers." | |
| else | |
| echo "...No exited containers." |
| # Docker-in-Docker Gitlab runners setup taken from: | |
| # https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca | |
| dind: | |
| restart: always | |
| privileged: true | |
| volumes: | |
| - /var/lib/docker | |
| image: docker:17.09.0-ce-dind | |
| command: | |
| - --storage-driver=overlay2 |
| ServerAliveInterval 120 | |
| Host * | |
| UseKeychain yes | |
| # Company Server | |
| # ------------------------------------ | |
| Host company-sample-server | |
| HostName sample.company.com | |
| User sample_user | |
| IdentityFile ~/.ssh/sample/id_rsa |
| -- Postgres 계정 생성 및 설정 | |
| CREATE ROLE sample_user WITH LOGIN PASSWORD 'sample_password'; | |
| -- Postgres 데이터베이스 생성 | |
| CREATE DATABASE sample_db WITH OWNER sample_user ENCODING 'UTF8' LC_COLLATE = 'ko_KR.UTF-8' LC_CTYPE = 'ko_KR.UTF-8'; | |
| -- sample_db 로 접속 | |
| \c sample_db; | |
| -- DB 권한 부여 |
| worker_processes 2; | |
| # error_log logs/error.log debug; | |
| error_log off; | |
| events { | |
| worker_connections 1024; | |
| } | |
| rtmp { |
| body { | |
| background-color: rgba(0, 0, 0, 0) !important; | |
| margin: 0px auto; overflow: hidden; | |
| } | |
| .restream-embed-themes-chat-container.restream-embed-themes-chat-container_default { | |
| background: transparent !important; | |
| } | |
| .message-item { |
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
| chmod 700 ~/.ssh | |
| chmod 600 ~/.ssh/id_rsa | |
| chmod 644 ~/.ssh/id_rsa.pub | |
| chmod 644 ~/.ssh/authorized_keys | |
| chmod 644 ~/.ssh/known_hosts |
| const tzOffset = (new Date()).getTimezoneOffset() * 60000 | |
| const now = new Date(Date.now() - tzOffset).toISOString(); |