1
0
Fork 0

Remove prism
deploy Details

This commit is contained in:
Digital Studium 2023-04-23 17:56:27 +03:00
parent 0682ac8961
commit d90ff60a80
23 changed files with 181 additions and 35 deletions

View File

@ -1,5 +1,5 @@
title: 'Digital Studium'
theme: 'ds'
title: Digital Studium
theme: ds
defaultContentLanguageInSubdir: true
languages:
@ -8,7 +8,7 @@ languages:
languageName: English
params:
author: Konstantin Shutkin
description: Blog about Linux, DevOps, programming and cloud technologies
description: Blog about Linux, DevOps, programming and cloud technologies
ru:
contentDir: content/ru
languageName: Русский

View File

@ -1,8 +1,9 @@
---
title: "About author"
date: "2023-02-18"
title: About author
category: /
filename: about-author
date: 2023-02-18
---
{{< figure src="/images/kostya.jpg" width="100px" class="floatleft alignleft" >}}
My name is Konstantin Shutkin, I am from Moscow, Russia and I am a DevOps engineer. Since 2016, I have worked in this position in companies such as Severstal, Sberbank, Nvidia. My main subject of research and work is Linux, Docker, Kubernetes, Python programming and more. I share my knowledge on this blog.

View File

@ -1,6 +1,8 @@
---
title: "Linux: How to create LVM logical volume"
date: "2022-05-15"
category: linux-lifehacks
filename: how-to-create-lvm-logical-volume
date: 2022-05-15
---
### First step: creating a physical volume
After you have attached the disk to a physical server or virtual machine, you need to type

View File

@ -1,6 +1,8 @@
---
title: "Linux: How to extend LVM volume"
date: "2022-05-15"
category: linux-lifehacks
filename: how-to-extend-lvm-volume-on-linux
date: 2022-05-15
---
### Situation 1: new disk
#### First step: creating a physical volume

View File

@ -1,6 +1,8 @@
---
title: "Linux: how to limit /var/log folder size"
date: "2022-06-16"
category: linux-lifehacks
filename: linux-how-to-limit-var-log-size
date: 2022-06-16
---
Sometimes the `/var/log` folder grows so large that it causes a shortage of disk space. How to limit the size of this folder? By following the two steps in this article, you can control the size of the `/var/log` folder.<!--more-->

View File

@ -1,6 +1,8 @@
---
title: "Linux: How to set up monitoring with alerts to Telegram"
date: "2023-03-04"
category: linux-lifehacks
filename: linux-monitoring-with-telegram-alerts
date: 2023-03-04
---
This article describes how to set up monitoring with alerts to Telegram using Grafana, Prometheus, Alertmanager, Node-exporter and Cadvisor.
### First step: Cloning the repository

View File

