Start from Archlinux USB Stick
Load german keyboard layout
$ loadkeys de
Enable Wifi (optional but usefull)
$ wifi-menu
Start from Archlinux USB Stick
Load german keyboard layout
$ loadkeys de
Enable Wifi (optional but usefull)
$ wifi-menu
const express = require('express'); | |
const app = express(); | |
// Serve the static files from the angular build | |
app.use(express.static(`${__dirname}/dist/PROJECT_NAME`)); | |
app.get('/*',(req,res) => { | |
res.sendFile(`${__dirname}/dist/PROJECT_NAME/index.html`); | |
}); |
The Content-Type header is used to specify how the data in the body of a HTTP request or response is formatted.
There are really a lot of possible values. The most common values for HTTP Requests are listed here. For a more completely list see MDN - MIME types
function myCoolPromise() { | |
return new Promise(function (resolve, reject) { | |
//do some async things | |
const data = "this_is_so_async"; | |
//if successfull | |
resolve(data); | |
//if not | |
reject("error"); | |
}); | |
} |
let dummyInput = [ | |
"Was ergibt 28 plus 9?", | |
"Bitte addieren Sie 6 und 38.", | |
"Bitte geben Sie den ersten, vierten und fünften Buchstaben von 'JEWELL' ein.", | |
"Wie viele Buchstaben hat MADRID?", | |
"Bitte subtrahieren Sie 22 von 3.", | |
"Zählen Sie die Buchstaben: THIN", | |
"Bitte ziehen Sie 2 von 9 ab.", | |
"Was ergibt 11 minus 36?" | |
] |
heroku login
Use enviroment variables for ports and urls!
chmod a+rwx path/to/file # Everybody can read, write and execute the file
chmod u+rwx path/to/file # The owner of the file can read, write and execute the file
chmod o-wx path/to/file # All other users can no longer write or execute the file
chmod ug+x path/to/file # The owner and the group can now execute the file
import * as child_process from 'child_process' | |
/** | |
* Executes a shell command and return it as a Promise. | |
*/ | |
export function exec(cmd: string): Promise<string> { | |
return new Promise((resolve, reject) => { | |
child_process.exec(cmd, (error, stdout, stderr) => { | |
if (error) { | |
reject({ error: error, stderr: stderr }); |