Skip to content

Instantly share code, notes, and snippets.

View openhubdev's full-sized avatar

sleepydev openhubdev

  • somewhere in the universe
View GitHub Profile

Django Deployment to Digital Ocean w Ubuntu 18.04 | Ubuntu 18.04를 사용하여 Digital Ocean에 Django 배포

Reference: digital ocean doc | Credit to bradtraversy

  • "$" 있는 명령 : 로컬
  • "#" 있는 명령 : 원격 서버 (이 경우 Digital Ocean)

Create A Digital Ocean Droplet | 첫째, 디지털 바다 방울 만들기

🐘 Postgres 101

1. Connect to the PostgreSQL

psql postgres or psql postgres -U patrick (as the user "patrick")

2. Create a database

postgres=# CREATE DATABASE djangoblog;

3. Set the access permissions

postgres=> GRANT ALL PRIVILEGES ON DATABASE my_db TO patrick;

EXPRESSJS 101

@app.js

Define the custom routes JS files

const indexRouter = require('./routes/index');
const usersRouter = require('./routes/users');
const canvasRouter = require('./routes/canvas');

🐬 MySQL commands 101

First step

First where your mysql is

which mysql

To login (from unix shell) use -h only if needed.

Django More in-depth

Internationalization:

Once all strings are marked for translation, generate the message files:

Generate message files for a desired language

python manage.py makemessages -l kr

After adding translations to the .po files, compile the messages

🐝 장고 (Django) 101

우선 Python> = 3.3이 설치되어 있는지 확인하십시오.

python -Vor python3 -V

0. 프로젝트 폴더 만들기 (=컨테이너 root)

1. 가상 환경 만들기

그 프로젝트 폴더 안에서 이 명령어 치기:

@openhubdev
openhubdev / .block
Last active March 26, 2021 16:55 — forked from d3indepth/.block
D3 line generator
license: gpl-3.0
height: 120
border: no
@openhubdev
openhubdev / .block
Created March 26, 2021 16:56 — forked from d3indepth/.block
Tree layout (from introduction)
license: gpl-3.0
height: 1000
border: no
//next.config.js
module.exports = {
i18n: {
locales: ['en-US', 'fr', 'ko'],
domains: [
{
domain: 'yourdomain.com',
defaultLocale: 'en-US'
},
{