This file contains hidden or 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
iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 27017 -j DROP | |
iptables -I INPUT -p tcp -s 127.0.0.1 --dport 27017 -j ACCEPT | |
iptables -I INPUT -p tcp -s <IP GOES HERE> --dport 27017 -j ACCEPT | |
iptables-save > /etc/iptables.conf # Save this changes to file | |
touch /etc/network/if-up.d/iptables # Create file to call conf from | |
echo "iptables-restore < /etc/iptables.conf" >> /etc/network/if-up.d/iptables # Add this line to this file | |
chmod +x /etc/network/if-up.d/iptables # Make the script executable |
This file contains hidden or 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
const brain = require('brain.js'); | |
let trainedNet; | |
function encode(arg) { | |
return arg.split('').map(x => (x.charCodeAt(0) / 255)); | |
} | |
function processTrainingData(data) { | |
return data.map(d => { |