diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-10-31 10:40:06 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-10-31 10:40:06 +0100 |
| commit | 6ee7245390cdf4e19fef82c2423ba325adea4114 (patch) | |
| tree | 7e59c6084937997a62ccea261dac100dc97100a3 /content | |
| parent | ae24d9a8869c497537839f330384cbadb2cf687c (diff) | |
| download | mitjafelicijan.com-6ee7245390cdf4e19fef82c2423ba325adea4114.tar.gz | |
Updated theme
Diffstat (limited to 'content')
| -rw-r--r-- | content/posts/2020-09-06-esp-and-micropython.md | 7 | ||||
| -rw-r--r-- | content/posts/2021-01-25-goaccess.md | 9 | ||||
| -rw-r--r-- | content/posts/2021-06-26-simple-world-clock.md | 3 |
3 files changed, 9 insertions, 10 deletions
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`. | |||
| 38 | Then check if the device is available under `/dev/` by running `ls | 38 | Then check if the device is available under `/dev/` by running `ls |
| 39 | /dev/ttyUSB*`. | 39 | /dev/ttyUSB*`. |
| 40 | 40 | ||
| 41 | > **Linux users**: if a device is not available be sure you are in `dialout` | 41 | > **Linux users**: if a device is not available be sure you are in `dialout` |
| 42 | > group. You can check this by executing `groups $USER`. You can add a user to | 42 | > group. You can check this by executing `groups $USER`. You can add a user to |
| 43 | > `dialout` group with `sudo adduser $USER dialout`. | 43 | > `dialout` group with `sudo adduser $USER dialout`. |
| 44 | 44 | ||
| @@ -79,7 +79,7 @@ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 e | |||
| 79 | If everything went ok you can try accessing MicroPython REPL with ` screen | 79 | If everything went ok you can try accessing MicroPython REPL with ` screen |
| 80 | /dev/ttyUSB0 115200` or `picocom /dev/ttyUSB0 -b115200`. | 80 | /dev/ttyUSB0 115200` or `picocom /dev/ttyUSB0 -b115200`. |
| 81 | 81 | ||
| 82 | > Sometimes you will need to press `ENTER` in `screen` or `picocom` to access | 82 | > Sometimes you will need to press `ENTER` in `screen` or `picocom` to access |
| 83 | > REPL. | 83 | > REPL. |
| 84 | 84 | ||
| 85 | When you are in REPL you can test if all is working properly following steps. | 85 | When you are in REPL you can test if all is working properly following steps. |
| @@ -121,7 +121,6 @@ sudo pip3 install adafruit-ampy | |||
| 121 | Listed below are some common commands I used. | 121 | Listed below are some common commands I used. |
| 122 | 122 | ||
| 123 | ```bash | 123 | ```bash |
| 124 | |||
| 125 | # uploads file to flash | 124 | # uploads file to flash |
| 126 | ampy --delay 2 --port /dev/ttyUSB0 put boot.py | 125 | ampy --delay 2 --port /dev/ttyUSB0 put boot.py |
| 127 | 126 | ||
| @@ -177,7 +176,7 @@ boards cd cp echo exit filetype ls repl rsync | |||
| 177 | Use Control-D (or the exit command) to exit rshell. | 176 | Use Control-D (or the exit command) to exit rshell. |
| 178 | ``` | 177 | ``` |
| 179 | 178 | ||
| 180 | > Inside a shell `ls` will display list of files on your machine. To get list | 179 | > Inside a shell `ls` will display list of files on your machine. To get list |
| 181 | > of files on flash folder `/pyboard` is remapped inside the shell. To list files | 180 | > of files on flash folder `/pyboard` is remapped inside the shell. To list files |
| 182 | > on flash you must perform `ls /pyboard`. | 181 | > on flash you must perform `ls /pyboard`. |
| 183 | 182 | ||
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. | |||
| 42 | GoAccess can be used in two different modes. | 42 | GoAccess can be used in two different modes. |
| 43 | 43 | ||
| 44 |  | 44 |  |
| 45 | <center><i>Running in a terminal</i></center> | 45 | |
| 46 | *Running in a terminal* | ||
| 46 | 47 | ||
| 47 |  | 48 |  |
| 48 | <center><i>Running in a browser</i></center> | 49 | |
| 50 | *Running in a browser* | ||
| 49 | 51 | ||
| 50 | I, however, need this to run in a browser. So, the second option is the way to | 52 | I, however, need this to run in a browser. So, the second option is the way to |
| 51 | go. The Idea is to periodically run cronjob and export this report into a folder | 53 | go. The Idea is to periodically run cronjob and export this report into a folder |
| @@ -69,7 +71,7 @@ apt update && apt upgrade -y | |||
| 69 | apt install nginx certbot python3-certbot-nginx apache2-utils | 71 | apt install nginx certbot python3-certbot-nginx apache2-utils |
| 70 | ``` | 72 | ``` |
| 71 | 73 | ||
| 72 | After all this is installed we can create a new configuration for a statistics. | 74 | After all this is installed we can create a new configuration for a statistics. |
| 73 | Stats will be available at `stats.domain.com`. | 75 | Stats will be available at `stats.domain.com`. |
| 74 | 76 | ||
| 75 | ```sh | 77 | ```sh |
| @@ -200,4 +202,3 @@ and password. If not, try reopening your browser. | |||
| 200 | 202 | ||
| 201 | That is all. You now have analytics for your server that gets refreshed every 10 | 203 | That is all. You now have analytics for your server that gets refreshed every 10 |
| 202 | minutes. | 204 | minutes. |
| 203 | |||
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 | |||
| 88 | 88 | ||
| 89 | Then we add a cronjob with `crontab -e`. | 89 | Then we add a cronjob with `crontab -e`. |
| 90 | 90 | ||
| 91 | ``` | 91 | ```txt |
| 92 | * * * * * /home/pi/clock.py | 92 | * * * * * /home/pi/clock.py |
| 93 | ``` | 93 | ``` |
| 94 | 94 | ||
| @@ -105,4 +105,3 @@ You can download my [STL file for the enclosure | |||
| 105 | here](/posts/world-clock/enclosure.stl), but make sure that dimensions make | 105 | here](/posts/world-clock/enclosure.stl), but make sure that dimensions make |
| 106 | sense and also opening for USB port should be added or just use a drill and some | 106 | sense and also opening for USB port should be added or just use a drill and some |
| 107 | hot glue to make it stick in the enclosure. | 107 | hot glue to make it stick in the enclosure. |
| 108 | |||
