From 694a426dc651999863d82e3cc978b7298256548d Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 25 Jun 2023 21:11:33 +0300 Subject: [PATCH] update tables & some fix --- .../posts/2022/crystal/documenting-code.md | 2 +- .../posts/2022/down-trust-software/index.md | 7 ++--- content/posts/2022/pasty-selfhost.md | 2 +- .../posts/2022/wireguard/ui-env-variables.md | 4 +-- .../posts/2023/games/stalker_max_weigth.md | 2 +- content/posts/2023/http/restful-methods.md | 28 +++++++++++-------- content/posts/2023/tmux-shortcuts.md | 2 ++ content/posts/arduino/nano-pinout-diagram.md | 18 ++++++++---- content/posts/life/music.md | 2 +- content/posts/smd/dfplayer-mini.md | 2 ++ themes/papercut/layouts/shortcodes/table.html | 6 ++++ 11 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 themes/papercut/layouts/shortcodes/table.html diff --git a/content/posts/2022/crystal/documenting-code.md b/content/posts/2022/crystal/documenting-code.md index 827498f..d1d2ce0 100644 --- a/content/posts/2022/crystal/documenting-code.md +++ b/content/posts/2022/crystal/documenting-code.md @@ -8,7 +8,7 @@ tags: [crystal, tutorial, development] ## О статье Это мой вольный перевод оригинальной -[статьи](https://crystal-lang.org/reference/1.6/syntax_and_semantics/documenting_code.html) +[статьи](https://crystal-lang.org/reference/1.8/syntax_and_semantics/documenting_code.html) из документации по **Crystal**. > Если есть желание внести правки, пожалуйста пишите. diff --git a/content/posts/2022/down-trust-software/index.md b/content/posts/2022/down-trust-software/index.md index ee3facd..699e75d 100644 --- a/content/posts/2022/down-trust-software/index.md +++ b/content/posts/2022/down-trust-software/index.md @@ -42,7 +42,7 @@ Windows Defender - спасибо, что ты есть! ### imgur, imageshack, freepic Перекрасили логотипы, вставили флаги, etc. Те ещё помойки. Что-бы посмотреть изображение, нужно скачать тонны JS. -В общём ещё один повод. Спасибо за сорудничество! +В общем ещё один повод. Спасибо за сорудничество! ### Vim Перекрасил логотип @@ -50,7 +50,7 @@ Windows Defender - спасибо, что ты есть! ### Pastebin.com Перекрасили логотип -### Downlod Master +### Download Master При заходе с Российского IP HTTP 403 ### Bash.org.ru / Bash.im @@ -63,9 +63,6 @@ Windows Defender - спасибо, что ты есть! ### Rust И так не использовал, но на всякий случай, чтобы не [забыть](https://blog.rust-lang.org/2022/02/24/Rust-1.59.0.html). -### Qt -Закрыли всё - ### Grammarly > Grammarly stands with our friends, colleagues, and family in Ukraine, and with all people of Ukraine. diff --git a/content/posts/2022/pasty-selfhost.md b/content/posts/2022/pasty-selfhost.md index 5bc33b8..ce15d25 100644 --- a/content/posts/2022/pasty-selfhost.md +++ b/content/posts/2022/pasty-selfhost.md @@ -181,5 +181,5 @@ setTimeout(() => location.replace(location.protocol + "//" + location.host + "/p ## Мой инстанс -Мой pasty доступен по адресу +Мой pasty доступен по адресу `TODO: add links` diff --git a/content/posts/2022/wireguard/ui-env-variables.md b/content/posts/2022/wireguard/ui-env-variables.md index d817862..bd2e88b 100644 --- a/content/posts/2022/wireguard/ui-env-variables.md +++ b/content/posts/2022/wireguard/ui-env-variables.md @@ -24,7 +24,7 @@ Web–интерфейс для управления WireGuard сервером. ```json { - "username": "admin", - "password": "admin" + "username": "admin", + "password": "admin" } ``` diff --git a/content/posts/2023/games/stalker_max_weigth.md b/content/posts/2023/games/stalker_max_weigth.md index f9ba1b9..a56c53a 100644 --- a/content/posts/2023/games/stalker_max_weigth.md +++ b/content/posts/2023/games/stalker_max_weigth.md @@ -1,5 +1,5 @@ --- -title: "🎒 Увеличиваю переносимый вес в S.T.A.L.K.E.R." +title: "🎒 Увеличиваем переносимый вес в S.T.A.L.K.E.R." date: 2023-01-09T01:43:01+03:00 draft: false tags: [games, tips] diff --git a/content/posts/2023/http/restful-methods.md b/content/posts/2023/http/restful-methods.md index f95bcbe..9bc513f 100644 --- a/content/posts/2023/http/restful-methods.md +++ b/content/posts/2023/http/restful-methods.md @@ -17,13 +17,15 @@ tags: [http, tips] Методы HTTP спроектированы для воздействия на ресурс стандартным способом: +{{< table "table table-sm table-striped table-hover" >}} | Метод HTTP | Действие | Пример | -|------------|----------|--------| -| GET | Получить информацию о ресурсе | example.com/api/orders (получить список заказов) | -| GET | Получить информацию о ресурсе | example.com/api/orders/123 (получить заказ #123) | -| POST | Создать новый ресурс | example.com/api/orders (создать новый заказ из данных переданных с запросом) | -| PUT | Обновить ресурс | example.com/api/orders/123 (обновить заказ #123 данными переданными с запросом) | -| DELETE| Удалить ресурс |example.com/api/orders/123 (удалить заказ #123) | +|:----------:|:---------|:-------| +| GET | Получить информацию о ресурсе | `example.com/api/orders` (получить список заказов) | +| GET | Получить информацию о ресурсе | `example.com/api/orders/123` (получить заказ #123) | +| POST | Создать новый ресурс | `example.com/api/orders` (создать новый заказ из данных переданных с запросом) | +| PUT | Обновить ресурс | `example.com/api/orders/123` (обновить заказ #123 данными переданными с запросом) | +| DELETE | Удалить ресурс | `example.com/api/orders/123` (удалить заказ #123) | +{{}} Дизайн REST не дает рекомендаций каким конкретно должен быть формат данных передаваемых с запросами. @@ -60,13 +62,15 @@ http://[hostname]/todo/api/v1.0/ Для доступа к ресурсам будем использовать следующие методы HTTP: +{{< table "table table-sm table-striped table-hover" >}} | Метод HTTP | URI | Действие | -|------------|-----|----------| -| GET | http://[hostname]/todo/api/v1.0/tasks | Получить список задач | -| GET | http://[hostname]/todo/api/v1.0/tasks/[task_id] | Получить задачу | -| POST | http://[hostname]/todo/api/v1.0/tasks | Создать новую задачу | -| PUT | http://[hostname]/todo/api/v1.0/tasks/[task_id] | Обновить существующую задачу | -| DELETE | http://[hostname]/todo/api/v1.0/tasks/[task_id] | Удалить задачу | +|:----------:|-----|----------| +| GET | `http://[hostname]/todo/api/v1.0/tasks` | Получить список задач | +| GET | `http://[hostname]/todo/api/v1.0/tasks/[task_id]` | Получить задачу | +| POST | `http://[hostname]/todo/api/v1.0/tasks` | Создать новую задачу | +| PUT | `http://[hostname]/todo/api/v1.0/tasks/[task_id]` | Обновить существующую задачу | +| DELETE | `http://[hostname]/todo/api/v1.0/tasks/[task_id]` | Удалить задачу | +{{}} ## Используемые ресурсы diff --git a/content/posts/2023/tmux-shortcuts.md b/content/posts/2023/tmux-shortcuts.md index ba0321f..b64e987 100644 --- a/content/posts/2023/tmux-shortcuts.md +++ b/content/posts/2023/tmux-shortcuts.md @@ -48,3 +48,5 @@ Ctrl + b $ ```text Ctrl + b d ``` + +`TODO: сделать из этого таблицу` diff --git a/content/posts/arduino/nano-pinout-diagram.md b/content/posts/arduino/nano-pinout-diagram.md index ccce1c4..b26ff50 100644 --- a/content/posts/arduino/nano-pinout-diagram.md +++ b/content/posts/arduino/nano-pinout-diagram.md @@ -1,7 +1,7 @@ --- -title: "Диаграмма выводов Ardunino Nano" -date: 2023-06-19T22:05:27+03:00 -draft: true +title: "🔌 Диаграмма выводов Ardunino Nano" +date: 2023-06-25T20:53:27+03:00 +draft: false tags: [arduino, tips, hardware] --- @@ -20,7 +20,8 @@ tags: [arduino, tips, hardware] ## Цифровые пины -| Pin Name | Description | Secondary Function | Description | +{{< table "table table-sm table-striped table-hover" >}} +| Имя ПИНА | Описание | Вторичная функция | Описание | |----------|----------------|--------------------|------------------------------| | D0 | Digital Pin 0 | RX | Receive pin for Serial UART | | D1 | Digital Pin 1 | TX | Transmit pin for Serial UART | @@ -36,10 +37,12 @@ tags: [arduino, tips, hardware] | D11 | Digital Pin 11 | MOSI | SPI Master Out-Slave In | | D12 | Digital Pin 12 | MISO | SPI Master In-Slave Out | | D13 | Digital Pin 13 | SCK | SPI Clock | +{{}} ## Аналоговые пины -| Pin Name | Description | Secondary Function | Description | +{{< table "table table-sm table-striped table-hover" >}} +| Имя ПИНА | Описание | Вторичная функция | Описание | |----------|--------------|--------------------|-------------| | A0 | Analog Pin 0 | | | | A1 | Analog Pin 1 | | | @@ -49,10 +52,12 @@ tags: [arduino, tips, hardware] | A5 | Analog Pin 5 | SCLI2C | Clock | | A6 | Analog Pin 6 | SCL | | | A7 | Analog Pin 7 | SCL | | +{{}} ## Пины питания -| Pin Name | Description | +{{< table "table table-sm table-striped table-hover" >}} +| Имя пина | Описание | |----------|----------------------------------------------------------------------------------------------------| | 5V | 5V (Regulated) Source | | 3.3V | 3.3V Source | @@ -61,3 +66,4 @@ tags: [arduino, tips, hardware] | Vin | DC Jack Input Voltage | | IOREF | I/O Reference Voltage. This pin is connected to 5V for the UNO | | AREF | ADC Reference Voltage. Insert other voltage (0-5V only) to use as reference for analog conversions | +{{}} diff --git a/content/posts/life/music.md b/content/posts/life/music.md index f7ffd9f..f72c2d9 100644 --- a/content/posts/life/music.md +++ b/content/posts/life/music.md @@ -5,7 +5,7 @@ draft: true tags: [music] --- -Моё сердечко пренадлежит: +Моё сердечко пренадлежит: Adept Metallica Ill Nino diff --git a/content/posts/smd/dfplayer-mini.md b/content/posts/smd/dfplayer-mini.md index 3f2343b..d78721e 100644 --- a/content/posts/smd/dfplayer-mini.md +++ b/content/posts/smd/dfplayer-mini.md @@ -51,6 +51,7 @@ DFPlayer Mini — это миниатюрный MP3 проигрыватель ![](/content/images/smd/dfplayer_mini_pinout_back-scaled.jpg) +{{< table "table table-sm table-striped table-hover" >}} | Пин | Описание | Примечание | |--------|--------------------|---------------------------------------------------------------------------------------| | VCC | Входное напряжение | DC3.2~5.0В; DC4.2В | @@ -69,6 +70,7 @@ DFPlayer Mini — это миниатюрный MP3 проигрыватель | USB+ | USB+ DP | Порт USB | | USB- | USB- DM | Порт USB | | BUSY | Статус | Low — включено, High — выключено | +{{}} ## Рабочие режимы diff --git a/themes/papercut/layouts/shortcodes/table.html b/themes/papercut/layouts/shortcodes/table.html new file mode 100644 index 0000000..c1dab56 --- /dev/null +++ b/themes/papercut/layouts/shortcodes/table.html @@ -0,0 +1,6 @@ +{{ $htmlTable := .Inner | markdownify }} +{{ $class := .Get 0 }} +{{ $old := "" }} +{{ $new := printf "
" $class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }}