Add checks before deploy to server, also small fixes on content.

This commit is contained in:
Thanwer 2026-05-09 23:05:54 +02:00
parent 4c61829556
commit 72e1a8d447
16 changed files with 348 additions and 23 deletions

132
.cspell.config.yaml Normal file
View File

@ -0,0 +1,132 @@
# https://cspell.org/configuration/
version: "0.2"
language: en,pt
dictionaries:
- en-us
- pt-br
- softwareTerms
- bash
- networking-terms
import:
- "@cspell/dict-pt-br/cspell-ext.json"
words:
- alice
- anubis
- asciidoctor
- bioinformaticians
- bioinformatics
- Clonezilla
- Configless
- cpus
- colortheme
- ctstate
- colorthemeswitcher
- comentario
- conntrack
- chacha
- cspell
- dport
- docker
- ESXi
- fail2ban
- findtime
- filesystems
- frontmatter
- GParted
- GSSAPI
- HELO
- hreflang
- icmpv6
- iptables
- ignoreip
- ip6tables
- ipset
- jails
- jsonld
- lastmod
- linkcheck
- linkinator
- lychee
- markdownlint
- maxretry
- mathjax
- mermaid
- nerdalert
- netcat
- noindex
- nvme
- opencode
- oque
- pagination
- PagerSize
- QUIC
- rsync
- sshaudit
- sbatch
- scancel
- scontrol
- sinfo
- slurmd
- slurmctld
- slurmdbd
- squeue
- srun
- shortcodes
- Sysadmin
- sysadmin
- textlint
- trafego
- Thanwer
- TOML
- umami
- Umami
- VMDK
- VMX
- webserver
- yamllint
- ZgotmplZ
- arancibia
- thanwer
- bantime
- bootable
- configless
- dropadas
- dropar
- dropamos
- enablecolorthemeswitcher
- Gparted
- hugo
- icds
- JOBID
- nmap
- Nmap
- NODELIST
- nodelist
- ntasks
- readnextposts
- shinobi
- Slurm
- slurm
- slurmctl
- socialicons
- TIMELIMIT
- unbootable
- Universität
- pietro
flagWords: []
ignorePaths:
- node_modules
- public
- resources
- .git
- "*.gif"
- "*.png"
- "*.jpg"
- "*.webp"
- "*.svg"
- "*.ico"
- themes
- "package.json"
- "package-lock.json"
enableFiletypes:
- markdown

14
.lychee.toml Normal file
View File

@ -0,0 +1,14 @@
# https://github.com/lycheeverse/lychee
exclude = [
"linkedin\\.com",
"facebook\\.com",
"instagram\\.com",
"x\\.com",
"t\\.me",
"telegram\\.me",
"youtube\\.com",
"sshaudit\\.com",
]
exclude_private = true
timeout = 20
max_retries = 2

7
.lycheeignore Normal file
View File

@ -0,0 +1,7 @@
linkedin\.com
facebook\.com
instagram\.com
x\.com
t\.me
telegram\.me
youtube\.com

63
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,63 @@
# https://github.com/DavidAnson/markdownlint-cli2
frontMatter: (^\+\+\+$[^]*?^\+\+\+$)
globs:
- "content/**/*.md"
config:
MD001: true
MD003:
style: atx
MD004:
style: dash
MD005: true
MD007: false
MD009: true
MD010: true
MD011: true
MD012: true
MD013: false
MD014: true
MD018: true
MD019: true
MD020: true
MD021: true
MD022: true
MD023: true
MD024: false
MD025:
front_matter_title: "\\s*title\\s*="
level: 1
MD026: true
MD027: true
MD028: false
MD029:
style: one
MD030: true
MD031: true
MD032: true
MD033: false
MD034: false
MD035:
style: ---
MD036: true
MD037: true
MD038: true
MD039: true
MD040: true
MD041: false
MD042: true
MD043: false
MD044: false
MD045: true
MD046: false
MD047: true
MD048:
style: backtick
MD049:
style: underscore
MD050:
style: asterisk
MD051: false
MD052: true
MD053: true

56
.markdownlintrc Normal file
View File

@ -0,0 +1,56 @@
MD001: true
MD003:
style: atx
MD004:
style: dash
MD005: true
MD007: false
MD009: true
MD010: true
MD011: true
MD012: true
MD013: false
MD014: true
MD018: true
MD019: true
MD020: true
MD021: true
MD022: true
MD023: true
MD024: false
MD025:
front_matter_title: "\\s*title\\s*="
level: 1
MD026: true
MD027: true
MD028: false
MD029:
style: one
MD030: true
MD031: true
MD032: true
MD033: false
MD034: false
MD035:
style: ---
MD036: true
MD037: true
MD038: true
MD039: true
MD040: true
MD041: false
MD042: true
MD043: false
MD044: false
MD045: true
MD046: false
MD047: true
MD048:
style: backtick
MD049:
style: underscore
MD050:
style: asterisk
MD051: false
MD052: true
MD053: true

39
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,39 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: check-json
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-added-large-files
args: [--maxkb=1024]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
args: [--config, .markdownlintrc]
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v10.0.0
hooks:
- id: cspell
args: [--no-summary, --no-progress, --config, .cspell.config.yaml]
additional_dependencies:
- "@cspell/dict-pt-br"
types: [markdown]
- repo: local
hooks:
- id: lychee
name: lychee
entry: lychee
args: [--config, .lychee.toml, --root-dir, static, --no-progress]
language: system
types: [markdown]

View File

@ -58,9 +58,9 @@ I invite you to read the [nc man page](https://linux.die.net/man/1/nc).
The main options we need to use are:
* -p : This specifies which port should we listen to.
* -k : This makes netcat to keep listening after a client disconnects.
* -u : Use UDP instead of TCP
- -p : This specifies which port should we listen to.
- -k : This makes netcat to keep listening after a client disconnects.
- -u : Use UDP instead of TCP
### Use cases

View File

@ -59,9 +59,9 @@ Lhes convido a ler a [man page do nc](https://linux.die.net/man/1/nc).
Os principais argumentos que precisamos são:
* -p : Isso especifica a porta que queremos escutar.
* -k : Isso mantem o netcat aberto mesmo depois do cliente desconectar.
* -u : Isso faz o netcat escutar UDP em vez de TCP.
- -p : Isso especifica a porta que queremos escutar.
- -k : Isso mantém o netcat aberto mesmo depois do cliente desconectar.
- -u : Isso faz o netcat escutar UDP em vez de TCP.
### Casos de uso
@ -89,9 +89,9 @@ Veja um exemplo disso funcionando:
![Exemplo de uso do netcat](/images/nc-example1.gif)
#### Transferencia de arquivos
#### Transferência de arquivos
O netcat tambem pode ser usado para transferir arquivos entre dois hosts, isso é util em casos de ambientes sem acessos FTP ou SCP.
O netcat também pode ser usado para transferir arquivos entre dois hosts, isso é util em casos de ambientes sem acessos FTP ou SCP.
No receptor:

View File

@ -50,10 +50,10 @@ The main workflow of Slurm is quite simple:
python my_script.py
```
2. The user submits a job to the Slurm controller using the `sbatch` command
3. The Slurm controller adds the job to the queue and assigns it a job ID
4. The Slurm controller schedules the job to run on a compute node when resources are available
5. The compute node executes the job and sends the output back to the user
1. The user submits a job to the Slurm controller using the `sbatch` command
1. The Slurm controller adds the job to the queue and assigns it a job ID
1. The Slurm controller schedules the job to run on a compute node when resources are available
1. The compute node executes the job and sends the output back to the user
The user can monitor the job status using the `squeue` command.
The administrator can manage the jobs using the `scancel` command to cancel a job, or the `scontrol` command to modify a job.
@ -145,6 +145,6 @@ Slurm-Mail is a drop in replacement for Slurm's e-mails to give users much more
Now this is a feature that I was not aware of, but Slurm has a built-in power saving feature, which allows you to automatically power on/off compute nodes based on demand.
It relies on scripts that you need to provide, one for powering on a node, and another for powering off a node. You can find the documentation [here](https://slurm.schedmd.com/power_save.html).
It relies on scripts that you need to provide, one for powering on a node, and another for powering off a node. You can find the [Slurm power saving documentation](https://slurm.schedmd.com/power_save.html).
In my case I adapted [the scripts from here](https://github.com/OleHolmNielsen/Slurm_tools/tree/master/power_save) to use IPMI to power on/off the nodes.

View File

@ -33,7 +33,7 @@ PermitRootLogin no
### Autenticação por dois fatores (2FA)
Se voce quiser mais um nivel de segurança, voce pode implementar [autenticação de dois fatores com o Google Authenticator](https://docs.vultr.com/how-to-use-two-factor-authentication-with-sudo-and-ssh-on-linux-with-google-authenticator).
Se voce quiser mais um nível de segurança, voce pode implementar [autenticação de dois fatores com o Google Authenticator](https://docs.vultr.com/how-to-use-two-factor-authentication-with-sudo-and-ssh-on-linux-with-google-authenticator).
### Desativar métodos de autenticação não utilizados
@ -47,7 +47,7 @@ GSSAPIAuthentication no
## Melhorar algoritmos de criptografia do SSH
Seguindo [esses guias](https://www.sshaudit.com/hardening_guides.html) voce pode desabilitar algoritmos de autenticação e criptografia vulneraveis e priorizar os mais fortes (AES-256-GCM, chacha20-poly1305).
Seguindo [esses guias](https://www.sshaudit.com/hardening_guides.html) voce pode desabilitar algoritmos de autenticação e criptografia vulneráveis e priorizar os mais fortes (AES-256-GCM, chacha20-poly1305).
Quando voce terminar, verifique com a ferramenta [ssh-audit](https://github.com/jtesta/ssh-audit).

View File

@ -1,2 +1,16 @@
#!/usr/bin/env bash
hugo --minify && rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/
set -euo pipefail
echo "=== Running pre-commit hooks ==="
pre-commit run --all-files
echo ""
echo "=== Building site ==="
hugo --minify
echo ""
echo "=== Deploying to server ==="
rsync -avz --delete public/ shinobi.thanwer.com:/srv/www/blog/
echo ""
echo "=== Done ==="