From 6ee7245390cdf4e19fef82c2423ba325adea4114 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Tue, 31 Oct 2023 10:40:06 +0100 Subject: Updated theme --- content/posts/2020-09-06-esp-and-micropython.md | 7 +++---- content/posts/2021-01-25-goaccess.md | 9 +++++---- content/posts/2021-06-26-simple-world-clock.md | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'content/posts') diff --git a/content/posts/2020-09-06-esp-and-micropython.md b/content/posts/2020-09-06-esp-and-micropython.md index 4591811..fb7e150 100644 --- a/content/posts/2020-09-06-esp-and-micropython.md +++ b/content/posts/2020-09-06-esp-and-micropython.md @@ -38,7 +38,7 @@ executing `dmesg | grep ch341-uart`. Then check if the device is available under `/dev/` by running `ls /dev/ttyUSB*`. -> **Linux users**: if a device is not available be sure you are in `dialout` +> **Linux users**: if a device is not available be sure you are in `dialout` > group. You can check this by executing `groups $USER`. You can add a user to > `dialout` group with `sudo adduser $USER dialout`. @@ -79,7 +79,7 @@ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 e If everything went ok you can try accessing MicroPython REPL with ` screen /dev/ttyUSB0 115200` or `picocom /dev/ttyUSB0 -b115200`. -> Sometimes you will need to press `ENTER` in `screen` or `picocom` to access +> Sometimes you will need to press `ENTER` in `screen` or `picocom` to access > REPL. When you are in REPL you can test if all is working properly following steps. @@ -121,7 +121,6 @@ sudo pip3 install adafruit-ampy Listed below are some common commands I used. ```bash - # uploads file to flash ampy --delay 2 --port /dev/ttyUSB0 put boot.py @@ -177,7 +176,7 @@ boards cd cp echo exit filetype ls repl rsync Use Control-D (or the exit command) to exit rshell. ``` -> Inside a shell `ls` will display list of files on your machine. To get list +> Inside a shell `ls` will display list of files on your machine. To get list > of files on flash folder `/pyboard` is remapped inside the shell. To list files > on flash you must perform `ls /pyboard`. diff --git a/content/posts/2021-01-25-goaccess.md b/content/posts/2021-01-25-goaccess.md index 06c3999..84ea3cd 100644 --- a/content/posts/2021-01-25-goaccess.md +++ b/content/posts/2021-01-25-goaccess.md @@ -42,10 +42,12 @@ all the functionalities I need, and it's a single binary. Written in Go. GoAccess can be used in two different modes. ![GoAccess Terminal](/posts/goaccess/goaccess-dash-term.png) -
Running in a terminal
+ +*Running in a terminal* ![GoAccess HTML](/posts/goaccess/goaccess-dash-html.png) -
Running in a browser
+ +*Running in a browser* I, however, need this to run in a browser. So, the second option is the way to go. The Idea is to periodically run cronjob and export this report into a folder @@ -69,7 +71,7 @@ apt update && apt upgrade -y apt install nginx certbot python3-certbot-nginx apache2-utils ``` -After all this is installed we can create a new configuration for a statistics. +After all this is installed we can create a new configuration for a statistics. Stats will be available at `stats.domain.com`. ```sh @@ -200,4 +202,3 @@ and password. If not, try reopening your browser. That is all. You now have analytics for your server that gets refreshed every 10 minutes. - diff --git a/content/posts/2021-06-26-simple-world-clock.md b/content/posts/2021-06-26-simple-world-clock.md index 197c897..ef2f12c 100644 --- a/content/posts/2021-06-26-simple-world-clock.md +++ b/content/posts/2021-06-26-simple-world-clock.md @@ -88,7 +88,7 @@ Before we add this job to cron we need to make `clock.py` executable with `chmod Then we add a cronjob with `crontab -e`. -``` +```txt * * * * * /home/pi/clock.py ``` @@ -105,4 +105,3 @@ You can download my [STL file for the enclosure here](/posts/world-clock/enclosure.stl), but make sure that dimensions make sense and also opening for USB port should be added or just use a drill and some hot glue to make it stick in the enclosure. - -- cgit v1.2.3