@ -1,6 +1,8 @@
---
title: "Nginx: Sample Configuration Files"
date: "2023-03-26"
category: nginx-lifehacks
filename: nginx-configs-examples
date: 2023-03-26
---
Sometimes there is a need to quickly create an nginx configuration file: for hosting a static website,
to create a simple proxy server, etc.
@ -17,7 +19,7 @@ Then run the command to apply the config:
sudo service nginx reload
```
## Example 1: hosting a static site.
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;
@ -31,7 +33,7 @@ server {
}
```
## Example 2: proxy server
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;
@ -49,14 +51,14 @@ server {
```
## Example 3: caching proxy
In `/etc/nginx/nginx.conf` add:
```bash
```nginx
http {
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:10m
inactive=24h max_size=1g;
}
```
In `/etc/nginx/conf.d` put the following config:
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;

View File

@ -1,6 +1,8 @@
---
title: "Python: How to easily write a CLI tool for Linux using Fire"
date: "2023-04-09"
category: python-lifehacks
filename: how-to-easily-write-linux-cli-tool
date: 2023-04-09
---
I want to share the easiest way I know to write a CLI tool for Linux administration
using python and Fire.

View File

@ -1,6 +1,8 @@
---
title: "Python: How to load multiple web pages in parallel"
date: "2022-05-15"
category: python-lifehacks
filename: how-to-load-multiple-web-pages-in-parallel-using-python
date: 2022-05-15
---
First you need to install an aiohttp package. To install aiohttp run the command:
```bash

View File

@ -1,6 +1,8 @@
---
title: "Ubuntu: How to upgrade kernel"
date: "2022-05-14"
category: ubuntu-lifehacks
filename: ubuntu-how-to-upgrade-kernel
date: 2022-05-14
---
### First method
The first method is very simple. We need to enter only one command in the terminal:

View File

@ -1,6 +1,8 @@
---
title: "Об авторе"
date: "2023-02-18"
title: Об авторе
category: /
filename: about-author
date: 2023-02-18
---
{{< figure src="/images/kostya.jpg" width="100px" class="floatleft alignleft" >}}
Меня зовут Константин Шуткин, я живу в городе Москва и я DevOps-инженер. С 2016 года я работал на этой должности в таких компаниях, как Северсталь, Сбербанк, Nvidia. Мой основной предмет исследований и работы это Linux, Docker, Kubernetes, программирование на Python и т. д., и я делюсь своими знаниями в этих областях на этом сайте и на ютуб канале.

View File

@ -1,6 +1,8 @@
---
title: "Linux: Как создать логический том LVM"
date: "2022-05-15"
category: linux-lifehacks
filename: how-to-create-lvm-logical-volume
date: 2022-05-15
---
### Первый шаг: создание физического тома
После того, как вы присоединили диск к физическому серверу или к виртуальной машине, вам нужно набрать

View File

@ -1,6 +1,8 @@
---
title: "Linux: Как расширить логический том LVM"
date: "2022-05-15"
category: linux-lifehacks
filename: how-to-extend-lvm-volume-on-linux
date: 2022-05-15
---
### Ситуация 1: новый диск
#### Первый шаг: создание физического тома

View File

@ -1,6 +1,8 @@
---
title: "Linux: как ограничить размер папки /var/log"
date: "2022-06-06"
category: linux-lifehacks
filename: linux-how-to-limit-var-log-size
date: 2022-06-06
---
Иногда папка `/var/log` увеличивается в размере настолько, что становится причиной нехватки места на диске. Как ограничить рост размера этой папки? Выполнив два шага из этой статьи, вы можете поставить размер папки `/var/log` под контроль.<!--more-->

View File

@ -1,6 +1,8 @@
---
title: "Linux: Как настроить мониторинг с уведомлениями в Telegram"
date: "2023-03-04"
category: linux-lifehacks
filename: linux-monitoring-with-telegram-alerts
date: 2023-03-04
---
В статье описывается, как настроить мониторинг с уведомлениями в Telergram с помощью Grafana, Prometheus, Alertmanager, Node-exporter и Cadvisor.
### Первый шаг: Клонирование репозитория

View File

@ -1,23 +1,32 @@
---
title: "Nginx: примеры конфигурационных файлов"
date: "2023-03-26"
category: nginx-lifehacks
filename: nginx-configs-examples
date: 2023-03-26
---
Иногда возникает потребность быстро создать конфигурационный файл nginx: для хостинга статического вебсайта,
для создания простого проксирующего сервера и т. п.
В данной статье приведены простые примеры конфигов Nginx для разных целей.
<!--more-->
Чтобы нижеприведенные конфиги заработали, нужно положить их по пути `/etc/nginx/conf.d/<some_name>.conf`, затем проверить
валидность конфига:
```bash
nginx -t
```
Затем выполнить команду для применения конфига:
```bash
sudo service nginx reload
```
## Пример 1: хостинг статического сайта.
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;
@ -30,8 +39,10 @@ server {
}
}
```
## Пример 2: проксирующий сервер
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;
@ -47,16 +58,21 @@ server {
}
}
```
## Пример 3: кэширующий прокси
В `/etc/nginx/nginx.conf` добавить:
```bash
```nginx
http {
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:10m
inactive=24h max_size=1g;
}
```
В `/etc/nginx/conf.d` положить такой конфиг:
```bash
```nginx
server {
listen 80;
server_name example.com www.example.com;
@ -71,5 +87,4 @@ server {
http_500 http_502 http_503 http_504;
}
}
```
```

