This file contains 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
#!/bin/bash | |
npm init --yes; | |
npm i express typescript ts-node dotenv; | |
npm i -D typescript @types/express @types/node concurrently nodemon; | |
npm i --save-dev @types/express; | |
tsc --init; | |
mkdir configs controllers middlewares models routes services utils; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
let promise1 = new Promise((resolve, reject) => | |
resolve('Success!'); | |
//reject('error'); | |
); | |
promise1.then(res => | |
alert(result); | |
}, function (err) { | |
alert(err); | |
} |
This file contains 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
sensor: | |
- platform: influxdb | |
host: localhost | |
username: username | |
password: pass | |
queries: | |
- name: 'Salon' | |
unit_of_measurement: °C | |
value_template: '{{ value | round(1) }}' | |
group_function: last |
This file contains 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
mkdir /home/pi/image-cam | |
sudo chgrp motion /home/pi/image-cam | |
chmod g+rwx /home/pi/image-cam |
This file contains 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
daemon on | |
stream_localhost off | |
target_dir /home/pi/image-cam |
This file contains 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
daemon off | |
stream_localhost on | |
target_dir |
This file contains 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 nano /etc/motion/motion.conf |
This file contains 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-get install motion -y |
This file contains 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 modprobe bcm2835-v4l2 |
NewerOlder