lavina/docs/cheatsheet.md

51 lines
1.1 KiB
Markdown
Raw Normal View History

# Cheatsheet
Some useful commands for development and testing.
<!-- please use spaces at line start to indicate shell cmds -->
## Certificates
Following commands require `OpenSSL` to be installed. It is provided as `openssl` package in Arch Linux.
Generate self-signed TLS certificate:
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -noenc \
-keyout certs/xmpp.key -out certs/xmpp.pem \
-subj "/CN=example.com"
Print content of a TLS certificate:
openssl x509 -in certs/xmpp.pem -text
2023-03-06 18:52:53 +00:00
Make sure `xmpp.key` starts and ends with:
```
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
```
2023-03-08 18:56:53 +00:00
## Protocol Specs
XMPP XSDs - [https://xmpp.org/schemas/index.shtml]
2023-03-11 15:07:02 +00:00
IRC modern spec - [https://modern.ircdocs.horse/]
2023-08-18 14:45:48 +00:00
## Initializing DB with some users
sqlite3 db.sqlite < test/init_state.sql
Same test migration could be used for integration tests in the future.
## Using irssi
irssi in a TUI-based IRC client.
Connecting:
/connect -nocap <address> [<port> [<password> [<nick>]]]
Password should be the same as in storage.
Example:
/connect -nocap 127.0.0.1 6667 parolchik1 kek