View File

@ -1,6 +1,8 @@
---
title: "Python: Как легко написать CLI инструмент для Linux с помощью Fire"
date: "2023-04-09"
category: python-lifehacks
filename: how-to-easily-write-linux-cli-tool
date: 2023-04-09
---
Хочу поделиться самым простым из известных мне способов написать CLI инструмент для администрирования Linux
на Python.

View File

@ -1,6 +1,8 @@
---
title: "Python: Как параллельно загрузить несколько веб-страниц"
date: "2022-05-15"
category: python-lifehacks
filename: how-to-load-multiple-web-pages-in-parallel-using-python
date: 2022-05-15
---
Сначала нужно установить пакет `aiohttp`. Для установки aiohttp выполните команду:

View File

@ -1,6 +1,8 @@
---
title: "Ubuntu: Как обновить ядро"
date: "2022-05-14"
category: ubuntu-lifehacks
filename: ubuntu-how-to-upgrade-kernel
date: 2022-05-14
---
### Первый способ
Первый способ очень прост. Нам нужно ввести в терминале всего одну команду:

51
static/admin/config.yml Normal file
View File

@ -0,0 +1,51 @@
backend:
name: git-gateway
local_backend: true
# These lines should *not* be indented
media_folder: "static/images" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images" # The src attribute for uploaded media will begin with /images/uploads
i18n:
structure: multiple_folders
locales: [en, ru]
collections:
- name: posts
label: Posts
label_singular: Post
folder: content
path: '{{category}}/{{slug}}'
slug: '{{filename}}{{extension}}'
create: true
i18n: true
view_groups:
- label: Year
field: date
# groups items based on the value matched by the pattern
pattern: \d{4}
- label: Category
field: category
fields:
- label: Title
name: title
widget: string
i18n: true
- label: "Category"
name: "category"
widget: "select"
options: ["/", "linux-lifehacks", "nginx-lifehacks", "python-lifehacks", "ubuntu-lifehacks"]
i18n: duplicate
- label: Filename
name: filename
widget: string
i18n: duplicate
- label: Date
name: date
widget: datetime
i18n: duplicate
- label: Body
name: body
widget: markdown
i18n: true

13
static/admin/index.html Normal file
View File

@ -0,0 +1,13 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>

View File

@ -0,0 +1,34 @@
#!/usr/bin/env ./Browser/execdesktop
#
# This file is a self-modifying .desktop file that can be run from the shell.
# It preserves arguments and environment for the start-tor-browser script.
#
# Run './start-tor-browser.desktop --help' to display the full set of options.
#
# When invoked from the shell, this file must always be in a Tor Browser root
# directory. When run from the file manager or desktop GUI, it is relocatable.
#
# After first invocation, it will update itself with the absolute path to the
# current TBB location, to support relocation of this .desktop file for GUI
# invocation. You can also add Tor Browser to your desktop's application menu
# by running './start-tor-browser.desktop --register-app'
#
# If you use --register-app, and then relocate your TBB directory, Tor Browser
# will no longer launch from your desktop's app launcher/dock. However, if you
# re-run --register-app from inside that new directory, the script
# will correct the absolute paths and re-register itself.
#
# This file will also still function if the path changes when TBB is used as a
# portable app, so long as it is run directly from that new directory, either
# via the shell or via the file manager.
[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and 1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=sh -c '"/opt/tor-browser/Browser/start-tor-browser" --detach || ([ ! -x "/opt/tor-browser/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=/opt/tor-browser/Browser/browser/chrome/icons/default/default128.png
StartupWMClass=Tor Browser

@ -1 +1 @@
Subproject commit 863541e3da6d4a0664236da0df28359feb1a6f1c
Subproject commit 7b804f0652726cce1f259ccc893afd1db4e3acc6