From cdac09052aace63a22afda02b7a8b5099ddfe1f8 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Sun, 23 Jul 2023 15:55:12 +0300 Subject: [PATCH] Fix code highlighting --- config.yaml | 6 +- .../bash-arrays-and-hashmaps.md | 16 ++-- .../how-to-create-lvm-logical-volume.md | 12 +-- .../how-to-extend-lvm-volume-on-linux.md | 10 +-- .../linux-how-to-limit-var-log-size.md | 4 +- .../linux-monitoring-with-telegram-alerts.md | 2 +- .../how-to-easily-write-linux-cli-tool.md | 8 +- ...iple-web-pages-in-parallel-using-python.md | 2 +- .../ubuntu-how-to-upgrade-kernel.md | 2 +- .../bash-arrays-and-hashmaps.md | 16 ++-- .../how-to-create-lvm-logical-volume.md | 12 +-- .../how-to-extend-lvm-volume-on-linux.md | 10 +-- .../linux-how-to-limit-var-log-size.md | 4 +- .../linux-monitoring-with-telegram-alerts.md | 2 +- .../how-to-easily-write-linux-cli-tool.md | 8 +- ...iple-web-pages-in-parallel-using-python.md | 2 +- .../ubuntu-how-to-upgrade-kernel.md | 2 +- static/css/custom.css | 84 +++++++++++++++++++ themes/ds | 2 +- 19 files changed, 146 insertions(+), 58 deletions(-) create mode 100644 static/css/custom.css diff --git a/config.yaml b/config.yaml index 16490da..07c9ea7 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -baseURL: https://digitalstudium.com +base_url: https://digitalstudium.com theme: ds languages: @@ -21,3 +21,7 @@ languages: schema: type: TechArticle copyright: http://creativecommons.org/licenses/by/4.0/ + +includes: ['copy.js'] + +custom_css: custom.css diff --git a/content/en/bash-lifehacks/bash-arrays-and-hashmaps.md b/content/en/bash-lifehacks/bash-arrays-and-hashmaps.md index 980c058..0299a34 100644 --- a/content/en/bash-lifehacks/bash-arrays-and-hashmaps.md +++ b/content/en/bash-lifehacks/bash-arrays-and-hashmaps.md @@ -10,19 +10,19 @@ Sometimes there is a need to use in BASH such structures as lists (also known as Array creation in bash can be done this way: -```shell +```bash sample_array=(foo bar bazz) ``` In order to add single or multiple new elements to the end of array, you should use this syntax: -```shell +```bash sample_array+=(six seven) ``` In order to get elements of the list in a cycle, you should use this syntax: -```shell +```bash for i in ${sample_array[@]} do echo $i @@ -31,7 +31,7 @@ done Here is an example how to get element by its index: -```shell +```bash echo ${sample_array[0]} echo ${sample_array[3]} @@ -40,7 +40,7 @@ echo ${sample_array[3]} Array slicing: -```shell +```bash sliced_array=${sample_array[@]:1} # will get all elements of a sample_array, starting with 1st another_sliced_array=${sample_array[@]:1:5} # will get sample_array elements since 1st to 5th ``` @@ -48,19 +48,19 @@ another_sliced_array=${sample_array[@]:1:5} # will get sample_array elements sin ## 2. Hashmaps To create hashmap in bash use this syntax: -```shell +```bash declare -A sample_hashmap=([one]=one [two]=two [three]=three [four]=four [five]=five) ``` This will add new key "foo" with value "bar": -```shell +```bash sample_hashmap[foo]=bar ``` Cycle: -```shell +```bash for key in ${sample_hashmap[@]} do echo ${sample_hashmap[$key]} diff --git a/content/en/linux-lifehacks/how-to-create-lvm-logical-volume.md b/content/en/linux-lifehacks/how-to-create-lvm-logical-volume.md index 3776117..4019393 100644 --- a/content/en/linux-lifehacks/how-to-create-lvm-logical-volume.md +++ b/content/en/linux-lifehacks/how-to-create-lvm-logical-volume.md @@ -14,7 +14,7 @@ sudo fdisk -l ``` to make sure the drive is recognized by the operating system, and to identify the drive name. Output of command will be something like this: -```plaintext +``` Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes/512 bytes @@ -26,7 +26,7 @@ physical volume using the command: sudo pvcreate /dev/vdb ``` You will see output like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo pvcreate /dev/vdb Physical volume "/dev/vdb" successfully created. kostya@ubuntu-21-04:~$ @@ -41,7 +41,7 @@ In our case, the command will look like this: sudo vgcreate vg-example /dev/vdb ``` The command output will look like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo vgcreate vg-example/dev/vdb Volume group "vg-example" successfully created kostya@ubuntu-21-04:~$ @@ -56,7 +56,7 @@ In our case, it will be: sudo lvcreate --size 5G --name lv-example vg-example ``` You will see output like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo lvcreate --size 5G --name lv-example vg-example Logical volume "lv-example" created. kostya@ubuntu-21-04:~$ @@ -71,7 +71,7 @@ To create an xfs filesystem, type the command: sudo mkfs.xfs /dev/vg-example/lv-example ``` The command output will look like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo mkfs.xfs/dev/vg-example/lv-example meta-data =/dev/vg-example/lv-example isize = 512 agcount = 4, agsize = 327680 blks = sectsz = 512 attr = 2, projid32bit = 1 @@ -102,7 +102,7 @@ You can verify that the logical volume has been mounted successfully using the c df -h /opt ``` The output should be like this: -```plaintext +``` kostya@ubuntu-21-04:~$ df -h /opt/ Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg--random-lv--random 5.0G 68M 5.0G 2% /opt diff --git a/content/en/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md b/content/en/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md index af3668a..8ac60d2 100644 --- a/content/en/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md +++ b/content/en/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md @@ -17,7 +17,7 @@ sudo fdisk -l This is to make sure the drive is recognized by the operating system, and to identify the drive name. Output of the command will be something like this: -```plaintext +``` Disk /dev/vdc: 5 GiB, 5368709120 bytes, 10485760 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes/512 bytes @@ -32,7 +32,7 @@ sudo pvcreate /dev/vdc You will see output like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo pvcreate /dev/vdc Physical volume "/dev/vdc" successfully created. kostya@ubuntu-21-04:~$ @@ -42,7 +42,7 @@ You will see output like this: To get a list of available volume groups run this command: -```shell +```bash vgdisplay ``` @@ -60,7 +60,7 @@ sudo vgextend vg-example /dev/vdc You will see output like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo vgextend vg-example /dev/vdc Physical volume "/dev/vdc" successfully created. Volume group "vg-example" successfully extended @@ -83,7 +83,7 @@ sudo lvextend --size +2G vg-example/lv-example You will see output like this: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo lvextend --size +2G vg-example/lv-example Size of logical volume vg-example/lv-example changed from 5.00 GiB (1280 extents) to 7.00 GiB (1792 extents). Logical volume vg-example/lv-example successfully resized. diff --git a/content/en/linux-lifehacks/linux-how-to-limit-var-log-size.md b/content/en/linux-lifehacks/linux-how-to-limit-var-log-size.md index 3b913c4..4dd3d3d 100644 --- a/content/en/linux-lifehacks/linux-how-to-limit-var-log-size.md +++ b/content/en/linux-lifehacks/linux-how-to-limit-var-log-size.md @@ -21,7 +21,7 @@ Logrotate rotates almost all log files in the `/var/log` folder every day. For e ```bash ls /var/log/kern* ``` -```plaintext +``` /var/log/kern.log /var/log/kern.log.2.gz /var/log/kern.log.4.gz /var/log/kern.log.1 /var/log/kern.log.3.gz ``` @@ -30,7 +30,7 @@ To limit the number of log files, edit the file `/etc/logrotate.d/rsyslog`. Look ```bash cat /etc/logrotate.d/rsyslog ``` -```plaintext +``` /var/log/syslog /var/log/mail.info /var/log/mail.warn diff --git a/content/en/linux-lifehacks/linux-monitoring-with-telegram-alerts.md b/content/en/linux-lifehacks/linux-monitoring-with-telegram-alerts.md index f04d432..de2337a 100644 --- a/content/en/linux-lifehacks/linux-monitoring-with-telegram-alerts.md +++ b/content/en/linux-lifehacks/linux-monitoring-with-telegram-alerts.md @@ -57,7 +57,7 @@ docker ps ``` The command output should contain 5 containers: prometheus, grafana, alertmanager, node-exporter, grafana. -```plaintext +``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 46fba26e7234 gcr.io/cadvisor/cadvisor:v0.47.0 "/usr/bin/cadvisor -…" 5 days ago Up 5 days (healthy) 8080/tcp monitoring_cadvisor.1.q02qcn798dh0rydo1dzslylse f212e3c66786 prom/alertmanager:v0.25.0 "/bin/alertmanager -…" 6 days ago Up 6 days 9093/tcp monitoring_alertmanager.1.oysziztrqnur7xr0hr82avunz diff --git a/content/en/python-lifehacks/how-to-easily-write-linux-cli-tool.md b/content/en/python-lifehacks/how-to-easily-write-linux-cli-tool.md index 10a0fd0..caaac0a 100644 --- a/content/en/python-lifehacks/how-to-easily-write-linux-cli-tool.md +++ b/content/en/python-lifehacks/how-to-easily-write-linux-cli-tool.md @@ -47,7 +47,7 @@ my-cli-tool kernel ``` You will see output like this: -```plaintext +``` ❯ my-cli-tool kernel Kernel version: 6.2.2-060202-generic ``` @@ -58,7 +58,7 @@ This will automatically generate a help page, which can be called using the `--h my-cli-tool --help ``` You will get this output: -```plaintext +``` NAME my-cli-tool - A CLI tool for getting system information about Linux server @@ -104,7 +104,7 @@ Now we can type the following command: my-cli-tool kernel --format short ``` Output: -```plaintext +``` 6.2.2 ``` This will also automatically update the help page, adding the `--format` flag and its possible values: @@ -112,7 +112,7 @@ This will also automatically update the help page, adding the `--format` flag an my-cli-tool kernel --help ``` Output: -```plaintext +``` NAME my-cli-tool kernel - A method for getting kernel version diff --git a/content/en/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md b/content/en/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md index f097422..4103138 100644 --- a/content/en/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md +++ b/content/en/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md @@ -47,7 +47,7 @@ Now you can run main.py file with the command: python3 main.py ``` You will see this output: -```plaintext +``` 200 { "args": { diff --git a/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md b/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md index 0634b84..9cca3ba 100644 --- a/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md +++ b/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt -y upgrade The `sudo apt update` command will update the repository cache, and the `sudo apt -y upgrade` command will install new versions of all installed programs, including the linux kernel. The advantage of this method is that the latest version of the linux kernel, officially supported by Ubuntu OS, will be installed. The disadvantage of this method is that the officially supported kernel is usually not the newest. Sometimes it happens that it is necessary to install the latest version of the linux kernel. Real world example: your new laptop may have a CPU which is only supported in linux kernel version 5.12, while the officially supported version is older. And here the second method comes to the rescue. ### Second method The first step is to go to https://kernel.ubuntu.com/~kernel-ppa/mainline/. On this site, you need to select the folder with the latest version of the linux kernel (at the very bottom of the page). Note that it is recommended to select the version without the "rc" suffix. The "rc" suffix means "release candidate", which in turn means that the given kernel version is not stable. On the page that opens, select the folder with the architecture of your processor. The architecture can be found using the `uname -p` command. If the output of this command is "x86_64", then select the amd64 folder. On the opened page there will be links to .deb files. We need to download 4 of them: -```plaintext +``` linux-headers-{version}-generic_{version}.{date}_amd64.deb linux-headers-{version}_{version}.{date}_all.deb linux-image-unsigned-{version}-generic_{version}.{date}_amd64.deb diff --git a/content/ru/bash-lifehacks/bash-arrays-and-hashmaps.md b/content/ru/bash-lifehacks/bash-arrays-and-hashmaps.md index 80f7590..0edb91c 100644 --- a/content/ru/bash-lifehacks/bash-arrays-and-hashmaps.md +++ b/content/ru/bash-lifehacks/bash-arrays-and-hashmaps.md @@ -10,19 +10,19 @@ date: 2023-05-07T13:35:26.956Z создание массива в bash делается просто: -```shell +```bash sample_array=(foo bar bazz) ``` Чтобы добавить один или несколько новых элементов в конец массива, нужно использовать такой синтаксис: -```shell +```bash sample_array+=(six seven) ``` Чтобы пройти по массиву циклом, нужно использовать такой синтаксис: -```shell +```bash for i in ${sample_array[@]} do echo $i @@ -31,7 +31,7 @@ done Чтобы получить элемент по индексу, используется такая конструкция: -```shell +```bash echo ${sample_array[0]} echo ${sample_array[3]} @@ -40,7 +40,7 @@ echo ${sample_array[3]} Чтобы обрезать массив, используется такая конструкция: -```shell +```bash sliced_array=${sample_array[@]:1} # выведет все элементы sample_array, начиная с 1-го another_sliced_array=${sample_array[@]:1:5} # выведет элементы sample_array с 1-го по 5-й ``` @@ -49,19 +49,19 @@ another_sliced_array=${sample_array[@]:1:5} # выведет элементы sa создание ассоциативного массива в bash делается так: -```shell +```bash declare -A sample_hashmap=([one]=one [two]=two [three]=three [four]=four [five]=five) ``` Добавление новых элементов: -```shell +```bash sample_hashmap[foo]=bar ``` Обход в цикле: -```shell +```bash for key in ${sample_hashmap[@]} do echo ${sample_hashmap[$key]} diff --git a/content/ru/linux-lifehacks/how-to-create-lvm-logical-volume.md b/content/ru/linux-lifehacks/how-to-create-lvm-logical-volume.md index f9f09f5..e186116 100644 --- a/content/ru/linux-lifehacks/how-to-create-lvm-logical-volume.md +++ b/content/ru/linux-lifehacks/how-to-create-lvm-logical-volume.md @@ -14,7 +14,7 @@ sudo fdisk -l ``` чтобы убедиться, что диск распознан операционной системой, а также чтобы идентифицировать имя диска. Вывод команды будет примерно такой: -```plaintext +``` Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes @@ -26,7 +26,7 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes sudo pvcreate /dev/vdb ``` Вы увидите такой вывод: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo pvcreate /dev/vdb Physical volume "/dev/vdb" successfully created. kostya@ubuntu-21-04:~$ @@ -41,7 +41,7 @@ sudo vgcreate {vgname} {pvname} sudo vgcreate vg-example /dev/vdb ``` Вывод команды будет такой: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo vgcreate vg-example /dev/vdb Volume group "vg-example" successfully created kostya@ubuntu-21-04:~$ @@ -56,7 +56,7 @@ sudo lvcreate --size {size} --name {lv-name} {vg-name} sudo lvcreate --size 5G --name lv-example vg-example ``` Вы увидите такой вывод: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo lvcreate --size 5G --name lv-example vg-example Logical volume "lv-example" created. kostya@ubuntu-21-04:~$ @@ -71,7 +71,7 @@ sudo lvcreate --extents 100%FREE --name lv-example vg-example sudo mkfs.xfs /dev/vg-example/lv-example ``` Вывод команды будет такой: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo mkfs.xfs /dev/vg-example/lv-example meta-data=/dev/vg-example/lv-example isize=512 agcount=4, agsize=327680 blks = sectsz=512 attr=2, projid32bit=1 @@ -102,7 +102,7 @@ sudo mount -a df -h /opt ``` Вывод должен быть такой: -```plaintext +``` kostya@ubuntu-21-04:~$ df -h /opt/ Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg--random-lv--random 5.0G 68M 5.0G 2% /opt diff --git a/content/ru/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md b/content/ru/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md index e95dc37..96d17f9 100644 --- a/content/ru/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md +++ b/content/ru/linux-lifehacks/how-to-extend-lvm-volume-on-linux.md @@ -17,7 +17,7 @@ sudo fdisk -l Это нужно, чтобы убедиться, что диск распознан операционной системой, а также чтобы идентифицировать имя диска. Вывод команды будет примерно такой: -```plaintext +``` Disk /dev/vdc: 5 GiB, 5368709120 bytes, 10485760 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes @@ -32,7 +32,7 @@ sudo pvcreate /dev/vdc Вы увидите такой вывод: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo pvcreate /dev/vdc Physical volume "/dev/vdc" successfully created. kostya@ubuntu-21-04:~$ @@ -42,7 +42,7 @@ kostya@ubuntu-21-04:~$ Чтобы увидеть список доступных групп томов, воспользуйтесь командой: -```shell +```bash vgdisplay ``` @@ -60,7 +60,7 @@ sudo vgextend vg-example /dev/vdc Вы увидите такой вывод: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo vgextend vg-example /dev/vdc Physical volume "/dev/vdc" successfully created. Volume group "vg-example" successfully extended @@ -83,7 +83,7 @@ sudo lvextend --size +2G vg-example/lv-example Вы увидите такой вывод: -```plaintext +``` kostya@ubuntu-21-04:~$ sudo lvextend --size +2G vg-example/lv-example Size of logical volume vg-example/lv-example changed from 5.00 GiB (1280 extents) to 7.00 GiB (1792 extents). Logical volume vg-example/lv-example successfully resized. diff --git a/content/ru/linux-lifehacks/linux-how-to-limit-var-log-size.md b/content/ru/linux-lifehacks/linux-how-to-limit-var-log-size.md index 3f090af..85fb048 100644 --- a/content/ru/linux-lifehacks/linux-how-to-limit-var-log-size.md +++ b/content/ru/linux-lifehacks/linux-how-to-limit-var-log-size.md @@ -18,7 +18,7 @@ Logrotate каждый день совершает ротацию почти в ```bash ls /var/log/kern* ``` -```plaintext +``` /var/log/kern.log /var/log/kern.log.2.gz /var/log/kern.log.4.gz /var/log/kern.log.1 /var/log/kern.log.3.gz ``` @@ -26,7 +26,7 @@ ls /var/log/kern* ```bash cat /etc/logrotate.d/rsyslog ``` -```plaintext +``` /var/log/syslog /var/log/mail.info /var/log/mail.warn diff --git a/content/ru/linux-lifehacks/linux-monitoring-with-telegram-alerts.md b/content/ru/linux-lifehacks/linux-monitoring-with-telegram-alerts.md index a5eea64..7c12403 100644 --- a/content/ru/linux-lifehacks/linux-monitoring-with-telegram-alerts.md +++ b/content/ru/linux-lifehacks/linux-monitoring-with-telegram-alerts.md @@ -57,7 +57,7 @@ docker ps ``` Вывод команды должен содержать 5 контейнеров: prometheus, grafana, alertmanager, node-exporter, grafana. -```plaintext +``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 46fba26e7234 gcr.io/cadvisor/cadvisor:v0.47.0 "/usr/bin/cadvisor -…" 5 days ago Up 5 days (healthy) 8080/tcp monitoring_cadvisor.1.q02qcn798dh0rydo1dzslylse f212e3c66786 prom/alertmanager:v0.25.0 "/bin/alertmanager -…" 6 days ago Up 6 days 9093/tcp monitoring_alertmanager.1.oysziztrqnur7xr0hr82avunz diff --git a/content/ru/python-lifehacks/how-to-easily-write-linux-cli-tool.md b/content/ru/python-lifehacks/how-to-easily-write-linux-cli-tool.md index 6e01db9..34a0bbb 100644 --- a/content/ru/python-lifehacks/how-to-easily-write-linux-cli-tool.md +++ b/content/ru/python-lifehacks/how-to-easily-write-linux-cli-tool.md @@ -46,7 +46,7 @@ my-cli-tool kernel ``` Вы увидите такой вывод: -```plaintext +``` ❯ my-cli-tool kernel Kernel version: 6.2.2-060202-generic ``` @@ -57,7 +57,7 @@ Kernel version: 6.2.2-060202-generic my-cli-tool --help ``` Вы получите такой вывод: -```plaintext +``` NAME my-cli-tool - A CLI tool for getting system information about Linux server @@ -103,7 +103,7 @@ if __name__ == "__main__": my-cli-tool kernel --format short ``` На что должен последовать такой вывод: -```plaintext +``` 6.2.2 ``` При этом автоматически будет скорректирована help страница, туда будет добавлен флаг `--format` и его возможные значения: @@ -111,7 +111,7 @@ my-cli-tool kernel --format short my-cli-tool kernel --help ``` Вывод: -```plaintext +``` NAME my-cli-tool kernel - A method for getting kernel version diff --git a/content/ru/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md b/content/ru/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md index a428ead..d3e49f1 100644 --- a/content/ru/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md +++ b/content/ru/python-lifehacks/how-to-load-multiple-web-pages-in-parallel-using-python.md @@ -46,7 +46,7 @@ loop.run_until_complete(fetch_urls(urls)) python3 main.py ``` Вы увидите примерно такой вывод: -```plaintext +``` 200 { "args": { diff --git a/content/ru/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md b/content/ru/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md index f8065bf..8c1a8bf 100644 --- a/content/ru/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md +++ b/content/ru/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt -y upgrade Команда `sudo apt update` обновит кэш репозиториев, а команда `sudo apt -y upgrade` установит новые версии всех установленных программ, включая ядро linux. Плюс данного способа в том, что будет установлена последняя версия linux ядра, официально поддерживаемого ОС Ubuntu. Минус этого способа в том, что официально поддерживаемое ядро обычно не самое новое. Иногда бывает так, что необходимо установить именно самую новую версию ядра linux. Реальный пример: на вашем новом ноутбуке может быть установлен процессор, поддержка которого обеспечивается только в версии ядра linux 5.12, тогда как официально поддерживаемая версия более старая. И тут на помощь приходит второй способ. ### Второй способ Первым делом нужно зайти на сайт https://kernel.ubuntu.com/~kernel-ppa/mainline/. На этом сайте нужно выбрать папку с последней версией ядра linux (в самом низу страницы). Обратите внимание, что рекомендуется выбирать версию без суффикса "rc". Суффикс "rc" означает "release candidate", что в свою очередь значит, что данная версия ядра не является стабильной. На открывшейся странице выбираем папку с архитектурой вашего процессора. Архитектуру можно узнать с помощью команды `uname -p`. Если вывод этой команды "x86_64", то выбираем папку amd64. На открывшейся странице будут ссылки на .deb файлы. Нам нужно скачать 4 из них: -```plaintext +``` linux-headers-{version}-generic_{version}.{date}_amd64.deb linux-headers-{version}_{version}.{date}_all.deb linux-image-unsigned-{version}-generic_{version}.{date}_amd64.deb diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..8c8a671 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,84 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.codehilite .hll { background-color: #333333 } +.codehilite { background: #111111; color: #ffffff } +.codehilite .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */ +.codehilite .err { color: #ffffff } /* Error */ +.codehilite .esc { color: #ffffff } /* Escape */ +.codehilite .g { color: #ffffff } /* Generic */ +.codehilite .k { color: #fb660a; font-weight: bold } /* Keyword */ +.codehilite .l { color: #ffffff } /* Literal */ +.codehilite .n { color: #ffffff } /* Name */ +.codehilite .o { color: #ffffff } /* Operator */ +.codehilite .x { color: #ffffff } /* Other */ +.codehilite .p { color: #ffffff } /* Punctuation */ +.codehilite .ch { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Hashbang */ +.codehilite .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */ +.codehilite .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */ +.codehilite .cpf { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.PreprocFile */ +.codehilite .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */ +.codehilite .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */ +.codehilite .gd { color: #ffffff } /* Generic.Deleted */ +.codehilite .ge { color: #ffffff } /* Generic.Emph */ +.codehilite .gr { color: #ffffff } /* Generic.Error */ +.codehilite .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.codehilite .gi { color: #ffffff } /* Generic.Inserted */ +.codehilite .go { color: #444444; background-color: #222222 } /* Generic.Output */ +.codehilite .gp { color: #ffffff } /* Generic.Prompt */ +.codehilite .gs { color: #ffffff } /* Generic.Strong */ +.codehilite .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */ +.codehilite .gt { color: #ffffff } /* Generic.Traceback */ +.codehilite .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */ +.codehilite .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */ +.codehilite .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */ +.codehilite .kp { color: #fb660a } /* Keyword.Pseudo */ +.codehilite .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */ +.codehilite .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */ +.codehilite .ld { color: #ffffff } /* Literal.Date */ +.codehilite .m { color: #0086f7; font-weight: bold } /* Literal.Number */ +.codehilite .s { color: #0086d2 } /* Literal.String */ +.codehilite .na { color: #ff0086; font-weight: bold } /* Name.Attribute */ +.codehilite .nb { color: #ffffff } /* Name.Builtin */ +.codehilite .nc { color: #ffffff } /* Name.Class */ +.codehilite .no { color: #0086d2 } /* Name.Constant */ +.codehilite .nd { color: #ffffff } /* Name.Decorator */ +.codehilite .ni { color: #ffffff } /* Name.Entity */ +.codehilite .ne { color: #ffffff } /* Name.Exception */ +.codehilite .nf { color: #ff0086; font-weight: bold } /* Name.Function */ +.codehilite .nl { color: #ffffff } /* Name.Label */ +.codehilite .nn { color: #ffffff } /* Name.Namespace */ +.codehilite .nx { color: #ffffff } /* Name.Other */ +.codehilite .py { color: #ffffff } /* Name.Property */ +.codehilite .nt { color: #fb660a; font-weight: bold } /* Name.Tag */ +.codehilite .nv { color: #fb660a } /* Name.Variable */ +.codehilite .ow { color: #ffffff } /* Operator.Word */ +.codehilite .pm { color: #ffffff } /* Punctuation.Marker */ +.codehilite .w { color: #888888 } /* Text.Whitespace */ +.codehilite .mb { color: #0086f7; font-weight: bold } /* Literal.Number.Bin */ +.codehilite .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */ +.codehilite .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */ +.codehilite .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */ +.codehilite .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */ +.codehilite .sa { color: #0086d2 } /* Literal.String.Affix */ +.codehilite .sb { color: #0086d2 } /* Literal.String.Backtick */ +.codehilite .sc { color: #0086d2 } /* Literal.String.Char */ +.codehilite .dl { color: #0086d2 } /* Literal.String.Delimiter */ +.codehilite .sd { color: #0086d2 } /* Literal.String.Doc */ +.codehilite .s2 { color: #0086d2 } /* Literal.String.Double */ +.codehilite .se { color: #0086d2 } /* Literal.String.Escape */ +.codehilite .sh { color: #0086d2 } /* Literal.String.Heredoc */ +.codehilite .si { color: #0086d2 } /* Literal.String.Interpol */ +.codehilite .sx { color: #0086d2 } /* Literal.String.Other */ +.codehilite .sr { color: #0086d2 } /* Literal.String.Regex */ +.codehilite .s1 { color: #0086d2 } /* Literal.String.Single */ +.codehilite .ss { color: #0086d2 } /* Literal.String.Symbol */ +.codehilite .bp { color: #ffffff } /* Name.Builtin.Pseudo */ +.codehilite .fm { color: #ff0086; font-weight: bold } /* Name.Function.Magic */ +.codehilite .vc { color: #fb660a } /* Name.Variable.Class */ +.codehilite .vg { color: #fb660a } /* Name.Variable.Global */ +.codehilite .vi { color: #fb660a } /* Name.Variable.Instance */ +.codehilite .vm { color: #fb660a } /* Name.Variable.Magic */ +.codehilite .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */ diff --git a/themes/ds b/themes/ds index 5be1e9a..9bba1d2 160000 --- a/themes/ds +++ b/themes/ds @@ -1 +1 @@ -Subproject commit 5be1e9acaad8fd84f01e5f7a969033d5c449430d +Subproject commit 9bba1d2c706d03120930c961c1b4a76535877d54