1
0
Fork 0

2023-10-31

This commit is contained in:
Gennadiy 2023-12-17 09:37:59 +03:00
parent 0e7f1419da
commit 9a79d6e9af
8 changed files with 24 additions and 29 deletions

View file

@ -20,7 +20,7 @@ intentionally and, secondly, not all of them — are mistakes.
1. [Three-dimensional graphics in JavaScript](https://pomodoro1.mircloud.ru/en/).
2. [Cartesian product, combinatorics](https://pomodoro2.mircloud.ru/en/).
3. [Matrix multiplication and rotations](https://pomodoro3.mircloud.ru/en/).
4. [Philosophy, poetry and humor without translation](https://pomodoro4.mircloud.ru/).
4. [Practical philosophy, poetry and humor](https://pomodoro4.mircloud.ru/) without translation.
5. [Drawing pictures with text](https://pomodoro5.mircloud.ru/en/).
### Design
@ -47,8 +47,8 @@ go as parts of this project. Over time, there are more parts, so automation come
### Build
Previously, a custom Java program was used to generate a site from templates. After generating, the
obfuscation was performed for all classes, variables and functions of HTML, CSS and JS with a dictionary
substitution cipher. Code blocks were left without obfuscation, and syntax highlighting was performed on
obfuscation was performed with a dictionary substitution cipher for all classes, variables and functions
of HTML, CSS and JS. Code blocks were left without obfuscation, and syntax highlighting was performed on
the client. *Obusificator* — is a unique solution, no longer used.
Now the site is generated by Jekyll, the template language is Liquid, syntax highlighting during build

View file

@ -19,7 +19,7 @@
1. [Трёхмерная графика на JavaScript](https://pomodoro1.mircloud.ru).
2. [Декартово произведение, комбинаторика](https://pomodoro2.mircloud.ru).
3. [Умножение матриц и повороты](https://pomodoro3.mircloud.ru).
4. [Философия, поэзия и юмор](https://pomodoro4.mircloud.ru).
4. [Практическая философия, поэзия и юмор](https://pomodoro4.mircloud.ru).
5. [Рисуем картинки текстом](https://pomodoro5.mircloud.ru).
### Оформление
@ -45,9 +45,10 @@
### Сборка
Раньше сборку сайта из шаблонов выполняла кастомная программа на Java. После сборки выполнялась обфускация для
всех классов, переменных и функций HTML, CSS и JS шифром замены по словарю. Блоки кода оставлялись без обфускации,
а подсветка синтаксиса выполнялась на клиенте. *Обусификатор* — уникальное решение, больше не используется.
Раньше сборку сайта из шаблонов выполняла кастомная программа на Java. После сборки выполнялась обфускация
шифром замены по словарю для всех классов, переменных и функций HTML, CSS и JS. Блоки кода оставлялись без
обфускации, а подсветка синтаксиса выполнялась на клиенте. *Обусификатор* — уникальное решение, больше не
используется.
Теперь сборку сайта выполняет Jekyll, язык шаблонов Liquid, подсветка синтаксиса во время
сборки, а содержание страниц в формате Markdown. Управление процессами выполняют скрипты Bash.

View file

@ -22,7 +22,7 @@
- [Поворот матрицы на 180 градусов](https://pomodoro3.mircloud.ru/ru/2021/12/16/matrix-rotation-180-degrees.html) — 16.12.2021.
- [Поворот матрицы на 90 градусов](https://pomodoro3.mircloud.ru/ru/2021/12/12/matrix-rotation-90-degrees.html) — 12.12.2021.
- [Оптимизация умножения матриц](https://pomodoro3.mircloud.ru/ru/2021/12/09/optimizing-matrix-multiplication.html) — 09.12.2021.
4. Философия, поэзия и юмор.
4. Практическая философия, поэзия и юмор.
- [Алгоритм поиска работы мечты](https://pomodoro4.mircloud.ru/ru/2023/12/31/dream-job-searching-algorithm.html) — 31.12.2023.
- [Поэзия начала 20 века](https://pomodoro4.mircloud.ru/ru/2022/01/07/poetry-early-20th-century.html) — 07.01.2022.
- [История про лес, название утеряно](https://pomodoro4.mircloud.ru/ru/2022/01/05/forest-story-title-lost.html) — 05.01.2022.
@ -59,7 +59,7 @@
- [Matrix rotation 180 degrees](https://pomodoro3.mircloud.ru/en/2021/12/17/matrix-rotation-180-degrees.html) — 17.12.2021.
- [Matrix rotation 90 degrees](https://pomodoro3.mircloud.ru/en/2021/12/13/matrix-rotation-90-degrees.html) — 13.12.2021.
- [Optimizing matrix multiplication](https://pomodoro3.mircloud.ru/en/2021/12/10/optimizing-matrix-multiplication.html) — 10.12.2021.
4. Philosophy, poetry and humor without translation.
4. Practical philosophy, poetry and humor without translation.
5. Drawing pictures with text.
- [Directory tree with links](https://pomodoro5.mircloud.ru/en/2023/08/04/directory-tree.html) — 04.08.2023.
- [Password generator](https://pomodoro5.mircloud.ru/en/2023/06/20/password-generator.html) — 20.06.2023.

View file

@ -24,7 +24,7 @@ of the repositories remain with the user. The directory structure for
[hub.mos.ru](https://hub.mos.ru/golovin).
<pre>
<a href='https://hub.mos.ru/golovin/blob/master/DIRECTORY_TREE.md'>.</a>
.
├─ <a href='https://hub.mos.ru/golovin/color-tomato-theme/blob/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
├─ <a href='https://hub.mos.ru/golovin/older-tomato-theme/blob/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
├─ <a href='https://hub.mos.ru/golovin/pomodoro/blob/master/DIRECTORY_TREE.md'>pomodoro</a>

View file

@ -24,7 +24,7 @@
[hub&period;mos&period;ru](https://hub&period;mos&period;ru/golovin).
<pre>
<a href='https://hub.mos.ru/golovin/blob/master/DIRECTORY_TREE.md'>.</a>
.
├─ <a href='https://hub.mos.ru/golovin/color-tomato-theme/blob/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
├─ <a href='https://hub.mos.ru/golovin/older-tomato-theme/blob/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
├─ <a href='https://hub.mos.ru/golovin/pomodoro/blob/master/DIRECTORY_TREE.md'>pomodoro</a>

View file

@ -38,7 +38,7 @@ find . -mindepth 1 -maxdepth 1 -type d | sort -r | while read -r dir; do
elif [[ "$dir" =~ "3" ]]; then
description="Умножение матриц и повороты"
elif [[ "$dir" =~ "4" ]]; then
description="Философия, поэзия и юмор"
description="Практическая философия, поэзия и юмор"
elif [[ "$dir" =~ "5" ]]; then
description="Рисуем картинки текстом"
elif [[ "$dir" =~ "6" ]]; then

View file

@ -4,7 +4,7 @@ fi
if [ -z "$1" ]; then
echo "Создание удалённого репозитория для текущего каталога."
fi
seconds=8
seconds=5
currentTimeMillis=$(date '+%s%3N')
if [ -z "$1" ] || [ "$1" == "delete" ]; then
echo "Удаление старого репозитория."

View file

@ -1,25 +1,19 @@
#!/bin/bash
echo "Параллельное выполнение скриптов и создание репозиториев для каталогов проектов."
## --
# Для всех репозиториев, на одном уровне с текущим, формируем скрипт в одну строчку и
# выполняем эти скрипты в параллельном режиме. Скрипт в одну строчку — это выполнение
# заранее подготовленных других скриптов для локальных и удалённых репозиториев.
# Формируем скрипты несколько раз с разными параметрами и параллельностью: создание
# удалённых репозиториев — 5 потоков, все остальные действия без ограничений.
# --
# Для всех репозиториев на одном уровне с текущим формируем скрипт в одну строчку и выполняем эти скрипты в параллельном режиме.
# Скрипт в одну строчку — это выполнение одного из заранее подготовленных других скриптов для локальных и удалённых репозиториев.
# Формируем и выполняем скрипты в несколько шагов с разными параметрами и по дороге сохраняем отчёты о выполнении.
# Параллельное выполнение скриптов на последующем шаге начинается после завершения всех потоков на предыдущем шаге.
cd .. # выходим из папки в корень репозитория
currentTimeMillis=$(date '+%s%3N')
# удаление репозиториев на сервере
# 1 Удаление репозиториев на сервере
find .. -mindepth 1 -maxdepth 1 -type d -printf \
'cd %h/%f && ./.repo_remote.sh "delete" >.repo_remote.log\0' | xargs -L1 -0 -P0 bash -c
# создание репозиториев на сервере для каталогов с сайтами
find .. -mindepth 1 -maxdepth 1 -type d -regex ".*[1-6]" -printf \
'cd %h/%f && ./.repo_remote.sh "create" >>.repo_remote.log\0' | xargs -L1 -0 -P5 bash -c
# создание репозиториев на сервере для остальных каталогов
find .. -mindepth 1 -maxdepth 1 -type d -regex ".*[^1-6]" -printf \
'cd %h/%f && ./.repo_remote.sh "create" >>.repo_remote.log\0' | xargs -L1 -0 -P5 bash -c
# создание локальных репозиториев и отправка данных на сервер,
# параллельно изменение настроек удалённых репозиториев
# 2 Создание репозиториев на сервере
find .. -mindepth 1 -maxdepth 1 -type d -printf \
'cd %h/%f && ./.repo_remote.sh "create" >>.repo_remote.log\0' | xargs -L1 -0 -P0 bash -c
# 3 Создание локальных репозиториев и отправка данных на сервер
# 4 Изменение настроек репозиториев на сервере, отключение ненужного
find .. -mindepth 1 -maxdepth 1 -type d -printf \
'cd %h/%f && ./.repo_local.sh >.repo_local.log\0
cd %h/%f && ./.repo_remote.sh "options" >>.repo_remote.log\0' | xargs -L1 -0 -P0 bash -c