- Update ubuntu software repository
- Install
- nginx - Serve our website
- mysql-server and libmysqlclient-dev - For database
- Python 3
- ufw - Firewall for our system
This file contains 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
// @ts-ignore | |
import { default as nacl } from 'tweetnacl-sealedbox-js'; | |
import { webcrypto } from 'crypto'; | |
function decodeUTF8(str: string): Uint8Array { | |
if (typeof str !== "string") | |
throw new TypeError("expected string"); | |
return new Uint8Array(unescape(encodeURIComponent(str)).split("").map(char => char.charCodeAt(0))); | |
} |