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
:local vpnEndpoint "your-domain.com" | |
# Check WAN Link is bound | |
if ([/ip/dhcp-client/ get ether2-wan status] != "bound") do={ | |
log info "Ether2 wan is not bound, skip update process" | |
/exit | |
} | |
# Find WAN Gateway | |
:local wanGateway [/ip/dhcp-client/ get ether2-wan gateway] |
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
// for disable | |
sudo pmset -a hibernatemode 0 | |
// for re-enable | |
sudo pmset -a hibernatemode 3 |
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
dietpi@rpi-b:~/tensor_js$ time node main.js | |
The predicted class is 286 with probability 12.73. | |
real 1m35.460s | |
user 1m21.866s | |
sys 0m6.460s | |
dietpi@rpi-b:~/tensor_js$ time node main.js | |
============================ | |
Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. |
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
NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release nvm install |
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
version: '3' | |
services: | |
service_name: | |
image: repo/image_tag | |
deploy: | |
cpus: 0.5 | |
mem_limit: 2g |
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 dd if=/dev/sdXY of=/dev/null bs=1M count=1024 | |
sudo hdparm -Tt /dev/sdXY |
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
UUID from `blkid` command | |
``` | |
UUID=501d62de-a465-48e1-bdda-60c2ef81aeeb /mnt/external ext4 defaults,nofail,noatime 0 1 | |
``` | |
# Resource | |
https://windowsbulletin.com/fstab/ | |
https://manpages.debian.org/bullseye/mount/fstab.5.en.html |
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
Accepted connection from 10.10.0.101, port 51666 | |
[ 5] local 10.10.0.100 port 5201 connected to 10.10.0.101 port 51668 | |
[ ID] Interval Transfer Bitrate | |
[ 5] 0.00-1.00 sec 9.29 MBytes 77.9 Mbits/sec | |
[ 5] 1.00-2.00 sec 19.2 MBytes 161 Mbits/sec | |
[ 5] 2.00-3.00 sec 19.8 MBytes 166 Mbits/sec | |
[ 5] 3.00-4.00 sec 18.2 MBytes 152 Mbits/sec | |
[ 5] 4.00-5.00 sec 17.9 MBytes 150 Mbits/sec | |
[ 5] 5.00-6.00 sec 12.4 MBytes 104 Mbits/sec | |
[ 5] 6.00-7.00 sec 16.3 MBytes 137 Mbits/sec |
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
when mount disk on /mnt | |
let get service name from command `sudo systemctl | grep mnt` | |
sudo systemctl edit docker.service | |
``` | |
[Unit] | |
Requires=mnt-external.mount mnt-storage.mount | |
After=mnt-external.mount mnt-storage.mount |
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 | |
/usr/local/bin/gpio mode 4 out | |
# temperature=$(< /sys/class/thermal/thermal_zone0/temp) | |
temperature=$(< /etc/armbianmonitor/datasources/soctemp) | |
echo "temperature=$temperature" | |
if [ $temperature -gt 50000 ] |
NewerOlder