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
"Generate a Js script that creates a button with the text ‘Submit File’ and inserts it into the DOM before an element with the class ‘.flex.flex-col.w-full.py-2.flex-grow.md\:py-3.md\:pl-4’. The button should have a green background color, white text color, 5px padding, no border, 5px border radius and 5px margin. The script should also create a progress element and insert it into the DOM before the same element. The progress element should have a width of 99%, height of 5px and a grey background color. Inside the progress element, there should be another div element representing the progress bar with a width of 0%, height of 100% and blue background color. When the button is clicked, it should create an input element of type ‘file’ that accepts ‘.txt’, ‘.js’, ‘.py’, ‘.html’, ‘.css’, ‘.json’ and ‘.csv’ files. Once a file is selected, using an async it should be read as text and split into chunks of size 15000. using async Each chunk should be submitted into a conversation by doing the following: | |
async funct |
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
sudo apt update | |
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\ | |
sudo apt-get install -y nodejs | |
sudo apt install build-essential git curl | |
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) |
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
sudo setcap 'cap_net_bind_service=+ep' $(eval readlink -f `which node`) |
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
sudo apt update | |
sudo apt install python3 python3-pip apache2 -y | |
pip3 install flask | |
sudo snap install --classic certbot | |
sudo certbot --apache | |
sudo certbot renew |
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
openvpn --config client.ovpn |
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
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: '{AWS_KEY}', | |
secretAccessKey: '{AWS_SECRET}', | |
region: '{SNS_REGION}' | |
}); | |
var sns = new AWS.SNS(); |
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
#run the following command: | |
#sudo visudo | |
#add the following to the bottom of the file | |
#alerttech ALL=(ALL) NOPASSWD:ALL | |
sudo apt install curl -y | |
sudo apt install git -y | |
sudo apt install mosquitto mosquitto-clients -y | |
sudo apt-get install build-essential -y |
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
#you must have comet131 in /home/alerttech/Downloads | |
#run the following command: | |
#sudo visudo | |
#add the following to the bottom of the file | |
#alerttech ALL=(ALL) NOPASSWD:ALL | |
sudo apt install curl -y | |
sudo apt install git -y |
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
sudo apt install curl | |
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo npm install -g --unsafe-perm node-red | |
sudo npm install -g node-red-admin | |
sudo npm install -g pm2 | |
pm2 start /usr/bin/node-red -- -v | |
pm2 save |
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
# update | |
apt-get update && apt-get upgrade -y | |
# set timezone to cst | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# uncomment to enable the firewall and poke holes for ssh and mysql | |
#ufw enable | |
#ufw allow 22 |
NewerOlder