This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
$ ssh [email protected]
$ mkdir test
$ cd test
import os | |
# We'll render HTML templates and access data sent by POST | |
# using the request object from flask. Redirect and url_for | |
# will be used to redirect the user once the upload is done | |
# and send_from_directory will help us to send/show on the | |
# browser the file that the user just uploaded | |
from flask import Flask, render_template, request, redirect, url_for, send_from_directory | |
from werkzeug import secure_filename | |
# Initialize the Flask application |
Steps to deploy a Node.js app to Digital Ocean 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
Through the GitHub API it is possible to retrieve individual files from a Git repository via, e.g. curl
. To do so, first retrieve the content information for the relevant file (or folder):
curl https://api.github.com/repos/{organisation}/{repository}/contents/{file or folder path}
For private repositories, authenticate using your username and a personal access token