Read the temperature and pressure from the BMP280 sensor, using the bmp280 driver and Micropython plugin for Pycharm:
from machine import I2C
from bmp280 import BMP280
bus = I2C(scl=machine.Pin(5), sda=machine.Pin(4))
bmp = BMP280(bus)
bmp.pressure
>>> 97679.8
bmp.temperature
>>> 21.68
#arduino
Blinking the LED on the esp8266
with my son
import machine
pin = machine.Pin(2, machine.Pin.OUT)
pin.off()
pin.on()
#arduino
Regex for adjusting Jupyter notebook exported to markdown to the markdown rendered as HTML with MathJax
Matrices row separator:
\begin{bmatrix}(.*?) \\ (.*?)\end{bmatrix}
\begin{bmatrix} $1 \\\ $2 \end{bmatrix}
In-line math delimiters:
$(.+?)$[ ,.]
\\( $1 \\)
In-line numbers:
$$([d.]*?)$$
\\( $1 \\)
Images:
![png]((.*?))
<center>
<figure class="figure text-center">
<img width="80%" src="/static/art/002/$1" class="figure-img img-fluid rounded">
<figcaption class="figure-caption text-center"></figcaption>
</figure>
</center>
Monitoring network traffic
netstat -tp
iftop
tcptrack -i eth0
ss -tn -o
watch -n 1 "ss -tn -o"
Commands to monitor network bandwidth on Linux
#linux
Adding the site to Google Index by requesting the indexing trough the Google Search Console.
#seo
Redirect www
to the non-www
domain for better google search.
How To Redirect www to Non-www with Nginx on CentOS 7
#linux #nginx
Mathjax
use: $$
for the separate line equation, ane \(
for the inline equations.
Creating snapshots in kvm.
$ virsh
virsh: snapshot-create-as --domain f20 --name 'f20-spice'
virsh: snapshot-list f20
virsh: snapshot-revert f20 --snapshotname f20-spice
Markdown bibliography and referencing [bib]
Inline [bib]
[bib]: https://v4.chriskrycho.com/2015/academic-markdown-and-citations.html
In the footnote [^bib]
[^bib]: https://v4.chriskrycho.com/2015/academic-markdown-and-citations.html