This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| { | |
| "env": { | |
| "browser": true, | |
| "es2021": true | |
| }, | |
| "extends": [ | |
| "prettier", | |
| "eslint:recommended", | |
| "plugin:react/recommended", | |
| "standard-with-typescript" |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/bin/python3 | |
| import sys | |
| import os | |
| from urllib.request import Request | |
| from urllib.request import urlopen | |
| from urllib.error import URLError | |
| import json | |
| # Complete the function below. | |
| ''' Response: |
| #!/bin/bash | |
| # SSH into a Vagrant VM, forwarding ports in a way that allows node within Vagrant to be debugged by a debugger | |
| # or IDE in the host operating system. Don't know why, but Vagrantfile port forwarding does not work. | |
| # (https://groups.google.com/forum/#!topic/vagrant-up/RzPooJ0dp6Q) | |
| /usr/bin/vagrant ssh-config > $TMPDIR/vagrant-ssh-config | |
| ssh -F $TMPDIR/vagrant-ssh-config -L 5858:127.0.0.1:5858 default | |
| rm $TMPDIR/vagrant-ssh-config |
| #!/usr/bin/python3 | |
| import os | |
| import pygame | |
| from random import choice | |
| class Cell(): | |
| def __init__(self, x, y, w, h=None): |
| import pygame | |
| from random import choice | |
| class Cell(pygame.sprite.Sprite): | |
| w, h = 16, 16 | |
| def __init__(self, x, y, maze): | |
| pygame.sprite.Sprite.__init__(self) |
| sudo apt-get install language-pack-en language-pack-gnome-en | |
| sudo update-locale LANG=en_US.UTF-8 | |
| sudo locale-gen en_US.UTF-8 |
| <html> | |
| <body> | |
| <h2>Privacy Policy</h2> | |
| <p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended | |
| for use as is.</p> | |
| <p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and | |
| disclosure of Personal Information if anyone decided to use [my|our] Service.</p> | |
| <p>If you choose to use [my|our] Service, then you agree to the collection and use of information in | |
| relation with this policy. The Personal Information that [I|we] collect are used for providing and | |
| improving the Service. [I|We] will not use or share your information with anyone except as described |
Trickier than it seems.
Let's assume that you've already created an unprivileged user named myapp. You should never run your Node.js applications as root!
Switch to the myapp user, and do the following:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash (however, this will immediately run the nvm installer - you probably want to just download the install.sh manually, and inspect it before running it)nvm install stable| var app = express(); | |
| app.io = require('socket.io')(); | |
| var routes = require('./routes/index')(app.io); | |
| app.use('/', routes); |