- Using the
BaseModel
frompydantic
takes the class members as arguments.- These arguments are displayed (along with the values) in the docs whether the user wants it or not.
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# asyncpg docs: https://magicstack.github.io/asyncpg/current/ | |
# This uses discord.py rewrite branch and .format(). If you are using the async branch of discord.py, it shouldn't matter much | |
# as only 'await ctx.send()' is something you should need to change. If you are using python 3.6+, you can use f strings as opposed to | |
# .format() for increased efficiency. | |
import discord | |
from discord.ext import commands | |
import asyncio | |
import asyncpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.5 | |
MAINTAINER Marlon Baptista de Quadros([email protected]) | |
ENV PYTHONUNBUFFERED 1 | |
RUN apt-get update -y | |
RUN apt-get -y install binutils libproj-dev gdal-bin postgresql-client python3-lxml | |
RUN apt-get -y install libmemcached-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pacman -Rsc -n nodejs | |
sudo pacman -Sy nodejs | |
sudo pacman -Sy npm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman | |
====== | |
view logs: /var/log/pacman.log | |
update system | |
# pacman -Syu | |
list installed packages | |
# pacman -Q |