Skip to content

Instantly share code, notes, and snippets.

View dresende's full-sized avatar
🇺🇦
Free Ukraine

Diogo Resende dresende

🇺🇦
Free Ukraine
View GitHub Profile
From https://synocommunity.com add http://packages.synocommunity.com to your NAS package sources.
For that, go to NAS->Package Cnter->Click Settings->Package Sources tab.
Then from the community, you can see Mosquitto. Install it.
After installing, please stop the Mosquitto service before updating configuration. You can start service after changes.
Enable Admin login for Synology
Enable SSH in NAS
Download putty and connect to NAS Server
Login using admin
Change to root user [sudo -i, {use admin password}]
Find mosquitto.conf file [find / -name mosquitto.conf]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Readline

To use this module, do require('readline').

rl.createInterface(input, output, completer)

Takes two streams and creates a readline interface. The completer function is used for autocompletion. When given a substring, it returns [substr, completedStr]. TODO: write some code to make sure I'm right.

createInterface is commonly used with process.stdin and process.stdout in order to accept user input: