brain initiation
This commit is contained in:
123
20230414160136-manual.org
Normal file
123
20230414160136-manual.org
Normal file
@@ -0,0 +1,123 @@
|
||||
:PROPERTIES:
|
||||
:ID: 78443613-59f6-4d06-9e1c-5bcc0f9c6737
|
||||
:END:
|
||||
#+title: manual
|
||||
#+filetags: :INDEX:MAIN::
|
||||
That is the manual. A list of all the topics regarding corporate. A precise index is integrated into the Main (INDEX) Topics ([[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]],[[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]], [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]], [[id:01ec5ed6-a234-4063-994b-174f704bb28a][hardware]]).
|
||||
|
||||
* Topics
|
||||
** [[id:8e21dcdd-34af-4952-913d-c434df43d5cb][IP-Address]]
|
||||
** [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] Software and Basics
|
||||
***
|
||||
*** [[id:94b5e3fb-bbf9-40ec-902f-9e15c74c5f99][crontab]]
|
||||
*** [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]]
|
||||
*** [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]]
|
||||
**** [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][openmpi]]
|
||||
*** [[id:c69a77dc-f87f-418c-9870-eedddc43be37][mounting]]
|
||||
*** [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]]
|
||||
**** [[id:75a2a403-34a2-4e4c-9fb0-10260ef97eab][emacs-frame]]
|
||||
**** [[id:216bfc04-0276-4c4b-8ec7-0b7d16bc62cc][emacs-window]]
|
||||
**** [[id:c7747161-284c-4882-bd11-80bc2a990814][buffer]]
|
||||
**** [[id:3dfde3f4-2cc0-4356-a147-d4afd599e731][auctex]]
|
||||
**** [[id:66d0f2d2-f2ea-4ab6-af2c-fefaaab755a5][org-mode]]
|
||||
**** [[id:9d782b7c-5d45-4963-96f4-ee01a00ba280][org-roam]]
|
||||
**** [[id:b02ca084-7831-4013-8389-45f4cd969e25][org-attach]]
|
||||
**** [[id:f68dfc34-5349-42d1-8074-6c4be231a69b][org-web-tools]]
|
||||
**** [[id:7f5dafdd-7d74-4551-bd7b-666729b1c1d4][org-marginalia]]
|
||||
**** [[id:7bd1f7dd-fcb2-4efc-a4df-f233a4bf3fcd][org-gcal]]
|
||||
**** [[id:9aa361f6-b829-49ad-a523-6498dbfb0213][projectile]]
|
||||
**** [[id:b3503901-bb4f-4fda-b85f-5e738df311fb][helm-bibtex]]
|
||||
**** [[id:9ce51551-fcb1-446a-9924-9dd26f5d56aa][helm-org-rifle]]
|
||||
|
||||
** Selfhosting
|
||||
*** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]]
|
||||
*** [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]]
|
||||
*** [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]]
|
||||
*** [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]]
|
||||
**** docker-[[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]]
|
||||
**** [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]]
|
||||
**** [[id:add49718-44d1-4576-9e5a-aea5d025c53b][list of docker containers]]
|
||||
***** [[id:90e3b8a2-b523-4044-af6f-fd4a559b2d7f][traefik_docker]]
|
||||
***** [[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]]
|
||||
***** [[id:3bd6dae2-5fbb-4045-80c0-4dbed0f02df1][nextcloud-docker-container]]
|
||||
***** [[id:94daf0fc-da84-4b90-a200-7b147f721e2a][open-vpn]]
|
||||
***** [[id:7eca198f-3e97-4f29-a0f7-01498e71d132][bind9-docker]]
|
||||
***** [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer-docker]]
|
||||
***** [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab-docker]]
|
||||
***** [[id:ff0e4b42-be30-4d5e-be17-c39195dfe22e][whiteboard]]
|
||||
***** [[id:85af8e8c-0dc0-4855-9f63-d4d00e2cd27f][Kasm-container-deployment]]
|
||||
***** [[id:d7b03403-db35-465a-b4a0-fce27733df5a][whoogle-container]]
|
||||
***** [[id:6d2e40f4-f8c5-43fe-afd3-8c253a080e43][docker-logs]]
|
||||
***** [[id:e1eac0f9-5b66-436a-8624-d5ea49e1204b][wordpress]]
|
||||
***** [[id:46107a80-aa2d-4861-8362-6836c547dda4][rustdesk]]
|
||||
***** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]]
|
||||
***** [[id:86371601-9aa6-4568-8063-ccd9f6d2ace3][flame-docker]]
|
||||
***** [[id:ae46c92b-d5fd-4172-944f-9165a61d2217][maria_DB]]
|
||||
***** [[id:91deae5f-e670-4463-8fee-688212d13030][mongo-db]]
|
||||
***** mysql
|
||||
***** [[id:dbeeedc0-8a64-43f3-84a6-397e3ecb5e70][cryptgeon-docker]]
|
||||
***** customer share
|
||||
**** [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-networks]]
|
||||
** communication
|
||||
*** [[id:a88d9210-6085-4def-982a-d4a6ff391a2e][linphone]]
|
||||
*** [[id:46107a80-aa2d-4861-8362-6836c547dda4][rustdesk]]
|
||||
*** [[id:29c8ec85-9de8-4ace-8c52-13a086341861][rocket-chat]]
|
||||
*** [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]]
|
||||
*** [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][Virtual Mashines]]
|
||||
|
||||
** [[id:aad9b5d2-8242-4b89-8ba8-bd649cf88c23][system-information]]
|
||||
** modelling in a [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]]
|
||||
*** [[id:574b9e96-1a86-4e43-878c-30534e0dcecb][MBSE (Modell based system engineering)]]
|
||||
**** [[id:a4953b2b-81de-4c15-91e7-10d0cb5f22dd][freeCAD]]
|
||||
**** [[id:6acf9122-b289-44e4-87e1-c3dfb5c7aeb2][salome]]
|
||||
**** [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]]
|
||||
**** [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]]
|
||||
**** [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab]]
|
||||
**** [[id:a6d22357-9bed-422e-9805-0478fbeb3e99][Paraview]]
|
||||
|
||||
|
||||
** [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][Networking]] and [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][Protocols]]
|
||||
*** Network communication and security protocols
|
||||
**** [[id:872ee33b-8361-40c7-9d88-69b3afe5ade2][TLS]]
|
||||
**** [[id:95c8982d-e104-43a2-9bb2-fd7e1c3204f2][SSL]]
|
||||
**** [[id:b9c823ff-4cf4-46a0-8654-54bdc7b67d30][UDP]]
|
||||
**** [[id:0fa93c0d-6741-48cf-8bea-f2519146e4dc][TCP]]
|
||||
**** [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]]
|
||||
**** [[id:7fb31a9c-b252-493f-958b-e2d330047b18][FTP]]
|
||||
**** [[Id:422e07f8-c888-460f-849e-76d451946045][SSH]]
|
||||
**** [[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificate]]
|
||||
*** Networking basics
|
||||
**** [[id:80666401-173e-4828-9c29-552dab716946][DNS]]
|
||||
**** [[id:06b466a8-05ae-4bbd-820d-2d80461767fd][DHCP]]
|
||||
**** [[ID:1af47b07-4205-46ac-837a-ee078067328a][VPN]]
|
||||
**** [[id:1acb20f4-ad0f-4447-9138-c09a949fdd1a][IP-Tables]]
|
||||
**** [[id:20efb455-5575-4b8b-857f-7c337bee644c][traffic]]
|
||||
**** [[id:fde35a08-897d-4502-aead-1f4414ea639c][packets]]
|
||||
**** [[id:f4bb4857-2112-4e10-a22e-6da1436ce7b7][port]]
|
||||
**** [[id:b9047be5-edca-4eca-8bac-c45e03373942][Firewall]]
|
||||
**** [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]
|
||||
**** [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]]
|
||||
*** Network types
|
||||
**** [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
**** [[id:053d9bdf-c6fe-42ce-8c44-d6945f612bf3][WAN]]
|
||||
*** Network periphery
|
||||
**** [[id:d2ff2e45-e1de-4cca-9b59-dfc3ee6afa6f][router]]
|
||||
**** [[id:dd78168d-152c-4aca-a02b-6be0c950920d][switch]]
|
||||
**** [[id:0eb82c5c-7967-44ce-9f2b-9024d34c2ffb][modem]]
|
||||
**** [[id:ccab5008-e48e-413d-bcb5-c6771fa77a3d][WAP]]
|
||||
|
||||
|
||||
** [[id:01ec5ed6-a234-4063-994b-174f704bb28a][Hardware]] setup
|
||||
*** [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][Server]] list
|
||||
**** [[id:d54bf885-a702-48bb-b108-e9e982bc5952][server-w0]]
|
||||
**** [[id:f13f2c9c-4550-4e44-8a14-dc327234d38e][server-w1]]
|
||||
**** [[id:45e10136-fb77-4712-85ef-32adf5cdc489][server-w2]]
|
||||
**** [[id:56a6d355-01cf-44b8-87c7-c77f9db2ce29][server-w3]]
|
||||
**** [[id:845742e6-33e3-4d5b-8a4e-5cec9f448862][server-w4]]
|
||||
**** [[id:cd93c833-85b6-4955-8660-d150373d4ac5][server-w5]]
|
||||
**** [[id:d48299ee-efe3-40d4-a223-26d2c772b522][server-w6]]
|
||||
**** [[id:a08abe7e-23ab-4b59-a105-9873dc79de43][server-w9]]
|
||||
**** [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][server-w10]]
|
||||
**** [[id:fbf9a139-a414-4349-b217-663f15e9a8bd][server-w11]]
|
||||
*** Networking hardware
|
||||
**** [[id:adc016f2-a660-47d7-8974-16b74a02bcbf][Protectli]]
|
||||
32
20230414160603-docker.org
Normal file
32
20230414160603-docker.org
Normal file
@@ -0,0 +1,32 @@
|
||||
:PROPERTIES:
|
||||
:ID: df046fd7-1f82-4e12-9065-56d222f56408
|
||||
:END:
|
||||
#+title: docker
|
||||
#+filetags: :docker:
|
||||
Docker ist the programm designed to self-host services on the web through so called [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]]. A container is a closed system, that can interact with other containers. One Container can run one application and expose this application to a [[id:f4bb4857-2112-4e10-a22e-6da1436ce7b7][port]] on the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]. A list of all deployed and undeployed containers can be found in the [[id:add49718-44d1-4576-9e5a-aea5d025c53b][list of docker containers]].
|
||||
|
||||
To Start a container use
|
||||
#+begin_src
|
||||
docker run <docker image>
|
||||
#+end_src
|
||||
|
||||
You can use an application called [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] to start multiple containers simultaneously and define variables and settings for them beforehand.
|
||||
|
||||
Additionally you can set the following parameters (listed below) together with the run command. Those parameters are important to get the containers running and can also be implemented into docker-compose.
|
||||
* run parameters
|
||||
#+begin_src bash
|
||||
--name "<name of container>"
|
||||
#+end_src
|
||||
creates a verbose name for the container. If no container name is set, docker choooses a random one.
|
||||
#+begin_src bash
|
||||
-v "<volume directory of host>:<volume directory of container>"
|
||||
#+end_src
|
||||
[[id:c69a77dc-f87f-418c-9870-eedddc43be37][Mounts]] a volume to the container. This Volume is located at the given path in the host file system and all files in the given folder are represantations of the same files in the container folder of the given container path.
|
||||
#+begin_src bash
|
||||
-e "<ENVIRONMENT_VARIABLE>"
|
||||
#+end_src
|
||||
Sets a desired environment variable for the container.
|
||||
#+begin_src bash
|
||||
--network "<docker network>"
|
||||
#+end_src
|
||||
Connects the container to the given [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-networks]]
|
||||
51
20230417112410-nextcloud.org
Normal file
51
20230417112410-nextcloud.org
Normal file
@@ -0,0 +1,51 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7c74176b-a637-4d3b-838e-05fae7ad3789
|
||||
:END:
|
||||
#+title: nextcloud
|
||||
|
||||
The cloud for managing Data. Every member gets his own account and can save their data there. The data is stored on the communucation [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] ([[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][w10]]).
|
||||
|
||||
* configdatein
|
||||
** [[~/.config/docker/docker-compose.yml][compose config]]
|
||||
** [[~/nextcloud/config/config.php][config.php]]
|
||||
|
||||
#+begin_src bash
|
||||
docker network create "<network_name>"
|
||||
#+end_src
|
||||
After the creation is successful, add the Databas container to the network.
|
||||
#+begin_src bash
|
||||
docker network attach "<network_name>" "<container_name>"
|
||||
#+end_src
|
||||
If you want to see if the container is added successfully, use the command
|
||||
#+begin_src bash
|
||||
docker network inspect "<network_name>"
|
||||
#+end_src
|
||||
and look for the added container.
|
||||
Ad this point, the reverse proxy container should already be running. The manual entry for the reverse proxy [[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]] shows how it is setup to accept proxy input.
|
||||
In the next step create the nextcloud container as shown below ([[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] access needed ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]]):
|
||||
#+begin_src bash
|
||||
sudo docker run --name nextcloud \
|
||||
-v "/home/<user>/cloud/data:/var/www/html/data" \
|
||||
-v "/home/<user>/cloud/apps:/var/www/html/custom_apps" \
|
||||
-v "/home/<user>/cloud:/var/www/html" \
|
||||
-v "/home/<user>/cloud/config:/var/www/html/config" \
|
||||
--network net -e VIRTUAL_HOST="<sub.domain.com>" \
|
||||
-e LETSENCRYPT_HOST="<sub.domain.com>" \
|
||||
-e MYSQL_HOST="madrigal_DB" -e MYSQL_PASSWORD="<your password>" \
|
||||
-e MYSQL_DATABASE="nextcloud" -e MYSQL_USER="nextcloud" -d nextcloud:latest
|
||||
#+end_src
|
||||
Lastly add the nextcloud container to the internal network you created before.
|
||||
|
||||
* additional note:
|
||||
if you use next5cloud fpm you have to set additional environment variables:
|
||||
#+begin_src bash
|
||||
environment:
|
||||
[..]
|
||||
VIRTUAL_ROOT: /var/www/html
|
||||
VIRTUAL_PROTO: fastcgie
|
||||
#+end_src
|
||||
or set it up like in: https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm
|
||||
|
||||
|
||||
|
||||
* [[id:3bd6dae2-5fbb-4045-80c0-4dbed0f02df1][nextcloud-docker-container]]
|
||||
15
20230417114538-docker_compose.org
Normal file
15
20230417114538-docker_compose.org
Normal file
@@ -0,0 +1,15 @@
|
||||
:PROPERTIES:
|
||||
:ID: fcbfabfa-4a8c-4826-8b57-5dce05965c76
|
||||
:END:
|
||||
#+title: docker-compose
|
||||
A compoise file for [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][containers]]. You can predefine containers to run list settings applied to those containers in a docker-compose file (docker-compose.yml). When you run this file, the listed containers get set up.
|
||||
* The Setup
|
||||
The command for running docker-comose is:
|
||||
#+begin_src
|
||||
docker-compose up -d
|
||||
#+end_src
|
||||
The -d stands for run the command in the backfground and give the prompt back to the terminal. Instead of "up -d" you can also run the restart command to restart all containers listed in an compose-file.
|
||||
* Compose file locations
|
||||
** nextcloud, MariaDB: [[~/.config/docker/docker-compose.yml][Main-location]]
|
||||
** Whoogle-search: [[~/whoogle-search/docker-compose.yml][whoogle-location]]
|
||||
** rustdesk: [[~/rustdesk/docker-compose.yml][rustdesk-location]]
|
||||
39
20230417115712-list_of_docker_containers.org
Normal file
39
20230417115712-list_of_docker_containers.org
Normal file
@@ -0,0 +1,39 @@
|
||||
:PROPERTIES:
|
||||
:ID: add49718-44d1-4576-9e5a-aea5d025c53b
|
||||
:END:
|
||||
#+title: list of docker containers
|
||||
A list of all deployed and undeployed [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][containers]] of all [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][servers]]
|
||||
[[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]]
|
||||
[[id:ae46c92b-d5fd-4172-944f-9165a61d2217][maria_DB]]
|
||||
[[id:d7b03403-db35-465a-b4a0-fce27733df5a][whoogle-container]]
|
||||
[[id:46107a80-aa2d-4861-8362-6836c547dda4][rustdesk]]
|
||||
[[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]]
|
||||
[[id:e1eac0f9-5b66-436a-8624-d5ea49e1204b][wordpress]]
|
||||
[[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab-docker]]
|
||||
[[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer-docker]]
|
||||
flame
|
||||
[[id:29c8ec85-9de8-4ace-8c52-13a086341861][rocket-chat]]
|
||||
[[id:91deae5f-e670-4463-8fee-688212d13030][mongo-db]]
|
||||
mysql
|
||||
[[id:94daf0fc-da84-4b90-a200-7b147f721e2a][open-vpn]]
|
||||
[[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]]
|
||||
[[id:80666401-173e-4828-9c29-552dab716946][dns]]
|
||||
pihole
|
||||
heimdall
|
||||
gotify
|
||||
uptime-kuma
|
||||
netbox
|
||||
ollama
|
||||
n8n
|
||||
openwebui
|
||||
paperless-ngx
|
||||
paperless-ai
|
||||
traefik
|
||||
grafana
|
||||
prometheus
|
||||
gitea
|
||||
local content share
|
||||
it-tools
|
||||
passbolt
|
||||
|
||||
|
||||
8
20230417120355-container.org
Normal file
8
20230417120355-container.org
Normal file
@@ -0,0 +1,8 @@
|
||||
:PROPERTIES:
|
||||
:ID: 936191f2-696b-4d9a-96ad-c8449778ae26
|
||||
:END:
|
||||
#+title: container
|
||||
|
||||
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
|
||||
|
||||
Container images become containers at runtime and in the case of Docker containers – images become containers when they run on Docker Engine. Available for both Linux and Windows-based applications, containerized software will always run the same, regardless of the infrastructure. Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging.
|
||||
51
20230418135928-nginx.org
Normal file
51
20230418135928-nginx.org
Normal file
@@ -0,0 +1,51 @@
|
||||
:PROPERTIES:
|
||||
:ID: 0b50e19a-0608-434c-a57c-fd719e3bb8bf
|
||||
:END:
|
||||
#+title: nginx
|
||||
nginx is a reverse proxy [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][webserver]]. Runs as [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]]
|
||||
* the config
|
||||
** [[id:e1eac0f9-5b66-436a-8624-d5ea49e1204b][wordpress]]
|
||||
*** ~/wordpress-compose/nginx/wordpress.conf
|
||||
*** ~/wordpress-compose/docker-compose.yml
|
||||
* Parameter:
|
||||
For uploading pluig-ins which bigger than 2MB on the wordpress-local-site:
|
||||
in wordpress.conf the following line under "server":
|
||||
max_body_size 25M;
|
||||
The application should look like this:
|
||||
#+begin_src
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name wp-hakase.co;
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_busy_buffers_size 24k;
|
||||
proxy_buffers 64 4k;
|
||||
client_max_body_size 25M;
|
||||
access_log /var/log/nginx/hakase-access.log;
|
||||
error_log /var/log/nginx/hakase-error.log;
|
||||
|
||||
location / {
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass wordpress:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
It is of utmost importance to set the reverse prtoxy to the same [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]] as the other [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]] that should be used with the reverse proxy. This can be done inside the [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] file or via the
|
||||
#+begin_src bash
|
||||
--network "<network name>"
|
||||
#+end_src
|
||||
of the docker run command.
|
||||
35
20230418142242-wordpress.org
Normal file
35
20230418142242-wordpress.org
Normal file
@@ -0,0 +1,35 @@
|
||||
:PROPERTIES:
|
||||
:ID: e1eac0f9-5b66-436a-8624-d5ea49e1204b
|
||||
:END:
|
||||
#+title: wordpress
|
||||
wordpress is a framework to create your own website. Runs as [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]] and is hosted with [[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]]
|
||||
* the config
|
||||
** ~/wordpress-compose/docker-compose.yml
|
||||
* Parameter:
|
||||
follow the steps explained under [[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]]
|
||||
Additionally create the the file wordpress.ini with the following content:
|
||||
#+begin_src
|
||||
file_uploads = On
|
||||
memory_limit = 256M
|
||||
upload_max_filesize = 64M
|
||||
post_max_size = 64M
|
||||
max_execution_time = 300
|
||||
max_input_time = 1000
|
||||
#+end_src
|
||||
To load this file into the wordpress container add this line to your Volumes of the wordpress service in the [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] compose file listed above:
|
||||
#+begin_src
|
||||
volumes:
|
||||
- ./wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini
|
||||
#+end_src
|
||||
put the wordpress.ini file in the [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] same folder where the compose file is and take start the docker containers with
|
||||
|
||||
#+begin_src
|
||||
docker-compose up -d
|
||||
#+end_src
|
||||
if the Container is already running, take it down first with
|
||||
#+begin_src
|
||||
docker-compose down
|
||||
#+end_src
|
||||
|
||||
* Run wp with reverse Proxy
|
||||
To run wp with rp configuration does not work out of the box. This [[https://manios.org/2014/04/12/nginx-https-reverse-proxy-to-wordpress-with-apache-http-and-different-port][Blog]] gives a detailed how to on the configuration with wp and nginx.
|
||||
14
20230420004718-docker_networks.org
Normal file
14
20230420004718-docker_networks.org
Normal file
@@ -0,0 +1,14 @@
|
||||
:PROPERTIES:
|
||||
:ID: 9d04fac3-89ae-4a96-b326-9ae7e2c22118
|
||||
:END:
|
||||
#+title: docker-networks
|
||||
A [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] network is a virtual network that connects [[id:936191f2-696b-4d9a-96ad-c8449778ae26][containers]]. Without this network no two docker containers could interact with eachother. In [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] the network is set with:
|
||||
#+begin_src
|
||||
networks:
|
||||
- <name of network>
|
||||
#+end_src
|
||||
If you don't specify a network in the compse file the default network is invoked, so that the listed container can interact. When the container is set up wit the docker run command, the network is specified with the added parameter:
|
||||
#+begin_src
|
||||
--network "<name of network>"
|
||||
#+end_src
|
||||
The usage of networks comes in handy when you want to connect two containers like [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]] and [[id:ae46c92b-d5fd-4172-944f-9165a61d2217][maria_DB]]. in docker-compos a network can be set as internal (define the network inside the compose file) or external (add the containers to an existing network).
|
||||
30
20230420005613-maria_db.org
Normal file
30
20230420005613-maria_db.org
Normal file
@@ -0,0 +1,30 @@
|
||||
:PROPERTIES:
|
||||
:ID: ae46c92b-d5fd-4172-944f-9165a61d2217
|
||||
:END:
|
||||
#+title: maria_DB
|
||||
Maria_DB is a [[id:df046fd7-1f82-4e12-9065-56d222f56408][dockerized]] Databse, that can be connected to many containers like [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]]. The Database has to be listed inside a [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose file]] or must be connected to the other container via the same [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]].
|
||||
|
||||
|
||||
* connect to maria DB
|
||||
If yiu want to connect to the Database to make take some manual actions, go into [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer-docker]] UI and connect to the docker cointainer via virtual bash shell. Log in as [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]]
|
||||
and issue the command:
|
||||
|
||||
#+begin_src bash
|
||||
mysql -u root -p
|
||||
#+end_src
|
||||
Insert your root password and use the command ~connect <databse name>~ to connect to your database.
|
||||
|
||||
** usecases
|
||||
You can erase entries from the blacklist of nextcloud (for too many login approaches to the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]])
|
||||
*** to show brute force entries
|
||||
#+begin_src bash
|
||||
SELECT * FROM oc_bruteforce_attempts;
|
||||
#+end_src
|
||||
*** To erase entries
|
||||
#+begin_src bash
|
||||
DELETE FROM oc_bruteforce_attempts WHERE IP="xxx.xxx.xxx.xxx";
|
||||
#+end_src
|
||||
*** erase the blocklist entirely
|
||||
#+begin_src bash
|
||||
DELETE FROM oc_bruteforce_attempts;
|
||||
#+end_src
|
||||
21
20230420014604-letsencrypt_helper.org
Normal file
21
20230420014604-letsencrypt_helper.org
Normal file
@@ -0,0 +1,21 @@
|
||||
:PROPERTIES:
|
||||
:ID: 83ce6fe7-aadc-4f2f-9c1e-bc73ba7590b8
|
||||
:END:
|
||||
#+title: letsencrypt-helper
|
||||
[[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]] that lets you use [[id:95c8982d-e104-43a2-9bb2-fd7e1c3204f2][SSL]] [[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificates]]. works good with [[id:0b50e19a-0608-434c-a57c-fd719e3bb8bf][nginx]] and [[id:90e3b8a2-b523-4044-af6f-fd4a559b2d7f][traefik]] as [[id:98642623-d85a-432c-90d5-bfff7ead8c7b][reverse proxies]]. If you self sign your ssl [[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificate]]certificates you could use this code in [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] (not tested):
|
||||
#+begin_src bash
|
||||
# self signed
|
||||
omgwtfssl:
|
||||
image: paulczar/omgwtfssl
|
||||
restart: "no"
|
||||
volumes:
|
||||
- certs:/certs
|
||||
environment:
|
||||
- SSL_SUBJECT=servhostname.local
|
||||
- CA_SUBJECT=my@example.com
|
||||
- SSL_KEY=/certs/servhostname.local.key
|
||||
- SSL_CSR=/certs/servhostname.local.csr
|
||||
- SSL_CERT=/certs/servhostname.local.crt
|
||||
networks:
|
||||
- proxy-tier
|
||||
#+end_src
|
||||
79
20230421105427-arco_linux.org
Normal file
79
20230421105427-arco_linux.org
Normal file
@@ -0,0 +1,79 @@
|
||||
:PROPERTIES:
|
||||
:ID: 5fada795-19a3-4ba6-97c0-0b70bd728a2f
|
||||
:END:
|
||||
#+title: Arco-Linux
|
||||
#+filetags: :INDEX:ARCO:
|
||||
|
||||
Linux (/ˈlɪnʊks/ LIN-uuks) is a family of open-source Unix-like operating systems based on the Linux [[id:33388695-657c-44a2-8359-c7b6137233d0][kernel]], an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically [[id:b7c4f849-d1b1-4837-8634-82f6976a1473][packaged]] as a Linux distribution (distro), which includes the kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses and recommends the name "GNU/Linux" to emphasize the use and importance of GNU software in many distributions, causing some controversy.
|
||||
|
||||
Popular Linux distributions include Debian, Fedora Linux, Arch Linux and Ubuntu. Commercial distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise. Desktop Linux distributions include a windowing system such as [[id:98eade62-125a-40f1-b572-ff3e107ca4fa][x11]] or Wayland, and a desktop environment such as GNOME or KDE Plasma. Distributions intended for servers may omit graphics altogether, or include a solution stack such as LAMP. Because Linux is freely redistributable, anyone may create a distribution for any purpose.
|
||||
|
||||
[[id:79f5df8e-feee-4c91-916a-c23ba40818ee][ARCO]]-Linux is the main operating system of Madrigal Industrial Solutions. It is a derivative of Arch Linux with some tweaks and can be installed with the programms of Choice. If any Problems arise there is a very informative website [[https://arcolinux.com/ ][website]] with almost any programm pre installed in the arco package.
|
||||
|
||||
* Pre-Installed Programms
|
||||
** [[id:aac10dba-6276-414e-a3ff-7887528c7918][x-server]]
|
||||
*** [[id:1cb23984-71e0-4f08-ae48-3c2e1e79622f][xorg]]
|
||||
** [[id:0613de5a-4b4f-429a-ba52-09d63c0a92d6][Window-Manager]]
|
||||
*** [[id:0268b9e5-b51a-41e7-baaf-f01d00eb99f2][openbox]]
|
||||
** [[id:a6e49794-6de9-4bc1-b448-77e97600d3f3][Login-Manager]]
|
||||
*** [[id:60a92fe1-7c58-4d88-b16d-d5a35ab0157a][lightDM]]
|
||||
** [[id:b7c4f849-d1b1-4837-8634-82f6976a1473][package-manager]]
|
||||
*** [[id:d88b7b60-742d-4bc0-8b48-3fbcfad2373d][pacman]]
|
||||
** [[id:b75bbc20-fc24-44b9-be3a-8dbcdcbea63e][Arch-User-Repository]]
|
||||
** [[id:294012b3-5b0a-4527-a981-2f397378c0d2][AUR-Helpers]]
|
||||
*** Paru
|
||||
*** yay
|
||||
** Filemanager
|
||||
*** [[id:cdfedfb2-0fd8-4e31-b1b0-9831a7968e5f][pcmanFM]]
|
||||
*** [[id:15c8b750-ea77-4845-8517-c0047e2a4455][nnn]]
|
||||
** app launcher
|
||||
*** [[id:1ef7425a-812f-45d1-812c-6a6ca6397289][dmenu]]
|
||||
** Desktop Drawing Application
|
||||
** Text Editors
|
||||
*** [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]]
|
||||
** Lockscreen and logout manager
|
||||
*** [[id:71c7b2c6-8601-446c-bdbb-3598d74be178][betterlockscreen]]
|
||||
*** [[id:2f4f9e1b-ed75-4e35-b6db-b26ab8f60c15][archlinux-logout]]
|
||||
** Keymanagement and GPG
|
||||
*** [[id:404dad63-5eb6-4328-ae85-475874b48ac4][keychain]]
|
||||
** Sound
|
||||
*** [[id:efaaf6e8-b638-497b-bfc2-366d64f2413b][pulse-audio]]
|
||||
** [[id:d60f8060-4557-42d5-831d-b68bfb42df59][Mimetypes]]
|
||||
*** [[id:6c1849a8-ab61-4ab1-b2e8-97d1d0dfb0fd][xdg]]
|
||||
** Change [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]]
|
||||
*** [[id:065cec59-82f7-42a5-bcb0-fef56004de40][arch-chroot]]
|
||||
** Scheduling Tasks
|
||||
*** [[id:94b5e3fb-bbf9-40ec-902f-9e15c74c5f99][crontab]]
|
||||
|
||||
|
||||
* Post-Installed Programms
|
||||
** [[id:574b9e96-1a86-4e43-878c-30534e0dcecb][MBSE (Modell based system engineering)]]
|
||||
*** [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab]]
|
||||
*** [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]]
|
||||
*** [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]]
|
||||
*** [[id:6acf9122-b289-44e4-87e1-c3dfb5c7aeb2][salome]]
|
||||
*** [[id:a4953b2b-81de-4c15-91e7-10d0cb5f22dd][freeCAD]]
|
||||
*** [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]]
|
||||
*** [[id:a6d22357-9bed-422e-9805-0478fbeb3e99][Paraview]]
|
||||
** Communications & Secruity
|
||||
*** [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]] & [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]]
|
||||
*** [[id:a88d9210-6085-4def-982a-d4a6ff391a2e][linphone]]
|
||||
*** [[id:29c8ec85-9de8-4ace-8c52-13a086341861][rocket-chat]]
|
||||
*** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] & [[id:94daf0fc-da84-4b90-a200-7b147f721e2a][open-vpn]]
|
||||
*** [[id:80666401-173e-4828-9c29-552dab716946][dns]] & [[id:90e3b8a2-b523-4044-af6f-fd4a559b2d7f][traefik_docker]]
|
||||
** Cloud & Backup
|
||||
*** [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]]
|
||||
*** [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]]
|
||||
** [[id:5ddb50eb-4257-44cb-9193-1606b348e886][terminal emulators]]
|
||||
*** [[id:b65b3f3a-e0a3-49ca-9005-5a1055c07cdf][kitty]]
|
||||
** [[id:b6d24dd6-285f-4c03-883c-dc77b78c652a][shell]]
|
||||
*** [[id:af92f7a3-705c-491e-955e-2f04206da220][fish]]
|
||||
** remote server control
|
||||
*** [[id:46107a80-aa2d-4861-8362-6836c547dda4][rustdesk]]
|
||||
** file transformation
|
||||
*** [[id:75ea690d-deee-4592-ae99-1c2385c208fb][pandoc]]
|
||||
** word processing
|
||||
*** [[id:b674e49e-0818-4084-8690-3805c8345650][TexLive]]
|
||||
*** [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]]
|
||||
** password service
|
||||
*** [[id:308a3798-0f57-4024-a561-c6d8153348e9][keepassxc]]
|
||||
39
20230421112433-lightdm.org
Normal file
39
20230421112433-lightdm.org
Normal file
@@ -0,0 +1,39 @@
|
||||
:PROPERTIES:
|
||||
:ID: 60a92fe1-7c58-4d88-b16d-d5a35ab0157a
|
||||
:END:
|
||||
#+title: lightDM
|
||||
|
||||
LightDM is a cross-desktop [[id:a6e49794-6de9-4bc1-b448-77e97600d3f3][login-manager]]. Its key features are:
|
||||
|
||||
Cross-desktop - supports different desktop technologies.
|
||||
Supports different display technologies (X, Mir, Wayland ...).
|
||||
Lightweight - low memory usage and high performance.
|
||||
Supports guest sessions.
|
||||
Supports remote login (incoming - XDMCP, VNC, outgoing - XDMCP, PAM).
|
||||
Comprehensive test suite.
|
||||
Low code complexity.
|
||||
|
||||
LightDM handles the autoligin feature on Linux, which can be enabled in the lightdm conf file located in:
|
||||
#+begin_src bash
|
||||
/etc/lightdm/lightdm.conf
|
||||
#+end_src
|
||||
To enable this feature search for the autologin entry inside lightdm.conf and change it as follows:
|
||||
from
|
||||
#+begin_src bash
|
||||
#autologin-guest=false
|
||||
#autologin-user=user
|
||||
#autologin-user-timeout=0
|
||||
#+end_src
|
||||
to
|
||||
#+begin_src bash
|
||||
autologin-guest=false
|
||||
autologin-user=<your_username>
|
||||
autologin-user-timeout=0
|
||||
#+end_src
|
||||
Because the config is located in the [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] folder, you have have root priviliges to change the setting ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
|
||||
Additionally the user has to be part of the autologin group. To add the user to the group type the following command in the command line;
|
||||
#+begin_src bash
|
||||
sudo groupadd -r autologin
|
||||
sudo gpasswd -a username autologin
|
||||
#+end_src
|
||||
the first command creates the group if the group does not exist yet. The second command adds the user.
|
||||
19
20230421113732-login_manager.org
Normal file
19
20230421113732-login_manager.org
Normal file
@@ -0,0 +1,19 @@
|
||||
:PROPERTIES:
|
||||
:ID: a6e49794-6de9-4bc1-b448-77e97600d3f3
|
||||
:END:
|
||||
#+title: login-manager
|
||||
#+filetags: :basics:system:
|
||||
|
||||
A display manager, or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. There are various implementations of display managers, just as there are various types of window managers and desktop environments. There is usually a certain amount of customization and themeability available with each one.
|
||||
|
||||
The responsibilities of a display manager are:
|
||||
|
||||
Starting and managing local instances of the [[id:aac10dba-6276-414e-a3ff-7887528c7918][x-server]].
|
||||
Authenticating users.
|
||||
Starting and managing user sessions. Common use cases:
|
||||
|
||||
Starting a single X server on boot and starting a session (kiosk mode).
|
||||
|
||||
Starting a single X server instance on boot, displaying a greeter [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] (username and password), and starting the user session when connected (traditional).
|
||||
Supporting multiple simultaneous logins by exposing what users are logged in, and starting new X servers for each user (user switching).
|
||||
Running a thin-[[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] server by allowing X servers to connect using XDMCP, and connecting greeters and sessions to those X servers.
|
||||
29
20230421114311-window_manager.org
Normal file
29
20230421114311-window_manager.org
Normal file
@@ -0,0 +1,29 @@
|
||||
:PROPERTIES:
|
||||
:ID: 0613de5a-4b4f-429a-ba52-09d63c0a92d6
|
||||
:END:
|
||||
#+title: window-manager
|
||||
|
||||
A window manager (WM) is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface ([[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]]) in a operating system like [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]]. It can be part of a desktop environment (DE) or be used standalone.
|
||||
|
||||
Note: Window managers are unique to [[id:1cb23984-71e0-4f08-ae48-3c2e1e79622f][xorg]]. The equivalent of window managers on Wayland are called compositors because they also act as compositing window managers.
|
||||
|
||||
|
||||
Window managers are [[id:1cb23984-71e0-4f08-ae48-3c2e1e79622f][X]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][clients]] that control the appearance and behaviour of the frames ("windows") where the various graphical applications are drawn. They determine the border, title bar, size, and ability to resize windows, and often provide other functionality such as reserved areas for sticking dockapps like Window Maker, or the ability to tab windows like Fluxbox. Some window managers are even bundled with simple utilities like menus to start programs or to configure the window manager itself.
|
||||
|
||||
The Extended Window Manager Hints specification is used to allow window managers to interact in standard ways with the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] and the other clients.
|
||||
|
||||
Some window managers are developed as part of a more comprehensive desktop environment, usually allowing the other provided applications to better interact with each other, giving a more consistent experience to the user, complete with features like desktop icons, fonts, toolbars, wallpapers, or desktop widgets.
|
||||
|
||||
Other window managers are instead designed to be used standalone, giving the user complete freedom over the choice of the other applications to be used. This allows the user to create a more lightweight and customized environment, tailored to their own specific needs. "Extras" like desktop icons, toolbars, wallpapers, or desktop widgets, if needed, will have to be added with additional dedicated applications.
|
||||
|
||||
Some standalone window managers can be also used to replace the default window manager of a desktop environment, just like some desktop environment–oriented window managers can be used standalone too.
|
||||
|
||||
Prior to installing a window manager, a functional [[id:aac10dba-6276-414e-a3ff-7887528c7918][x-server]] installation is required.
|
||||
|
||||
* __Types__
|
||||
** Stacking
|
||||
(aka floating) window managers provide the traditional desktop metaphor used in commercial operating systems like Windows and macOS. Windows act like pieces of paper on a desk, and can be stacked on top of each other. For available Arch Wiki pages see Category:Stacking window managers.
|
||||
** Tiling window managers
|
||||
"tile" the windows so that none are overlapping. They usually make very extensive use of key-bindings and have less (or no) reliance on the mouse. Tiling window managers may be manual, offer predefined layouts, or both. For available Arch Wiki pages see Category:Tiling window managers.
|
||||
** Dynamic window managers
|
||||
can dynamically switch between tiling or floating window layout. For available Arch Wiki pages see Category:Dynamic window managers.
|
||||
7
20230421114709-x_server.org
Normal file
7
20230421114709-x_server.org
Normal file
@@ -0,0 +1,7 @@
|
||||
:PROPERTIES:
|
||||
:ID: aac10dba-6276-414e-a3ff-7887528c7918
|
||||
:END:
|
||||
#+title: x-server
|
||||
#+filetags: :basics:ARCO:
|
||||
|
||||
X is the generic name for the X Window System display server provided by [[id:1cb23984-71e0-4f08-ae48-3c2e1e79622f][xorg]]. It is frequently a link or a copy of the appropriate [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] binary for driving the most frequently used server on a given machine. X can be [[id:98eade62-125a-40f1-b572-ff3e107ca4fa][forwarded]] via [[id:422e07f8-c888-460f-849e-76d451946045][ssh]].
|
||||
11
20230421114858-xorg.org
Normal file
11
20230421114858-xorg.org
Normal file
@@ -0,0 +1,11 @@
|
||||
:PROPERTIES:
|
||||
:ID: 1cb23984-71e0-4f08-ae48-3c2e1e79622f
|
||||
:END:
|
||||
#+title: xorg
|
||||
#+filetags: :basics:ARCO:
|
||||
|
||||
Xorg (commonly referred to as simply X) is the most popular display [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] among [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] users. Its ubiquity has led to making it an ever-present requisite for [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] applications, resulting in massive adoption from most distributions. See the Xorg Wikipedia article or visit the Xorg website for more details.
|
||||
|
||||
For the alternative and potential successor.
|
||||
|
||||
The X.Org project provides an open source implementation of the X Window System ([[id:aac10dba-6276-414e-a3ff-7887528c7918][x-server]]). The development work is being done in conjunction with the freedesktop.org community. The X.Org Foundation is the educational non-profit corporation whose Board serves this effort, and whose Members lead this work.
|
||||
15
20230421115650-openbox.org
Normal file
15
20230421115650-openbox.org
Normal file
@@ -0,0 +1,15 @@
|
||||
:PROPERTIES:
|
||||
:ID: 0268b9e5-b51a-41e7-baaf-f01d00eb99f2
|
||||
:END:
|
||||
#+title: openbox
|
||||
Openbox is a lightweight, powerful, and highly configurable stacking [[id:0613de5a-4b4f-429a-ba52-09d63c0a92d6][window-manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique desktop environment, or within other integrated desktop environments such as KDE and Xfce, as an alternative to the window managers they provide. The LXDE desktop environment is itself built around Openbox.
|
||||
|
||||
Openbox is a highly configurable, next generation window manager with extensive standards support.
|
||||
|
||||
The *box visual style is well known for its minimalistic appearance. Openbox uses the *box visual style, while providing a greater number of options for theme developers than previous *box implementations. The theme documentation describes the full range of options found in Openbox themes.
|
||||
|
||||
Openbox lets you bring the latest applications outside of a full desktop environment. Most modern applications have been written with GNOME and KDE in mind. With support for the latest freedesktop.org standards, as well as careful adherence to previous standards, Openbox provides an environment where applications work the way they were designed to.
|
||||
|
||||
Openbox is a highly configurable window manager. It allows you to change almost every aspect of how you interact with your desktop and invent completely new ways to use and control it. It can be like a video game for controlling windows. But Openbox can also be kept extremely simple, as it is in the default setup, meaning that it can suit just about anybody. Openbox gives you control without making you do everything.
|
||||
|
||||
Openbox makes desktop environments better. By running Openbox inside the GNOME or K desktop environments, you can combine their ease and functionality with the power of Openbox. Your desktop becomes cleaner and faster, and is in your control, when you use Openbox.
|
||||
28
20230421123911-package_manager.org
Normal file
28
20230421123911-package_manager.org
Normal file
@@ -0,0 +1,28 @@
|
||||
:PROPERTIES:
|
||||
:ID: b7c4f849-d1b1-4837-8634-82f6976a1473
|
||||
:END:
|
||||
#+title: package-manager
|
||||
|
||||
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
|
||||
|
||||
A package manager deals with packages, distributions of software and data in archive files. Packages contain metadata, such as the software's name, description of its purpose, version number, vendor, checksum (preferably a cryptographic hash function), and a list of dependencies necessary for the software to run properly. Upon installation, metadata is stored in a local package database. Package managers typically maintain a database of software dependencies and version information to prevent software mismatches and missing prerequisites. They work closely with software repositories, binary repository managers, and app stores.
|
||||
|
||||
Package managers are designed to eliminate the need for manual installs and updates. This can be particularly useful for large enterprises whose operating systems typically consist of hundreds or even tens of thousands of distinct software packages.
|
||||
|
||||
* Functions
|
||||
A software package is an archive file containing a computer program as well as necessary metadata for its deployment. The computer program can be in source code that has to be compiled and built first. Package metadata include package description, package version, and dependencies (other packages that need to be installed beforehand).
|
||||
|
||||
Package managers are charged with the task of finding, installing, maintaining or uninstalling software packages upon the user's command. Typical functions of a package management system include:
|
||||
|
||||
Working with file archivers to extract package archives
|
||||
Ensuring the integrity and authenticity of the package by verifying their checksums and digital [[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificates]], respectively
|
||||
Looking up, downloading, installing, or updating existing software from a software repository or app store
|
||||
Grouping packages by function to reduce user confusion
|
||||
Managing dependencies to ensure a package is installed with all packages it requires, thus avoiding "dependency hell"
|
||||
|
||||
* Uses
|
||||
There are many instances where a package manager is used. If a programm can be modular upgraded there is usually a package manager and some kind of [[id:b75bbc20-fc24-44b9-be3a-8dbcdcbea63e][Repository]] for those packages used.
|
||||
** examples
|
||||
*** [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Linux]]
|
||||
*** [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]]
|
||||
*** [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]]
|
||||
23
20230421124130-pacman.org
Normal file
23
20230421124130-pacman.org
Normal file
@@ -0,0 +1,23 @@
|
||||
:PROPERTIES:
|
||||
:ID: d88b7b60-742d-4bc0-8b48-3fbcfad2373d
|
||||
:END:
|
||||
#+title: pacman
|
||||
|
||||
The pacman [[id:b7c4f849-d1b1-4837-8634-82f6976a1473][package-manager]] is one of the major distinguishing features of Arch Linux and [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] . It combines a simple binary package format with an easy-to-use build system. The goal of pacman is to make it possible to easily manage packages, whether they are from the official repositories or the user's own builds.
|
||||
|
||||
Pacman keeps the system up-to-date by synchronizing package lists with the master [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]. This server/[[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] model also allows the user to download/install packages with a simple command, complete with all required dependencies.
|
||||
* Installing specific packages
|
||||
To install a single package or list of packages, including dependencies, issue the following command:
|
||||
#+begin_src bash
|
||||
pacman -S package_name1 package_name2
|
||||
#+end_src
|
||||
* upgrading packages
|
||||
Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. The following command synchronizes the repository databases and updates the system's packages, excluding "local" packages that are not in the configured repositories:
|
||||
#+begin_src
|
||||
pacman -Syu
|
||||
#+end_src
|
||||
* ask no permissions
|
||||
#+begin_src
|
||||
pacman -Suy --noconfirm
|
||||
#+end_src
|
||||
|
||||
8
20230421125023-arch_user_repository.org
Normal file
8
20230421125023-arch_user_repository.org
Normal file
@@ -0,0 +1,8 @@
|
||||
:PROPERTIES:
|
||||
:ID: b75bbc20-fc24-44b9-be3a-8dbcdcbea63e
|
||||
:END:
|
||||
#+title: Arch-User-Repository
|
||||
|
||||
The Arch User Repository (AUR) is a community-driven repository for Arch users. It contains package descriptions (PKGBUILDs) that allow you to compile a package from source with makepkg and then install it via [[id:d88b7b60-742d-4bc0-8b48-3fbcfad2373d][pacman]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the community repository. This document explains how users can access and utilize the AUR.
|
||||
|
||||
A good number of new packages that enter the official repositories start in the AUR. In the AUR, users are able to contribute their own package builds (PKGBUILD and related files). The AUR community has the ability to vote for packages in the AUR. If a package becomes popular enough — provided it has a compatible license and good packaging technique — it may be entered into the community repository (directly accessible by pacman or abs).
|
||||
13
20230421125542-aur_helpers.org
Normal file
13
20230421125542-aur_helpers.org
Normal file
@@ -0,0 +1,13 @@
|
||||
:PROPERTIES:
|
||||
:ID: 294012b3-5b0a-4527-a981-2f397378c0d2
|
||||
:END:
|
||||
#+title: AUR-Helpers
|
||||
|
||||
AUR helpers automate usage of the [[id:b75bbc20-fc24-44b9-be3a-8dbcdcbea63e][Arch-User-Repository]]. In particular, they may automate the following tasks:
|
||||
- searching for packages published on the AUR;
|
||||
- resolving of dependencies between AUR packages;
|
||||
- retrieve and build AUR packages;
|
||||
- retrieve web content, such as user comments;
|
||||
- submission of AUR packages.
|
||||
Pacman only handles updates for pre-built packages in its repositories. AUR packages are redistributed in form of PKGBUILDs and need an AUR helper to automate the re-build process. However, keep in mind that a rebuild of a package may be required when its shared library dependencies are updated, not only when the package itself is updated.
|
||||
|
||||
6
20230421130019-pcmanfm.org
Normal file
6
20230421130019-pcmanfm.org
Normal file
@@ -0,0 +1,6 @@
|
||||
:PROPERTIES:
|
||||
:ID: cdfedfb2-0fd8-4e31-b1b0-9831a7968e5f
|
||||
:END:
|
||||
#+title: pcmanFM
|
||||
|
||||
PCMan File Manager (PCManFM) is a file manager application, developed by Hong Jen Yee (Chinese: 洪任諭; pinyin: Hóng Rènyù) from Taiwan, which is meant to be a replacement for GNOME Files, Dolphin and Thunar.[3][4] PCManFM is the standard file manager in LXDE, also developed by the same author in conjunction with other developers. Since 2010, PCManFM has undergone a complete rewrite from scratch; build instructions, setup and configuration have changed in the process.
|
||||
21
20230421130256-nnn.org
Normal file
21
20230421130256-nnn.org
Normal file
@@ -0,0 +1,21 @@
|
||||
:PROPERTIES:
|
||||
:ID: 15c8b750-ea77-4845-8517-c0047e2a4455
|
||||
:END:
|
||||
#+title: nnn
|
||||
|
||||
nnn (also stylized as n³) is a portable terminal file manager written in C. It is easily extensible via its flat text plugin system where you can add your own language-agnostic scripts alongside already available plugins, including a (neo)vim plugin. nnn features native archiving/decompression to and from commonly installed formats such as xz, disk usage analysis and a fuzzy app launcher, a batch file renamer and a file picker through its plugin architecture. nnn supports instant search-as-you-type with regex (or simple string) filters and a navigate-as-you-type mode for continuous navigation in filter mode with directory auto-select. Also supported are contexts, bookmarks, multiple sorting options, SSHFS, batch operations on selections (a group of selected files) and a lot more.
|
||||
|
||||
Despite its capabilities, nnn is designed to be easy to use and is configured by way of environment variables without the use of a configuration file.
|
||||
|
||||
There is a function, that allows nnn to close and move the command line folder to the location last visited before closing nnn. For that you have to invoke nnn only with the letter ~n~. The function is described in the [[id:af92f7a3-705c-491e-955e-2f04206da220][fish]] config file.
|
||||
#+begin_src bash
|
||||
set -u NNN_TMPFILE "~/.config/nnn/.lastd"
|
||||
export NNN_TMPFILE
|
||||
|
||||
function n
|
||||
nnn $argv
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm $NNN_TMPFILE
|
||||
end
|
||||
#+end_src
|
||||
7
20230421130445-dmenu.org
Normal file
7
20230421130445-dmenu.org
Normal file
@@ -0,0 +1,7 @@
|
||||
:PROPERTIES:
|
||||
:ID: 1ef7425a-812f-45d1-812c-6a6ca6397289
|
||||
:END:
|
||||
#+title: dmenu
|
||||
|
||||
dmenu is a fast and lightweight dynamic menu for [[id:1cb23984-71e0-4f08-ae48-3c2e1e79622f][X]]. It reads arbitrary text from stdin, and creates a menu with one item for each line. The user can then select an item, through the arrow keys or typing a part of the name, and the line is printed to stdout. dmenu_run is a wrapper that ships with the dmenu distribution that allows its use as an application launcher.
|
||||
|
||||
14
20230421154858-nextcloud_docker_container.org
Normal file
14
20230421154858-nextcloud_docker_container.org
Normal file
@@ -0,0 +1,14 @@
|
||||
:PROPERTIES:
|
||||
:ID: 3bd6dae2-5fbb-4045-80c0-4dbed0f02df1
|
||||
:END:
|
||||
#+title: nextcloud-docker-container
|
||||
|
||||
|
||||
Actual command for the [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]] [[id:936191f2-696b-4d9a-96ad-c8449778ae26][container]].
|
||||
|
||||
|
||||
#+begin_src bash
|
||||
sudo docker run --name madrigal_cloud -v "/home/smad/madrigal_cloud/data:/var/www/html/data" -v "/home/smad/madrigal_cloud/apps:/var/www/html/custom_apps" -v "/home/smad/madrigal_cloud:/var/www/html" -v "/home/smad/madrigal_cloud/config:/var/www/html/config" --network net -e VIRTUAL_HOST="nextcloud.app.green-chem.net" -e LETSENCRYPT_HOST="nextcloud.app.green-chem.net" -e MYSQL_HOST="madrigal_DB" -e MYSQL_PASSWORD='TUC0815AM_?!' -e MYSQL_ROOT_PASSWORD='TUC0815AM_?!' -e MYSQL_DATABASE="nextcloud" -e MYSQL_USER="nextcloud" -d nextcloud:latest
|
||||
#+end_src
|
||||
|
||||
After creation the container has to be added to the ~nextc~ [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]] for it to work with the Database.
|
||||
19
20230504094026-freepbx.org
Normal file
19
20230504094026-freepbx.org
Normal file
@@ -0,0 +1,19 @@
|
||||
:PROPERTIES:
|
||||
:ID: 5c50958e-e38d-4f6c-b111-2a50a48cc1de
|
||||
:END:
|
||||
#+title: freepbx
|
||||
#+filetags:COMMUNICATION:programme:telephone:network:
|
||||
|
||||
Freepbx is a web-based open-source graphical user interface ([[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]]) that manages Asterisk, a voice over [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]] and telephony [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]. FreePBX is licensed under the GNU General Public License version 3. It is a component of the FreePBX Distro, which is an independently maintained Linux system derived from the source code of the CentOS distribution, having Asterisk pre-installed. It is also included in various third-party distributions such as The FreePBX Distro and AsteriskNow. FreePBX was acquired by Schmooze.com in early 2013. That firm was, in turn, taken over by Sangoma Technologies Corporation on Jan 2, 2015. FreePBX is a community of developers and contributors who devote their work to making complicated phone system software easy to use and functional.
|
||||
|
||||
Freepbx is used as the telephony system of Madrigal Inc. and is Running in a Virtal mashine with connection to the internet. freepbx is a standalone linux distribution like [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] and can be installed on a bare metal server. To make it as uncomplicated as possible and to reproduce the system in the future it is intalled in a [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]].
|
||||
To run the VM the VM-Manager [[id:53e90634-0ed4-4db5-8f6b-04755c805f55][virtualbox]] is needed.
|
||||
|
||||
* Installation
|
||||
The installation of the software is streight forward, give the path to the [[id:c353643a-2d0f-493a-a270-a8469520390c][iso-file]] and give the VM the needed cpu cores, RAM and disk space. Those settings can be changed later. Run the iso and install freepbx. After the installation is finished, you have to shut down the VM and go into its settings. There under the headline of "Networks" change the network type to "bridge" so that a real IP is forwarded to the VM instead of a local [[id:d5ba6251-d7b1-4954-864d-c2f817aabf15][NAT]] translated IP address. After that is done, go into the Setting header of Disk and disconnect the iso from sthe VM. If that is not done, you can only get to the installation scrren again, after booting up the VM. When done, boot the VM. After the Boot is succesful the IP address of the freepb VM is shown inside a Table drawn above the command prompt. If you Type in this IP address inside your Browser you can access the admin control panel of freepbx. from there the configuration starts
|
||||
|
||||
* configuration
|
||||
Trunk:
|
||||
Extensions:
|
||||
SIP-Account:
|
||||
|
||||
47
20230504095005-virtualbox.org
Normal file
47
20230504095005-virtualbox.org
Normal file
@@ -0,0 +1,47 @@
|
||||
:PROPERTIES:
|
||||
:ID: 53e90634-0ed4-4db5-8f6b-04755c805f55
|
||||
:END:
|
||||
#+title: virtualbox
|
||||
#+filetags: :programme:linux:
|
||||
|
||||
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 3. See "About VirtualBox" for an introduction.
|
||||
|
||||
Virtuialbox is a [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]] Manager designed by oracle. It is used to host software and linux distributions in Madrigal Inc.
|
||||
|
||||
* Headless operation
|
||||
Write the following line in your terminal:
|
||||
#+begin_src
|
||||
VBoxManage list vms
|
||||
#+end_src
|
||||
After you got the names of the installed VM, write the name of the VM you want to run into the command:
|
||||
#+begin_src
|
||||
VBoxHeadless -s <name-of-VM>
|
||||
#+end_src
|
||||
|
||||
* Starting virtual machines with a service (autostart)
|
||||
Find hereafter the implementation details of a [[id:fe909b51-3cc0-4693-afc7-148ab5795d17][systemd]] service that will be used to consider a virtual machine as a service.
|
||||
|
||||
#+begin_src
|
||||
[Unit]
|
||||
Description=VBox Virtual Machine %i Service
|
||||
Requires=systemd-modules-load.service
|
||||
After=systemd-modules-load.service
|
||||
|
||||
[Service]
|
||||
User=username
|
||||
Group=vboxusers
|
||||
ExecStart=/usr/bin/VBoxManage startvm %i --type startmode
|
||||
ExecStop=/usr/bin/VBoxManage controlvm %i stopmode
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
#+end_src
|
||||
Post the information in
|
||||
|
||||
/etc/systemd/system/vboxvmservice@.service
|
||||
|
||||
and start the service
|
||||
|
||||
* VirtualBox is installed on [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][W10]] on this [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]]
|
||||
Note: virtualbox is installed to use the [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]] & [[id:a88d9210-6085-4def-982a-d4a6ff391a2e][linphone]]
|
||||
7
20230504095420-vm.org
Normal file
7
20230504095420-vm.org
Normal file
@@ -0,0 +1,7 @@
|
||||
:PROPERTIES:
|
||||
:ID: 0dea8c51-5e1e-460c-9d0a-28293d62013e
|
||||
:END:
|
||||
#+title: VM
|
||||
#+filetags: :SYSTEM-INFORMATION:systen:
|
||||
|
||||
In computing, a "virtual machine" (VM) is the virtualization or emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination of the two. The Madrigal Industrial Solutions GmbH is used virtuell machines for the operation of a [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]] telephone system.
|
||||
9
20230504095933-iso_file.org
Normal file
9
20230504095933-iso_file.org
Normal file
@@ -0,0 +1,9 @@
|
||||
:PROPERTIES:
|
||||
:ID: c353643a-2d0f-493a-a270-a8469520390c
|
||||
:END:
|
||||
#+title: iso-file
|
||||
#+filetags: :SYSTEM-INFORMATION:system:
|
||||
|
||||
An optical disc image (or ISO image, from the ISO 9660 file system used with CD-ROM media) is a disk image that contains everything that would be written to an optical disc, disk sector by disc sector, including the optical disc file system. O images are expected to contain the binary image of an optical media file system (usually ISO 9660 and its extensions or UDF), including the data in its files in binary format, copied exactly as they were stored on the disc. The data inside the ISO image will be structured according to the file system that was used on the optical disc from which it was created.
|
||||
|
||||
ISO images can be created from optical discs by disk imaging software, or from a collection of files by optical disc authoring software, or from a different disk image file by means of conversion. Software distributed on bootable discs is often available for download in ISO image format. And like any other ISO image, it may be written to an optical disc such as CD, DVD and Blu-Ray.
|
||||
11
20230504100551-nat.org
Normal file
11
20230504100551-nat.org
Normal file
@@ -0,0 +1,11 @@
|
||||
:PROPERTIES:
|
||||
:ID: d5ba6251-d7b1-4954-864d-c2f817aabf15
|
||||
:END:
|
||||
#+title: NAT
|
||||
#+filetags: :SYSTEM-INFORMATION:network:
|
||||
|
||||
Network address translation (NAT) is a method of mapping an [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]] address space into another by modifying network address information in the IP header of [[id:fde35a08-897d-4502-aead-1f4414ea639c][packets]] while they are in transit across a traffic routing device. The technique was originally used to bypass the need to assign a new address to every host when a [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][network]] was moved, or when the upstream Internet service provider was replaced, but could not [[id:d2ff2e45-e1de-4cca-9b59-dfc3ee6afa6f][route]] the network's address space. It has become a popular and essential tool in conserving global address space in the face of IPv4 address exhaustion. One Internet-[[id:d2ff2e45-e1de-4cca-9b59-dfc3ee6afa6f][rout]]able IP address of a NAT gateway can be used for an entire private network.
|
||||
|
||||
As network address translation modifies the IP address information in packets, NAT implementations may vary in their specific behavior in various addressing cases and their effect on network traffic. The specifics of NAT behavior are not commonly documented by vendors of equipment containing NAT implementations.
|
||||
|
||||
|
||||
15
20230504102911-system_information.org
Normal file
15
20230504102911-system_information.org
Normal file
@@ -0,0 +1,15 @@
|
||||
:PROPERTIES:
|
||||
:ID: aad9b5d2-8242-4b89-8ba8-bd649cf88c23
|
||||
:END:
|
||||
#+title: system-information
|
||||
#+filetags: :SYSTEM-INFORMATION:INDEX:
|
||||
|
||||
Information about systematical configuration and standards (like IP-standards, virtualization et.).
|
||||
|
||||
* System information
|
||||
** What is a [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]]?
|
||||
** What is [[id:d5ba6251-d7b1-4954-864d-c2f817aabf15][NAT]]?
|
||||
** What is an [[id:c353643a-2d0f-493a-a270-a8469520390c][iso-file]]?
|
||||
** What is an [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]]?
|
||||
** What is [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]?
|
||||
** What is [[id:98eade62-125a-40f1-b572-ff3e107ca4fa][x11-forwarding]]?
|
||||
5
20230504104240-arco_basics.org
Normal file
5
20230504104240-arco_basics.org
Normal file
@@ -0,0 +1,5 @@
|
||||
:PROPERTIES:
|
||||
:ID: 79f5df8e-feee-4c91-916a-c23ba40818ee
|
||||
:END:
|
||||
#+title: ARCO
|
||||
|
||||
82
20230504120424-wireguard.org
Normal file
82
20230504120424-wireguard.org
Normal file
@@ -0,0 +1,82 @@
|
||||
:PROPERTIES:
|
||||
:ID: daa194c9-63f1-433e-8826-a0b4e9020e16
|
||||
:END:
|
||||
#+title: wireguard
|
||||
|
||||
WireGuard® is an simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry. (from wireguard website)
|
||||
|
||||
it is on of the two [[id:1af47b07-4205-46ac-837a-ee078067328a][vpn]] technologies applied at Madrigal Inc. The other one is [[id:94daf0fc-da84-4b90-a200-7b147f721e2a][open-vpn]]
|
||||
|
||||
* Installation and key setup
|
||||
WireGuard can be install on [[id:adc016f2-a660-47d7-8974-16b74a02bcbf][Protectli]] or install just use [[id:d88b7b60-742d-4bc0-8b48-3fbcfad2373d][pacman]] or one of the other [[id:294012b3-5b0a-4527-a981-2f397378c0d2][AUR-Helpers]] to install from the repo. The package name is ~wireguard-tools~ so if you want to install it, type:
|
||||
#+begin_src
|
||||
yay wireguard-tools
|
||||
#+end_src
|
||||
in the command line
|
||||
|
||||
After the installation has taken place make a wireguard folder in the home directory of the main user (admin only). Because of security reasons, the configuration for the wireguard connection has to go into the ~/etc/wireguard/~ directory and there it can't be handled by normal users without the ~sudo~ rights. the main process can be done without the rights, but it is not recommended.
|
||||
use the command ~mkdir wireguard~ in your home folder to create an new directory.
|
||||
|
||||
After the direcory creation use the ~cd~ command to change into the new directory. For wireguard to be able to connect to your client you first need to create a set of keys for authentification/authentication, a Private and a public key. The private key you have to keep private, beecaus it is your main tool for authentication. You can create the private key with the installed wireguard tools programme:
|
||||
#+begin_src
|
||||
wg genkey > <name-of-key>.key
|
||||
#+end_src
|
||||
If you do this command the shell reminds you, that this is a plain text document viewable by eveyone und to consider usind ~uname 0077~ or ~uname 077~ . You can ignore this message, because we are going to change rights in the next step. The Key is created even tho the warning message is displayed.
|
||||
Keep this key secret and do not hand it to anyone. You can alter the viewing rigths of the key with the commands with [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priviliges or [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]] :
|
||||
#+begin_src
|
||||
sudo chown root:root <name-of-key>.key
|
||||
sudo chmod 600 <name-of-key>.key
|
||||
#+end_src
|
||||
use this key to generate the public key:
|
||||
#+begin_src
|
||||
wg pubkey < <name-of-key>.key > <name-of-pubic-key>.pub
|
||||
#+end_src
|
||||
How you name those keys is not relevant and is only for your differentiation in case you want to use multiple different wireguard connections, which is possible. The public key is as the name implies a public key und does not need to be specially protected.
|
||||
If you are setting up a [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] or multiple [[id:70899526-8b7d-4976-94fc-cc07c41e550a][clients]], recreate those commands for every member participating in the Network.
|
||||
|
||||
* Configuration
|
||||
To configure the connection you have to create a configuration file. Use the ~touch~ command to create a config file. The name of this file represents the name of the wireguard interface you want to create. So if you want your interface to be named specially, you have to name the config after that. In this example we are going to name it *w0* because this is the standard wireguard interface name. Keep in mind, that names of interfaces already in use (e.g. *eth0* and *l0*) are not possible because of naming conflicts.
|
||||
#+begin_src
|
||||
touch w0.conf
|
||||
#+end_src
|
||||
|
||||
** Peer Configuration
|
||||
As wireguard usual is a peer to peer connection between users the peers can be configured identical for a simple point to point connection. And even for more complicated variants the configuration for one client does not change dramatically
|
||||
The client can be configured as follows:
|
||||
#+begin_src bash
|
||||
2 │
|
||||
3 │ # local settings for Endpoint A (client)
|
||||
4 │ [Interface]
|
||||
5 │ PrivateKey = <private key of client A>
|
||||
6 │ Address = 10.0.0.1/32
|
||||
7 │ ListenPort = 51821
|
||||
| PreUp = iptables -I INPUT -p udp --dport 51821 -j ACCEPT
|
||||
| PostDown = iptables -D INPUT -p udp --dport 51821 -j ACCEPT
|
||||
9 │
|
||||
10 │
|
||||
11 │ # remote settings for Client B (Or the Server Host)
|
||||
12 │ [Peer]
|
||||
13 │ PublicKey = <public key of client B>
|
||||
14 │ Endpoint = <IP you want to connect with>:<port at which the other part listens on>
|
||||
15 │ AllowedIPs = <allowed IP of the other part>
|
||||
#+end_src bash
|
||||
|
||||
*** [Interface]
|
||||
This is your part of the connection
|
||||
*** PrivateKey
|
||||
This is your private key you generated beforehand
|
||||
*** Address
|
||||
This is the Address you want to have in the connection subnet, *NOT* the [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]] you have right now.
|
||||
*** ListenPort
|
||||
The [[id:f4bb4857-2112-4e10-a22e-6da1436ce7b7][port]] your connection listens on. If you do not specify a port here astandard port should be given for your connection. To eradicate errors beforehand you should choose a port nontheless.
|
||||
*** [Peer]
|
||||
This is the distant part of your connection. If you have a second or third peer you want to connect point to point to, just list another [peer] if you have listed all the data to the first one.
|
||||
*** PublicKey
|
||||
This is the public key of the peer you want to connect to
|
||||
*** Endpoint
|
||||
This is the public (not the inernal) IP of the peer you want to connect to
|
||||
*** AllowedIP
|
||||
This entry specifies which type of IP type is allowed to connect and which type of connection this IP does get (like full and spit tunneling).
|
||||
|
||||
** Server Configuration
|
||||
If there are more than two peers that need to connect to each other the wireguard vpn can be configured to tunnel all connections through a single entry point (site-server). This entry point sets the rules to allow peers to connect to ech other and use the hosted services of all connected peers.
|
||||
10
20230509081813-vpn.org
Normal file
10
20230509081813-vpn.org
Normal file
@@ -0,0 +1,10 @@
|
||||
:PROPERTIES:
|
||||
:ID: 1af47b07-4205-46ac-837a-ee078067328a
|
||||
:END:
|
||||
#+title: vpn
|
||||
|
||||
A virtual private network (VPN) is a mechanism for creating a secure connection between a computing device and a computer network, or between two [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnetworks]], using an insecure communication medium such as the public Internet.
|
||||
|
||||
A VPN can extend a private network (one that disallows or restricts public access), in such a way that it enables users of that network to send and receive data across public networks as if the public networks' devices were directly connected to the private network. The benefits of a VPN include security, reduced costs for dedicated communication lines, and greater flexibility for remote workers. VPNs are also used to bypass internet censorship. Encryption is common, although not an inherent part of a VPN connection.
|
||||
|
||||
A VPN is created by establishing a virtual point-to-point connection through the use of tunneling [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][protocols]] over existing networks. A VPN available from the public Internet can provide some of the benefits of a wide area network ([[id:053d9bdf-c6fe-42ce-8c44-d6945f612bf3][WAN]]). From a user perspective, the resources available within the private network can be accessed remotely
|
||||
13
20230509082201-open_vpn.org
Normal file
13
20230509082201-open_vpn.org
Normal file
@@ -0,0 +1,13 @@
|
||||
:PROPERTIES:
|
||||
:ID: 94daf0fc-da84-4b90-a200-7b147f721e2a
|
||||
:END:
|
||||
#+title: open-vpn
|
||||
|
||||
OpenVPN is a virtual private network ([[id:1af47b07-4205-46ac-837a-ee078067328a][vpn]]) system that implements techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It implements both [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] and [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] applications.
|
||||
|
||||
OpenVPN allows peers to authenticate each other using pre-shared secret keys, [[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificates]] or username/password. When used in a multiclient-server configuration, it allows the server to release an authentication certificate for every client, using signatures and certificate authority.
|
||||
|
||||
It uses the OpenSSL encryption library extensively, as well as the [[id:872ee33b-8361-40c7-9d88-69b3afe5ade2][TLS]] [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][protocol]], and contains many security and control features. It uses a custom security protocol that utilizes [[id:95c8982d-e104-43a2-9bb2-fd7e1c3204f2][SSL]]/TLS for key exchange. It is capable of traversing network address translators ([[id:d5ba6251-d7b1-4954-864d-c2f817aabf15][NAT]]s) and [[id:b9047be5-edca-4eca-8bac-c45e03373942][firewall]].
|
||||
|
||||
OpenVPN has been ported and embedded to several systems. For example, DD-WRT has the OpenVPN server function. SoftEther VPN, a multi-protocol VPN server, also has an implementation of OpenVPN protocol
|
||||
|
||||
31
20230509095218-ip.org
Normal file
31
20230509095218-ip.org
Normal file
@@ -0,0 +1,31 @@
|
||||
:PROPERTIES:
|
||||
:ID: f055acfb-05dd-4228-a92a-356240b8c975
|
||||
:END:
|
||||
#+title: IP
|
||||
|
||||
An Internet [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][Protocol]] address (IP address) is a numerical label such as 192.0.2.1 that is connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: network interface identification and location addressing.
|
||||
|
||||
Internet Protocol version 4 (IPv4) defines an IP address as a 32-bit number. However, because of the growth of the Internet and the depletion of available IPv4 addresses, a new version of IP (IPv6), using 128 bits for the IP address, was standardized in 1998. IPv6 deployment has been ongoing since the mid-2000s.
|
||||
|
||||
IP addresses are written and displayed in human-readable notations, such as 192.0.2.1 in IPv4, and 2001:db8:0:1234:0:567:8:1 in IPv6. The size of the routing prefix of the address is designated in CIDR notation by suffixing the address with the number of significant bits, e.g., 192.0.2.1/24, which is equivalent to the historically used subnet mask 255.255.255.0.
|
||||
|
||||
The IP address space is managed globally by the Internet Assigned Numbers Authority (IANA), and by five regional Internet registries (RIRs) responsible in their designated territories for assignment to local Internet registries, such as Internet service providers (ISPs), and other end users. IPv4 addresses were distributed by IANA to the RIRs in blocks of approximately 16.8 million addresses each, but have been exhausted at the IANA level since 2011. Only one of the RIRs still has a supply for local assignments in Africa.[6] Some IPv4 addresses are reserved for private networks and are not globally unique.
|
||||
|
||||
Network administrators assign an IP address to each device connected to a network. Such assignments may be on a static (fixed or permanent) or dynamic basis, depending on network practices and software features.
|
||||
|
||||
* Function
|
||||
An IP address serves two principal functions: it identifies the host, or more specifically its network interface, and it provides the location of the host in the network, and thus the capability of establishing a path to that host. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there." The header of each IP [[id:fde35a08-897d-4502-aead-1f4414ea639c][packet]] contains the IP address of the sending host and that of the destination host.
|
||||
|
||||
* IP versions
|
||||
Two versions of the Internet Protocol are in common use on the Internet today. The original version of the Internet Protocol that was first deployed in 1983 in the ARPANET, the predecessor of the Internet, is Internet Protocol version 4 (IPv4).
|
||||
|
||||
By the early 1990s, the rapid exhaustion of IPv4 address space available for assignment to Internet service providers and end-user organizations prompted the Internet Engineering Task Force (IETF) to explore new technologies to expand addressing capability on the Internet. The result was a redesign of the Internet Protocol which became eventually known as Internet Protocol Version 6 (IPv6) in 1995. IPv6 technology was in various testing stages until the mid-2000s when commercial production deployment commenced.
|
||||
|
||||
Today, these two versions of the Internet Protocol are in simultaneous use. Among other technical changes, each version defines the format of addresses differently. Because of the historical prevalence of IPv4, the generic term IP address typically still refers to the addresses defined by IPv4. The gap in version sequence between IPv4 and IPv6 resulted from the assignment of version 5 to the experimental Internet Stream Protocol in 1979, which however was never referred to as IPv5.
|
||||
|
||||
Other versions v1 to v9 were defined, but only v4 and v6 ever gained widespread use. v1 and v2 were names for [[id:0fa93c0d-6741-48cf-8bea-f2519146e4dc][TCP]] protocols in 1974 and 1977, as there was no separate IP specification at the time. v3 was defined in 1978, and v3.1 is the first version where TCP is separated from IP. v6 is a synthesis of several suggested versions, v6 Simple Internet Protocol, v7 TP/IX: The Next Internet, v8 PIP — The P Internet Protocol, and v9 TUBA — Tcp & [[id:b9c823ff-4cf4-46a0-8654-54bdc7b67d30][UDP]] with Big Addresses.
|
||||
|
||||
* Subnetworks
|
||||
IP [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnetworks]] may be divided into subnetworks in both IPv4 and IPv6. For this purpose, an IP address is recognized as consisting of two parts: the network prefix in the high-order bits and the remaining bits called the rest field, host identifier, or interface identifier (IPv6), used for host numbering within a network. The subnet mask or CIDR notation determines how the IP address is divided into network and host parts.
|
||||
|
||||
The term subnet mask is only used within IPv4. Both IP versions however use the CIDR concept and notation. In this, the IP address is followed by a slash and the number (in decimal) of bits used for the network part, also called the routing prefix. For example, an IPv4 address and its subnet mask may be 192.0.2.1 and 255.255.255.0, respectively. The CIDR notation for the same IP address and subnet is 192.0.2.1/24, because the first 24 bits of the IP address indicate the network and subnet.
|
||||
28
20230515104228-ssh.org
Normal file
28
20230515104228-ssh.org
Normal file
@@ -0,0 +1,28 @@
|
||||
:PROPERTIES:
|
||||
:ID: 422e07f8-c888-460f-849e-76d451946045
|
||||
:END:
|
||||
#+title: ssh
|
||||
#+filetags: :basics:
|
||||
|
||||
OpenSSH (OpenBSD Secure Shell) is a set of computer programs providing encrypted communication sessions over a computer network using the Secure Shell (SSH) [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][protocol]]. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security. OpenSSH is developed as part of the OpenBSD project, which is led by Theo de Raadt. OpenSSH is occasionally confused with the similarly-named OpenSSL; however, the projects have different purposes and are developed by different teams, the similar name is drawn only from similar goals.
|
||||
|
||||
* Install and enable on [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]]
|
||||
SSH is a pre-installed programm
|
||||
#+begin_src bash
|
||||
sudo systemctl enable sshd
|
||||
sudo systemctl start sshd
|
||||
#+end_src
|
||||
For that you need [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priviliges ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
|
||||
* Key generation from Master & [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]]
|
||||
#+begin_src bash
|
||||
ssh-keygen -t rsa 4098
|
||||
ssh <user>@<client1> mkdir -p .ssh #type "yes" & "password" for <client>
|
||||
cat .ssh/id_rsa.pub | ssh <user>@<client> 'cat >> .ssh/authorized_keys'
|
||||
ssh <user>@<client> "chmod 700 .ssh; chmod 640 .ssh/authorized_keys
|
||||
#+end_src
|
||||
|
||||
NOTE: Do the same from other clients from master & from master to all clients
|
||||
|
||||
#+begin_src bash
|
||||
ssh <user>@<client>
|
||||
#+end_src
|
||||
15
20230515104516-x11_forwarding.org
Normal file
15
20230515104516-x11_forwarding.org
Normal file
@@ -0,0 +1,15 @@
|
||||
:PROPERTIES:
|
||||
:ID: 98eade62-125a-40f1-b572-ff3e107ca4fa
|
||||
:END:
|
||||
#+title: x11-forwarding
|
||||
#+filetags: :system:basics:
|
||||
|
||||
[[id:aac10dba-6276-414e-a3ff-7887528c7918][X11]] forwarding is a mechanism that allows graphical interfaces of X11 programs running on a remote system to be displayed on a local client machine. For X11 forwarding the remote host does not need to have a full X11 system installed; however, it needs at least to have xauth installed. xauth is a utility that maintains Xauthority configurations used by [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] and [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] for authentication of X11 session (source).
|
||||
|
||||
Warning: X11 forwarding has important security implications which should be at least acknowledged by reading relevant sections of [[id:422e07f8-c888-460f-849e-76d451946045][ssh]](1), sshd_config(5), and ssh_config(5) manual pages. See also this StackExchange question.
|
||||
* Setup
|
||||
** install the xorg-xauth packages
|
||||
** in /etc/ssh/sshd_config:
|
||||
set X11Forwarding to yes
|
||||
verify that Allow[[id:0fa93c0d-6741-48cf-8bea-f2519146e4dc][TCP]]Forwarding and X11UseLocalhost options are set to yes, and that X11DisplayOffset is set to 10
|
||||
** then restart the sshd daemon.
|
||||
30
20230515144839-matlab_docker.org
Normal file
30
20230515144839-matlab_docker.org
Normal file
@@ -0,0 +1,30 @@
|
||||
:PROPERTIES:
|
||||
:ID: e336814a-3a58-4b25-8d02-0af07623ce45
|
||||
:END:
|
||||
#+title: matlab-docker
|
||||
|
||||
Dockerized version of matlab. Inside the docker-file a list of matlab packages has to be specified, else the installation without toolboxes is used. The list that has to be given to the mpm manager looks like this:
|
||||
|
||||
#+begin_src
|
||||
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm && \
|
||||
chmod +x mpm && \
|
||||
./mpm install \
|
||||
--release=${MATLAB_RELEASE} \
|
||||
--destination=/tmp/matlab \
|
||||
--products MATLAB Deep_Learning_Toolbox && \
|
||||
rm -f mpm /tmp/mathworks_root.log && \
|
||||
ln -s /tmp/matlab/bin/matlab /usr/local/bin/matlab
|
||||
#+end_src
|
||||
In this example the Deep learning toolbox will be installed nebst the basic matlab installation. The list has to be space separated, so there can't be any spaces in the name of the toolboxes. Use underscore instead.
|
||||
|
||||
* Installed Toolboxes
|
||||
** Simulink
|
||||
** Parallel computing toolbox --no-gpu
|
||||
** control system toolbox
|
||||
** curve fitting toolbox
|
||||
** Database toolbox
|
||||
** Deep learning toolbox
|
||||
** Deep learning hdl toolbox
|
||||
** embedded coder
|
||||
** partial differential equations toolbox
|
||||
** Matlab Coder
|
||||
9
20230516164008-whoogle_container.org
Normal file
9
20230516164008-whoogle_container.org
Normal file
@@ -0,0 +1,9 @@
|
||||
:PROPERTIES:
|
||||
:ID: d7b03403-db35-465a-b4a0-fce27733df5a
|
||||
:END:
|
||||
#+title: whoogle-container
|
||||
|
||||
|
||||
#+begin_src
|
||||
docker run -d -p 1337:1337 -e WHOOGLE_AUTOCOMPLETE=0 -e WHOOGLE_ALT_WIKI="wikiless.org" -e WHOOGLE_ALT_IMG="imgin.voidnet.tech" -e WHOOGLE_ALT_TL="lingva.ml" -e WHOOGLE_ALT_MD="scribe.bus-hit.me" -e WHOOGLE_CONFIG_LANGUAGE="lang_en" -e WHOOGLE_CONFIG_SEARCH_LANGUAGE="lang_en" -e WHOOGLE_CONFIG_NEW_TAB=1 -e WHOOGLE_CONFIG_DISABLE=1 -e WHOOGLE_CONFIG_ALTS=1 -e WHOOGLE_ALT_TW="nitter.snopyta.org" -e WHOOGLE_ALT_YT="invidious.snopyta.org" -e WHOOGLE_ALT_IG="bibliogram.art/u" -e WHOOGLE_ALT_RD="libredd.it" -e WHOOGLE_CONFIG_STYLE=":root { --whoogle-logo:#685e79;--whoogle-page-bg:#ffffff;--whoogle-element-bg:#4285f4;--whoogle-text:#000000;--whoogle-contrast-text:#ffffff;--whoogle-secondary-text:#70757a;--whoogle-result-bg:#ffffff;--whoogle-result-title:#1967d2;--whoogle-result-url:#0d652d;--whoogle-result-visited:#4b11a8;--whoogle-dark-logo:#ffffff;--whoogle-dark-page-bg:#111111;--whoogle-dark-element-bg:#303134;--whoogle-dark-text:#dddddd;--whoogle-dark-contrast-text:#e8eaed;--whoogle-dark-secondary-text:#bdc1c6;--whoogle-dark-result-bg:#222222;--whoogle-dark-result-title:#8ab4f8;--whoogle-dark-result-url:#34a853;--whoogle-dark-result-visited:#c58af9;}#whoogle-w{fill:#4285f4;}#whoogle-h{fill:#ea4335;}#whoogle-o-1{fill:#fbbc05;}#whoogle-o-2{fill:#4285f4;}#whoogle-g{fill:#34a853;}#whoogle-l{fill:#ea4335;}#whoogle-e{fill:#fbbc05;}" -e VIRTUAL_HOST="whoogle.green-chem.net" -e LETSENCRYPT_HOST="whoogle.green-chem.net" -e EXPOSE_PORT=1337 -e WHOOGLE_USER="madrigal_admin" -e WHOOGLE_PASS=TUC0815AM_?! --restart unless-stopped --name madrigal_search --network net benbusby/whoogle-search:latest
|
||||
#+end_src
|
||||
41
20230517102824-freecad.org
Normal file
41
20230517102824-freecad.org
Normal file
@@ -0,0 +1,41 @@
|
||||
:PROPERTIES:
|
||||
:ID: a4953b2b-81de-4c15-91e7-10d0cb5f22dd
|
||||
:END:
|
||||
#+title: freeCAD
|
||||
|
||||
FreeCAD is an open source tool for CAD. It is used to make the reactor geometry. To install just use the ~yay~ or ~pacman~ package manager. To do the basic istallation try to configure it as it is shown [[https://www.youtube.com/watch?v=8tvBLCdyjI4][here]].
|
||||
|
||||
* How to Start
|
||||
(Version 0.20.2)
|
||||
** Step 1:
|
||||
Create a Sketch by choosing "Create a Sketch"
|
||||
** Step 2:
|
||||
Set dimension by choosing your sketch with double click or choosing Tasks and right click on 1-Circle --> Diameter Constraint
|
||||
|
||||
|
||||
#+ATTR_ORG: :width 300
|
||||
#+ATTR_ORG: :height 300
|
||||
[[file:../pictures/How_to_Start/2023-05-17_13-50-30_image.png]]
|
||||
|
||||
|
||||
#+ATTR_ORG: :width 300
|
||||
#+ATTR_ORG: :height 300
|
||||
[[file:../pictures/How_to_Start/2023-05-17_13-53-24_image2.png]]
|
||||
|
||||
** Step 3:
|
||||
Extrude the sketch by choosing "Pad/Part Design - Modellierung)
|
||||
|
||||
#+ATTR_ORG: :width 300
|
||||
#+ATTR_ORG: :height 300
|
||||
[[file:../pictures/How_to_Start/2023-05-17_13-53-28_image3.png]]
|
||||
|
||||
#+ATTR_ORG: :width 300
|
||||
#+ATTR_ORG: :height 300
|
||||
[[file:../pictures/How_to_Start/2023-05-17_13-53-32_image4.png]]
|
||||
|
||||
** Step 4:
|
||||
Export as stl/step file by choosing File --> Export --> STL Mesh or STEP with Colour
|
||||
|
||||
|
||||
|
||||
|
||||
84
20230522113406-emacs.org
Normal file
84
20230522113406-emacs.org
Normal file
@@ -0,0 +1,84 @@
|
||||
:PROPERTIES:
|
||||
:ID: 5f1df0e1-384f-4685-ae1e-fec2431b04e5
|
||||
:END:
|
||||
#+title: emacs
|
||||
#+filetags: :INDEX:EMACS::
|
||||
|
||||
One of the most important tools of every [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] distribution. Emacs is a plain text editor, that can be expanded with various packages. Some Packages and their usage is listed here. In most cases not the sole emacs is used, but the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] version (local server) of emacs. The server runs at boot but can be evoked by running:
|
||||
#+begin_src bash
|
||||
emacs --daemon
|
||||
#+end_src
|
||||
To start a second [[id:e108b31b-23c1-47fe-a794-84e41bc45044][daemon]] you have to give a specific name to the second instance so emacs knows which server to address. This is done via the command:
|
||||
#+begin_src bash
|
||||
emacs --daemon=<name of server>
|
||||
#+end_src
|
||||
To use the text editor (emacs) use the command to start a [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]]:
|
||||
#+begin_src bash
|
||||
emacsclient -cn <name of document>
|
||||
#+end_src
|
||||
The ~-c~ flag suggests emacs to open a new frame (so the use of emacs and the document is not blocked for other members (e.g. in ssh). The -~n~ Flag suggest not to wait for emacs to close, so the prompt is given back to the shell. For emacs in Terminal mode (for ssh purposes) use the ~-t~ flag instead of the ~-n~ flag. To use emacsclient as command interpreter, use the ~-e~ flag:
|
||||
#+begin_src bash
|
||||
emacsclient -e ('kill-emacs') #kills the emacs process
|
||||
#+end_src
|
||||
To use a different emacs server (has to be running) use the ~-s~ [[id:6d29efeb-1f03-401b-bbed-e19fc94dbbbc][flag]] and give the name of the daemon
|
||||
#+begin_src bash
|
||||
emacsclient -ct -s <name of daemon>
|
||||
#+end_src
|
||||
Emacs uses commands to change its behavior or simply do things. Those commands use command keys like control (~c-~ ), alt (~m-~ ) or space (~s-~ ) . To use a command press the command. If pressed a minibuffer opens, there all possible commands are listed. For Example, to save your work use the command chain control x control s (~c-x c-s~). You can keep the control key pressed and simply press the next chain key.
|
||||
|
||||
* [[Id:c7747161-284c-4882-bd11-80bc2a990814][Buffer]]
|
||||
Emacs works with so called buffers. A buffer is an instance that can hold text (e.g. a text document or a menu. to switch between opened buffers that are running in the server instance use ~c-m-j~. If you close amecsclient while the server is running, the buffer is not closed but still exist in the buffer list. you can close a buffer (switch focus, unsaved changtes are still there) by pressing ~c-0~ or kill a buffer (like closing for real, unsaved changes are gone) by pressing ~c-k~. you can have more than one buffer in view at the same time. To view a second buffer side by side press ~c-x c-3~. To view them top-down press ~c-x c-2~. To close a buffer that is not in focus press ~c-x c-1~ (instead of closing the one in focus with ~c-x c-0~.
|
||||
A sub category are minibuffers. Those can pop up for notifications, menus or other things. They do not take the whole screen.
|
||||
|
||||
* M-X
|
||||
There are things that do not have a keychain attached to them. To acitvate those (or all) commands you have to use the ~M-x~ command prompt. Press ~m-x~ and type the name of the command you want to use. For example:
|
||||
#+begin_src lisp
|
||||
M-x package-install <name of package> ;;installs a package in emacs
|
||||
#+end_src
|
||||
|
||||
* Index (Packages)
|
||||
** [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]] auf files zugreifen
|
||||
*** [[id:6bd68975-f5d3-4c8c-bba7-34788c3edf3e][tramp]]
|
||||
sudo access for files in a dired buffer.
|
||||
** key menu (invoked by colon or space)
|
||||
*** [[id:82fd5a02-36c6-4ac5-a3f3-9b47dc1a4700][hydra]]
|
||||
additional menues for emacs buffers.
|
||||
** Gcal Calendar
|
||||
*** [[id:7bd1f7dd-fcb2-4efc-a4df-f233a4bf3fcd][org-gcal]]
|
||||
Google calendar intergration for org buffers.
|
||||
** Tex
|
||||
*** [[id:f52339f6-db99-4b43-91fd-48e7a1957ab2][synctex]]
|
||||
syncs the pdf to the [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]] buffer in emacs.
|
||||
*** [[id:3dfde3f4-2cc0-4356-a147-d4afd599e731][auctex]]
|
||||
latex support ([[id:d3e11792-af05-4213-9ef8-b680c12ce81c][IDE]]) for emacs buffers.
|
||||
** PDF-View
|
||||
*** [[id:ae476916-f23f-4004-8b8a-bebc690e65f3][pdf-tools]]
|
||||
View PDF files in an emacs buffer. Does not work in a [[id:4c3c3777-af52-4cde-8d9b-f356701b94c9][terminal]] or [[id:b6d24dd6-285f-4c03-883c-dc77b78c652a][shell]] (via [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]).
|
||||
** Navigation
|
||||
*** [[id:f3aaa9f1-525b-4ae6-9dce-efe22c8b2107][neotree]]
|
||||
Visualizes the File tree in a buffer (interactive).
|
||||
*** [[id:50326e0d-4ae7-46b3-bcda-27c47f0fe569][dired]]
|
||||
Simple File Browser in a minibuffer.
|
||||
*** [[id:3d22fdb5-a322-44d2-a447-83a8708d0637][deft]]
|
||||
Strong File Searcher for defined folders. Especialy good with roam home folder.
|
||||
*** [[id:9aa361f6-b829-49ad-a523-6498dbfb0213][projectile]]
|
||||
File managemant for project folders and files of same type.
|
||||
** Programme launcher
|
||||
*** [[id:7e6f7176-9223-4dcc-ad4d-1ccf8c38116a][counsel-linux-app]]
|
||||
Change the behaviour of M-x minibuffer.
|
||||
** File System
|
||||
*** [[id:b02ca084-7831-4013-8389-45f4cd969e25][org-attach]]
|
||||
Attach files to a org heading and categorize the entry.
|
||||
** Website Scraper
|
||||
*** [[id:f68dfc34-5349-42d1-8074-6c4be231a69b][org-web-tools]]
|
||||
Extract files and text from websites.
|
||||
** Helm
|
||||
*** [[id:9ce51551-fcb1-446a-9924-9dd26f5d56aa][helm-org-rifle]]
|
||||
Strong file and text search engine for org files.
|
||||
*** [[id:b3503901-bb4f-4fda-b85f-5e738df311fb][helm-bibtex]]
|
||||
helm search engine integration for literature and bibtex entries.
|
||||
** second brain
|
||||
*** [[id:9d782b7c-5d45-4963-96f4-ee01a00ba280][org-roam]]
|
||||
Data assemble and structorization engine with database.
|
||||
|
||||
Note: Emacs mode can also be used for [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]], [[id:34c4e594-2aee-42d6-803a-6f843176d3b9][openFoam]] and [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab]].
|
||||
12
20230522115933-tramp.org
Normal file
12
20230522115933-tramp.org
Normal file
@@ -0,0 +1,12 @@
|
||||
:PROPERTIES:
|
||||
:ID: 6bd68975-f5d3-4c8c-bba7-34788c3edf3e
|
||||
:END:
|
||||
#+title: tramp
|
||||
|
||||
Tramp is a package of [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] that is pre installed and does not have to be installed by the user. It is used to access and edit files with sudo priviliges without the use of the [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]] command inside a shell. This is particularly usefull when editing files in emacsclient.
|
||||
|
||||
* Sudo-File-Open
|
||||
To open files with [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priviliges (if you can use them) just press ~c-f~ ~c-x~ and wirte ~sudo::~ before giving the path to the file.
|
||||
|
||||
|
||||
|
||||
11
20230522120543-hydra.org
Normal file
11
20230522120543-hydra.org
Normal file
@@ -0,0 +1,11 @@
|
||||
:PROPERTIES:
|
||||
:ID: 82fd5a02-36c6-4ac5-a3f3-9b47dc1a4700
|
||||
:END:
|
||||
#+title: hydra
|
||||
#+filetags: :EMACS:
|
||||
|
||||
Emacs package for creating menu command prompts. a single menu prompt is called hydra head.
|
||||
|
||||
* Heads:
|
||||
** Evil-Heads
|
||||
*** [[id:2a8d1ed3-dd81-473a-a53a-854bf8182891][hydra-buffer-menu]]
|
||||
45
20230522120824-hydra_buffer_menu.org
Normal file
45
20230522120824-hydra_buffer_menu.org
Normal file
@@ -0,0 +1,45 @@
|
||||
:PROPERTIES:
|
||||
:ID: 2a8d1ed3-dd81-473a-a53a-854bf8182891
|
||||
:END:
|
||||
#+title: hydra-buffer-menu
|
||||
#+filetags: :EMACS:
|
||||
|
||||
The original code for buffer menu. This is implemented in the emacs init file and cann be changed fi needed. It is invoked with the ~,~-key (colon) (in [[id:163e2614-cce0-4e66-a593-a2113a7b3cd1][evil]] normal state)
|
||||
Hydra-Head für das allgemeine Buffer Menü.
|
||||
Funktionstaste "," nur im evil-normal-state.
|
||||
# ##########################################
|
||||
* Code
|
||||
#+begin_src emacs-lisp
|
||||
(defhydra hydra-buffer-menu (:color pink
|
||||
:hint nil)
|
||||
"
|
||||
^ORG^ ^File/Misc ^ ^Roam/Capture^ ^Search^
|
||||
^^^^^^^^-----------------------------------------------------------------
|
||||
_a_: Agenda _b_: Buffer-Liste ^ ^ ^ ^
|
||||
_A_: Archive _d_: Deft _b_: bury ^ ^
|
||||
_R_: Refile _s_: Start-Mode _g_: refresh ^ ^
|
||||
_c_: Org-T-Cut ^ ^ _T_: files only: % -28`Buffer-menu-files-only
|
||||
_p_: Org-T-Paste
|
||||
"
|
||||
("a" org-agenda)
|
||||
("A" org-archive-subtree-default)
|
||||
("R" org-refile)
|
||||
("c" org-cut-subtree)
|
||||
("p" org-paste-subtree)
|
||||
("b" ibuffer-jump)
|
||||
("d" diz/run-and-refresh-deft)
|
||||
("s" diz/run-start-mode)
|
||||
("b" Buffer-menu-bury)
|
||||
("g" revert-buffer)
|
||||
("T" Buffer-menu-toggle-files-only)
|
||||
("O" Buffer-menu-multi-occur :color blue)
|
||||
("I" Buffer-menu-isearch-buffers :color blue)
|
||||
("R" Buffer-menu-isearch-buffers-regexp :color blue)
|
||||
("c" nil "cancel")
|
||||
("v" Buffer-menu-select "select" :color blue)
|
||||
("o" Buffer-menu-other-window "other-window" :color blue)
|
||||
("q" quit-window "quit" :color blue))
|
||||
|
||||
(define-key evil-normal-state-map "," 'hydra-buffer-menu/body)
|
||||
#+end_src
|
||||
|
||||
13
20230522121056-evil_mode.org
Normal file
13
20230522121056-evil_mode.org
Normal file
@@ -0,0 +1,13 @@
|
||||
:PROPERTIES:
|
||||
:ID: 163e2614-cce0-4e66-a593-a2113a7b3cd1
|
||||
:END:
|
||||
#+title: evil-mode
|
||||
|
||||
A minor mode that adds VIM like keybindings to [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]]. It is always activated.
|
||||
* When you open a document you are in normal mode ~<N>~
|
||||
** To insert text press ~i~ (insert mode ~<I>~)
|
||||
** To mark text press ~v~ (visual mode ~<V>~)
|
||||
** To Replace text press ~r~ (replacement mode ~<R>~)
|
||||
** To get back to normal mode press ~esc~ or ~c-g~
|
||||
* Navigation
|
||||
Inside normal mode you can navigate with the ~h,j,k,l~ keys or with the arrow keys.
|
||||
16
20230522124454-org_gcal.org
Normal file
16
20230522124454-org_gcal.org
Normal file
@@ -0,0 +1,16 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7bd1f7dd-fcb2-4efc-a4df-f233a4bf3fcd
|
||||
:END:
|
||||
#+title: org-gcal
|
||||
#+filetags: :EMACS:ORG::
|
||||
|
||||
Org-gcal is an Emacs extension that allows to synchronize Google Calendar.
|
||||
|
||||
The setup is rather complicated and requires the Google Developer settings and a web API.
|
||||
|
||||
These are already created for acumerana@gmail.com, so all calendars can be synchronized there.
|
||||
|
||||
Appointments can easily be entered into the org-files and synchronized with "org-gcal-fetch" followed by "org-gcal-sync". The web page for gcal are: [[https://github.com/myuhe/org-gcal.el][org-gcal]] and [[https://github.com/nicoalphonse/org-gcal][org-gcal-new]] respectively .
|
||||
|
||||
|
||||
|
||||
69
20230522124800-synctex.org
Normal file
69
20230522124800-synctex.org
Normal file
@@ -0,0 +1,69 @@
|
||||
:PROPERTIES:
|
||||
:ID: f52339f6-db99-4b43-91fd-48e7a1957ab2
|
||||
:END:
|
||||
#+title: synctex
|
||||
#+filetags: :EMACS:latex:
|
||||
|
||||
This procedure will set up Emacs, [[id:3dfde3f4-2cc0-4356-a147-d4afd599e731][auctex]], and the Okular viewer to handle integrated forward and inverse search. (These instructions were tested on a Debian system)
|
||||
|
||||
Install Emacs. To install Emacs, open up the terminal and type the command:
|
||||
|
||||
[[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]] ~apt-get install emacs~
|
||||
Install AUCTeX.
|
||||
|
||||
Within Emacs, run M-x package install RET auctex RET.
|
||||
|
||||
To test for a successful installation, just open up a .tex file Emacs with and you will see new menus concerning LaTeX.
|
||||
|
||||
enter image description here
|
||||
|
||||
Install Okular.
|
||||
|
||||
sudo apt-get install okular
|
||||
If not already done, open a tex file with emacs.
|
||||
|
||||
In the LaTeX menu, go to "Customize AUCTeX" and click on "Extend this menu".
|
||||
Then go again to LaTeX, "Customize AUCTeX", go to the "Tex Command" submenu and click on the included "Tex command" item.
|
||||
From within Emacs, run
|
||||
|
||||
~M-x customize-group RET TeX-command RET~
|
||||
You are now in the "Tex command group" configuration buffer. Scroll down until you reach "Tex Pdf Mode". Its value is off (nil); click on the "Toggle" button to activate this mode. Click on the "State" button and select "Save for Future Sessions". AUCTeX will now compile your TeX file using pdflatex.
|
||||
|
||||
You should see something like this: enter image description here
|
||||
|
||||
For the "Save for Future Sessions", the button with the green down arrow can also be selected. When this is done, your .emacs will be updated accordingly.
|
||||
|
||||
enter image description here
|
||||
|
||||
Still in the "Tex command group" configuration buffer, scroll all the way down and click on the special item called "Tex View". In the "Tex view group" buffer, you have two things to do:
|
||||
|
||||
activate the correlate mode between the PDF and the TeX file, and
|
||||
declare a PDF viewer which can read these correlations.
|
||||
To activate the correlate mode:
|
||||
|
||||
item "Tex Source Correlate Method", click on the "Value Menu" button and select "synctex" and save for future sessions,
|
||||
item "Tex Source Correlate Start [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]", select "Always" and save,
|
||||
item "Tex Source Correlate Mode", toggle it on and save.
|
||||
To set Okular as the default PDF viewer:
|
||||
|
||||
(NOTE: this is necessary only if you are using AUCTeX 11.87 or lower, in which case you really should upgrade the package to a more recent version) item Tex View Program List then click INS
|
||||
name: Okular
|
||||
choice: Command
|
||||
command: okular --unique %o#src:%n%b
|
||||
item Tex View Program Selection then click INS
|
||||
|
||||
choice: Single predicate
|
||||
single predicate: output-pdf
|
||||
viewer: Okular
|
||||
|
||||
If you just added Okular to the Tex View Program List, this choice might not appear. Restart Emacs or Set for Current Session to have it show up.
|
||||
|
||||
Set and save both for future sessions.
|
||||
|
||||
To configure Okular: in the Okular window, go to the "Settings" menu, item "Configure Okular", "Editor", select Emacs [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]].
|
||||
|
||||
To use Forward search from Emacs to Okular, just hit C-c C-v or click on the glasses button of the tool-bar to call the viewer. Okular will center its display on the intended line of the pdf.
|
||||
|
||||
To use Inverse search from Okular to Emacs, make sure that the Browse Tool (in the Tools menu of Okular) is enabled; then just hit Shift+Left mouse click on the pdf. Emacs will come up and position the cursor at the intended line of the TeX source.
|
||||
|
||||
|
||||
48
20230522124931-auctex.org
Normal file
48
20230522124931-auctex.org
Normal file
@@ -0,0 +1,48 @@
|
||||
:PROPERTIES:
|
||||
:ID: 3dfde3f4-2cc0-4356-a147-d4afd599e731
|
||||
:END:
|
||||
#+title: auctex
|
||||
#+filetags: :EMACS:latex:
|
||||
|
||||
Auctex is an [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] [[id:b7c4f849-d1b1-4837-8634-82f6976a1473][package]] from [[id:4e30f168-3601-4b99-9daa-790161c03901][elpa]] or [[id:79bae242-a2b4-4753-9960-1f929c8c6300][melpa]] that can be installed as an [[id:d3e11792-af05-4213-9ef8-b680c12ce81c][IDE]] for [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]]. With this the text editor detects the ending ~.tex~ of the latex scripts and uses a [[id:57fcd48a-de61-4ced-8a4c-943cb78595db][major-mode]].
|
||||
|
||||
* implementation into emacs
|
||||
To activate the auctex package install it from elpa or melpa using ~M-x package-install~
|
||||
#+begin_src elisp
|
||||
;;LATEX (AUCTEX)
|
||||
(setq LaTeX-electric-left-right-brace t)
|
||||
(setq TeX-auto-save t) ;autosave
|
||||
(setq TeX-save-query nil) ; Keine Abfrage nach Speichern
|
||||
(setq TeX-parse-self t) ;parsen
|
||||
(setq-default TeX-master nil) ;(fragt jedes mal nach dme Master
|
||||
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
|
||||
(dolist (hook '(text-mode-hook))
|
||||
(add-hook hook (lambda () (flyspell-mode 1))))
|
||||
;;(add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
||||
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||
(setq reftex-plug-into-AUCTeX t)
|
||||
(add-hook 'reftex-load-hook 'imenu-add-menubar-index)
|
||||
(add-hook 'reftex-mode-hook 'imenu-add-menubar-index)
|
||||
(setq TeX-PDF-mode t)
|
||||
(require 'tex)
|
||||
(setq-default TeX-PDF-mode t)
|
||||
(TeX-global-PDF-mode t)
|
||||
|
||||
;;ac-tex-ref
|
||||
(add-hook 'tex-mode-hook
|
||||
(lambda ()
|
||||
(require 'ac-tex-ref)
|
||||
(make-local-variable 'ac-sources)
|
||||
(add-to-list 'ac-sources 'ac-source-tex-ref)
|
||||
(add-to-list 'ac-sources 'ac-source-tex-cite)))
|
||||
|
||||
;LAtex Normal Mode
|
||||
(setq latex-run-command "pdflatex")
|
||||
(add-hook 'latex-mode-hook ;; guessing
|
||||
'(lambda ()
|
||||
(local-set-key "M-TAB" 'TeX-complete-symbol)))
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
61
20230522125454-pdf_tools.org
Normal file
61
20230522125454-pdf_tools.org
Normal file
@@ -0,0 +1,61 @@
|
||||
:PROPERTIES:
|
||||
:ID: ae476916-f23f-4004-8b8a-bebc690e65f3
|
||||
:END:
|
||||
#+title: pdf-tools
|
||||
#+filetags: :EMACS:
|
||||
|
||||
PDF Tools is an Emacs package for rendering PDF in Emacs.
|
||||
|
||||
It is intended to replace doc-view and work well with org-annotate and Roam.
|
||||
|
||||
It works with [[id:f52339f6-db99-4b43-91fd-48e7a1957ab2][synctex]] and [[id:3dfde3f4-2cc0-4356-a147-d4afd599e731][auctex]].
|
||||
|
||||
The packages in Emacs are currently not working (as of <2023-02-18 Sat>) and it must be installed via [[id:d88b7b60-742d-4bc0-8b48-3fbcfad2373d][pacman]] or [[id:294012b3-5b0a-4527-a981-2f397378c0d2][AUR-Helpers]].
|
||||
|
||||
The corresponding package is called: emacs-pdf-tools-git.
|
||||
|
||||
|
||||
|
||||
But without configuratiion it is not possible to use it like this, so you have to add the following to the con
|
||||
|
||||
* Configuration
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package pdf-tools
|
||||
:pin manual
|
||||
:config
|
||||
(pdf-tools-install)
|
||||
(setq-default pdf-view-display-size 'fit-width)
|
||||
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)
|
||||
:custom
|
||||
(pdf-annot-activate-created-annotations t "automatically annotate highlights") )
|
||||
|
||||
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
|
||||
TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))
|
||||
TeX-source-correlate-start-server t)
|
||||
|
||||
(add-hook 'TeX-after-compilation-finished-functions
|
||||
#'TeX-revert-document-buffer)
|
||||
|
||||
(add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
|
||||
|
||||
;kann auch in evince geändert werden:
|
||||
;(setq TeX-view-program-selection '((output-pdf "Evince")))
|
||||
;; kann auch über M-x customize-group angepasst werden
|
||||
|
||||
;;pdf-view-blinken
|
||||
(evil-set-initial-state 'doc-view-mode 'normal)
|
||||
(add-hook 'doc-view-mode-hook
|
||||
(lambda ()
|
||||
(setq blink-cursor-mode nil)))
|
||||
|
||||
|
||||
;;pdf-view-blinken
|
||||
(evil-set-initial-state 'pdf-view-mode 'emacs)
|
||||
(add-hook 'pdf-view-mode-hook
|
||||
(lambda ()
|
||||
(setq blink-cursor-mode nil)))
|
||||
#+end_src
|
||||
|
||||
Im Evil-mode blinkt die Anzeige, cursor blinken muss also Deaktiviert werden (siehe oben).
|
||||
Funktioniert NICHT! mit linum mode.
|
||||
73
20230522130259-neotree.org
Normal file
73
20230522130259-neotree.org
Normal file
@@ -0,0 +1,73 @@
|
||||
:PROPERTIES:
|
||||
:ID: f3aaa9f1-525b-4ae6-9dce-efe22c8b2107
|
||||
:END:
|
||||
#+title: neotree
|
||||
#+filetags: :EMACS:
|
||||
|
||||
Neotree is a package in [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] that displays the directory tree of directories. Quasi a visualization of [[id:50326e0d-4ae7-46b3-bcda-27c47f0fe569][dired]].
|
||||
|
||||
|
||||
|
||||
Installed by:
|
||||
|
||||
(add-to-list 'load-path "/some/path/neotree")
|
||||
|
||||
(require 'neotree)
|
||||
|
||||
(global-set-key [f8] 'neotree-toggle)
|
||||
|
||||
(setq neo-smart-open t)
|
||||
|
||||
|
||||
|
||||
and can be modified with [[id:163e2614-cce0-4e66-a593-a2113a7b3cd1][evil-mode]] in case of complications:
|
||||
|
||||
|
||||
* Use with evil mode
|
||||
If you use evil-mode, by default some of evil key bindings conflict with neotree-mode keys. For example, you cannot use q to hide NeoTree. To make NeoTree key bindings in effect, you can bind those keys in evil-normal-state-local-map in neotree-mode-hook, as shown in below code:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'neotree-mode-hook
|
||||
(lambda ()
|
||||
(define-key evil-normal-state-local-map (kbd "TAB") 'neotree-enter)
|
||||
(define-key evil-normal-state-local-map (kbd "SPC") 'neotree-quick-look)
|
||||
(define-key evil-normal-state-local-map (kbd "q") 'neotree-hide)
|
||||
(define-key evil-normal-state-local-map (kbd "RET") 'neotree-enter)
|
||||
(define-key evil-normal-state-local-map (kbd "g") 'neotree-refresh)
|
||||
(define-key evil-normal-state-local-map (kbd "n") 'neotree-next-line)
|
||||
(define-key evil-normal-state-local-map (kbd "p") 'neotree-previous-line)
|
||||
(define-key evil-normal-state-local-map (kbd "A") 'neotree-stretch-toggle)
|
||||
(define-key evil-normal-state-local-map (kbd "H") 'neotree-hidden-file-toggle)))
|
||||
#+end_src
|
||||
|
||||
In recent versions of evil-mode you can create key bindings for specific modes using evil-define-key, so another way to override mappings in neotree-mode is as shown below:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle)
|
||||
(evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle)
|
||||
#+end_src
|
||||
|
||||
* Keybindings
|
||||
Only in Neotree Buffer:
|
||||
|
||||
n next line, p previous line。
|
||||
SPC or RET or TAB Open current item if it is a file. Fold/Unfold current item if it is a directory.
|
||||
U Go up a directory
|
||||
g Refresh
|
||||
A Maximize/Minimize the NeoTree Window
|
||||
H Toggle display hidden files
|
||||
O Recursively open a directory
|
||||
C-c C-n Create a file or create a directory if filename ends with a ‘/’
|
||||
C-c C-d Delete a file or a directory.
|
||||
C-c C-r Rename a file or a directory.
|
||||
C-c C-c Change the [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] directory.
|
||||
C-c C-p Copy a file or a directory.
|
||||
|
||||
|
||||
10
20230522130636-dired.org
Normal file
10
20230522130636-dired.org
Normal file
@@ -0,0 +1,10 @@
|
||||
:PROPERTIES:
|
||||
:ID: 50326e0d-4ae7-46b3-bcda-27c47f0fe569
|
||||
:END:
|
||||
#+title: dired
|
||||
#+filetags: :EMACS:
|
||||
|
||||
Package for directory management,
|
||||
|
||||
Called by ~C-x C-f~ and navigates with 'Tab' instead of 'Return'. dired is a built-in package of [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]].
|
||||
|
||||
155
20230522130958-deft.org
Normal file
155
20230522130958-deft.org
Normal file
@@ -0,0 +1,155 @@
|
||||
:PROPERTIES:
|
||||
:ID: 3d22fdb5-a322-44d2-a447-83a8708d0637
|
||||
:END:
|
||||
#+title: deft
|
||||
|
||||
Deft is an indexer for plain text files that complements Org-Roam very well. Deft displays the title of the text file as well as the first part of the text in the quickview. For Deft to be able to do this reasonably this tool still has to be configured. This can look like this:
|
||||
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package deft
|
||||
:after org
|
||||
:bind
|
||||
("C-c n d" . deft)
|
||||
:custom
|
||||
(deft-recursive t)
|
||||
(deft-use-filter-string-for-filename t)
|
||||
(deft-default-extension "org")
|
||||
(deft-directory org-roam-directory))
|
||||
|
||||
(advice-add 'deft-parse-title :override
|
||||
(lambda (file contents)
|
||||
(if deft-use-filename-as-title
|
||||
(deft-base-filename file)
|
||||
(let* ((case-fold-search 't)
|
||||
(begin (string-match "title: " contents))
|
||||
(end-of-begin (match-end 0))
|
||||
(end (string-match "\n" contents begin)))
|
||||
(if begin
|
||||
(substring contents end-of-begin end)
|
||||
(format "%s" file))))))
|
||||
|
||||
#+end_src
|
||||
|
||||
It is included in the [[id:2a8d1ed3-dd81-473a-a53a-854bf8182891][hydra-buffer-menu]]. Its alternatives are: [[id:50326e0d-4ae7-46b3-bcda-27c47f0fe569][dired]], [[id:f3aaa9f1-525b-4ae6-9dce-efe22c8b2107][neotree]], and [[id:9aa361f6-b829-49ad-a523-6498dbfb0213][projectile]]
|
||||
|
||||
|
||||
* Deft Manual
|
||||
To open the first matching file, simply press RET. If no files match your search string, RET will create a new file using the string as the title. This is a very fast way to start writing new notes. The filename will be generated automatically. If you prefer to provide a specific filename, use C-RET instead.
|
||||
|
||||
To open files other than the first match, navigate up and down using C-p and C-n and press RET on the file you want to open. When opening a file, Deft searches forward and leaves the point at the end of the first match of the filter string.
|
||||
|
||||
You can also press C-o to open a file in another window, without switching to the other window. Issue the same command with a prefix argument, C-u C-o, to open the file in another window and switch to that window.
|
||||
|
||||
To edit the filter string, press DEL (backspace) to remove the last character or M-DEL to remove the last “word”. To yank (paste) the most recently killed (cut or copied) text into the filter string, press C-y. Press C-c C-c to clear the filter string and display all files and C-c C-g to refresh the file browser using the current filter string.
|
||||
|
||||
For more advanced editing operations, you can also edit the filter string in the minibuffer by pressing C-c C-l. While in the minibuffer, the history of previous edits can be cycled through by pressing M-p and M-n. This form of static, one-time filtering (as opposed to incremental, on-the-fly filtering) may be preferable in some situations, such as over slow connections or on systems where interactive filtering performance is poor.
|
||||
|
||||
By default, Deft filters files in incremental string search mode, where “search string” will match all files containing both “search” and “string” in any order. Alternatively, Deft supports direct regexp filtering, where the filter string is interpreted as a formal regular expression. For example, ^\(foo\|bar\) matches foo or bar at the beginning of a line. Pressing C-c C-t will toggle between incremental and regexp search modes. Regexp search mode is indicated by an “R” in the mode line.
|
||||
|
||||
Common file operations can also be carried out from within Deft. Files can be renamed using C-c C-r or deleted using C-c C-d. New files can also be created using C-c C-n for quick creation or C-c C-m for a filename prompt. You can leave Deft at any time with C-c C-q.
|
||||
|
||||
Unused files can be archived by pressing C-c C-a. Files will be moved to deft-archive-directory, which is a directory named archive within your deft-directory by default.
|
||||
|
||||
Files opened with deft are automatically saved after Emacs has been idle for a customizable number of seconds. This value is a floating point number given by deft-auto-save-interval (default: 1.0).
|
||||
|
||||
Getting Started
|
||||
Once you have installed Deft following one of the above methods, you can simply run M-x deft to start Deft. It is useful to create a global keybinding for the deft function (e.g., a function key) to start it quickly (see below for details).
|
||||
|
||||
When you first run Deft, it will complain that it cannot find the ~/.deft directory. You can either create a symbolic link to another directory where you keep your notes or run M-x deft-setup to create the ~/.deft directory automatically.
|
||||
|
||||
One useful way to use Deft is to keep a directory of notes in a Dropbox folder. This can be used with other applications and mobile devices, for example, nvALT, Notational Velocity, or Simplenote on OS X or Editorial, Byword, or 1Writer on iOS.
|
||||
|
||||
Basic Customization
|
||||
You can customize items in the deft group to change the default functionality.
|
||||
|
||||
By default, Deft looks for notes by searching for files with the extensions .txt, .text, .md, .markdown, or .org in the ~/.deft directory. You can customize both the file extension and the Deft directory by running M-x customize-group and typing deft. Alternatively, you can configure them in your .emacs file:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq deft-extensions '("txt" "tex" "org"))
|
||||
(setq deft-directory "~/Dropbox/notes")
|
||||
#+end_src
|
||||
The first element of deft-extensions (or in Lisp parlance, the car) is the default extension used to create new files.
|
||||
|
||||
By default, Deft only searches for files in deft-directory but not in any subdirectories. All files in deft-directory with one of the specified extensions will be included except for those matching deft-ignore-file-regexp. Set deft-recursive to a non-nil value to enable searching for files in subdirectories (those not matching deft-recursive-ignore-dir-regexp):
|
||||
#+begin_src emacs-lisp
|
||||
(setq deft-recursive t)
|
||||
#+end_src
|
||||
You can easily set up a global keyboard binding for Deft. For example, to bind it to F8, add the following code to your .emacs file:
|
||||
|
||||
(global-set-key [f8] 'deft)
|
||||
If you manage loading packages with use-package, then you can configure by adding a declaration such as this one to your init file:
|
||||
#+begin_src emacs-lisp
|
||||
(use-package deft
|
||||
:bind ("<f8>" . deft)
|
||||
:commands (deft)
|
||||
:config (setq deft-directory "~/Dropbox/notes"
|
||||
deft-extensions '("md" "org")))
|
||||
#+end_src
|
||||
Reading Files
|
||||
The displayed title of each file is taken to be the first line of the file, with certain characters removed from the beginning. Hash characters, as used in Markdown headers, and asterisks, as in Org Mode headers, are removed. Additionally, Org mode #+TITLE: tags, MultiMarkdown Title: tags, LaTeX comment markers, and Emacs mode-line declarations (e.g., -*-mode-*-) are stripped from displayed titles. This can be customized by changing deft-strip-title-regexp.
|
||||
|
||||
More generally, the title post-processing function itself can be customized by setting deft-parse-title-function, which accepts the first line of the file as an argument and returns the parsed title to display in the file browser. The default function is deft-strip-title, which removes all occurrences of deft-strip-title-regexp as described above.
|
||||
|
||||
For compatibility with other applications which use the filename as the title of a note (rather than the first line of the file), set the deft-use-filename-as-title flag to a non-nil value. Deft will then use note filenames to generate the displayed titles in the Deft file browser. To enable this, add the following to your .emacs file:
|
||||
|
||||
(setq deft-use-filename-as-title t)
|
||||
Finally, the short summary that is displayed following the file title can be customized by changing deft-strip-summary-regexp. By default, this is set to remove certain org-mode metadata statements such as #+OPTIONS: and #+AUTHOR:.
|
||||
|
||||
Creating Files
|
||||
Filenames for newly created files are generated by Deft automatically. The process for doing so is determined by the variables deft-use-filename-as-title and deft-use-filter-string-for-filename as well as the rules in the deft-file-naming-rules alist. The possible cases are as follows:
|
||||
|
||||
Default *(deft-use-filename-as-title and deft-use-filter-string-for-filename are both nil)*:
|
||||
|
||||
The filename will be automatically generated using an short, ISO-like timestamp as in 2016-05-12T09:00.txt. The format can be customized by setting the variable deft-new-file-format. The filter string will be inserted as the first line of the file (which is also used as the display title). In case of file name conflicts, an underscore and a numerical suffix (e.g., _2) will be appended before the extension.
|
||||
|
||||
Filenames as titles
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq deft-use-filename-as-title 1):
|
||||
#+end_src
|
||||
|
||||
When deft-use-filename-as-title is non-nil, the filter string will be used as the filename for new files (with the appropriate file extension appended to the end). An example of new file creation in this case:
|
||||
|
||||
Filter string: “My New Project”
|
||||
File name: “My New Project.txt”
|
||||
File contents: [empty]
|
||||
Readable filenames
|
||||
|
||||
(deft-use-filename-as-title is nil but deft-use-filter-string-for-filename is non-nil):
|
||||
|
||||
|
||||
In this case you can choose to display the title as parsed from the first line of the file while also generating readable filenames for new files based on the filter string. The variable deft-use-filter-string-for-filename controls this behavior and decouples the title display (deft-use-filename-as-title) from the actual filename. New filenames will be generated from the filter string and processed according to the rules defined in the deft-file-naming-rules alist. By default, slashes are removed and replaced by hyphens, but many other options are possible (camel case, replacing spaces by hyphens, and so on). See the documentation for deft-file-naming-rules for additional details.
|
||||
|
||||
As an example, with the following value for deft-file-naming-rules, Deft will replace all slashes and spaces with hyphens and will convert the file name to lowercase:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq deft-file-naming-rules
|
||||
'((noslash . "-")
|
||||
(nospace . "-")
|
||||
(case-fn . downcase)))
|
||||
#+end_src
|
||||
|
||||
Below is an example in this case, with the above file naming rules. Notice that the filter string is inserted as the first line of the file but it is also used to generate a “readable” file name.
|
||||
|
||||
Filter string: “My New Project”
|
||||
File name: “my-new-project.txt”
|
||||
File contents: “My New Project”
|
||||
Titles inserted into files from the filter string can also be customized for two common modes, markdown-mode and org-mode, by setting the following variables:
|
||||
|
||||
deft-markdown-mode-title-level - When set to a positive integer, determines how many hash marks will be added to titles in new Markdown files. In other words, setting deft-markdown-mode-title-level to 2 will result in new files being created with level–2 headings of the form ## Title.
|
||||
|
||||
deft-org-mode-title-prefix - When non-nil, automatically generated titles in new org-mode files will be prefixed with #+TITLE:.
|
||||
|
||||
Other Customizations
|
||||
Deft, by default, lists files from newest to oldest. You can set deft-current-sort-method to ’title to sort by file titles, case ignored. Or, you can toggle sorting method using deft-toggle-sort-method.
|
||||
|
||||
Incremental string search is the default method of filtering on startup, but you can set deft-incremental-search to nil to make regexp search the default.
|
||||
|
||||
Deft also provides a function for opening files without using the Deft buffer directly. Calling deft-find-file will prompt for a file to open, much like find-file, but limits consideration to files in deft-directory that are known to Deft (i.e., those files matching deft-extensions). Unlike find-file, a list of all such files is provided and the desired file name can be completed using completing-read (and, as a result, deft-find-file will read/complete filenames using ido, helm, etc. when enabled). If the selected file is in deft-directory, it is opened with the usual Deft features (automatic saving, automatic updating of the Deft buffer, etc.). Otherwise, the file will be opened by find-file as usual. Therefore, you can set up a global keybinding for this function to open Deft files anywhere. For example, to use C-x C-g, a neighbor of C-x C-f, use the following:
|
||||
|
||||
(global-set-key (kbd "C-x C-g") 'deft-find-file)
|
||||
The faces used for highlighting various parts of the screen can also be customized. By default, these faces inherit their properties from the standard font-lock faces defined by your current color theme.
|
||||
|
||||
Deft also provides several hooks: deft-mode-hook, deft-filter-hook, and deft-open-file-hook. See the documentation for these variables for further details.
|
||||
|
||||
37
20230522131320-projectile.org
Normal file
37
20230522131320-projectile.org
Normal file
@@ -0,0 +1,37 @@
|
||||
:PROPERTIES:
|
||||
:ID: 9aa361f6-b829-49ad-a523-6498dbfb0213
|
||||
:END:
|
||||
#+title: projectile
|
||||
#+filetags: :EMACS:
|
||||
|
||||
Projectile is an [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] Package that can be used to manage project files. The package is installed as follows:
|
||||
|
||||
|
||||
|
||||
#+begin_src elisp
|
||||
|
||||
(use-package projectile
|
||||
|
||||
:ensure t
|
||||
|
||||
init
|
||||
|
||||
(projectile-mode +1)
|
||||
|
||||
:bind (:map projectile-mode-map
|
||||
|
||||
("C-c p" . projectile-command-map)))
|
||||
|
||||
(setq projectile-project-search-path '("~/Latex/latex-repo/"))
|
||||
|
||||
(setq projectile-indexing-method 'native)
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
However, the data tree is very cluttered, so folders and files in the .projectile file can be excluded from the index. This is done with the command: -<folder> (without<>) or -*.<end>. This refers to the relative [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] path starting from this file. The file path from the projectile-project-search-path has to be found with the command
|
||||
|
||||
projectile-discover-projects-in-search-path.
|
||||
|
||||
Alternatives:[[id:50326e0d-4ae7-46b3-bcda-27c47f0fe569][dired]], [[id:f3aaa9f1-525b-4ae6-9dce-efe22c8b2107][neotree]], [[id:3d22fdb5-a322-44d2-a447-83a8708d0637][deft]]
|
||||
16
20230522131943-counsel_linux_app.org
Normal file
16
20230522131943-counsel_linux_app.org
Normal file
@@ -0,0 +1,16 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7e6f7176-9223-4dcc-ad4d-1ccf8c38116a
|
||||
:END:
|
||||
#+title: counsel-linux-app
|
||||
#+filetags: :linux:EMACS:
|
||||
|
||||
[[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] tool that can be used to start [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Linux]] [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] applications. These programs may not be easily invoked with [[id:1ef7425a-812f-45d1-812c-6a6ca6397289][dmenu]]. The command is:
|
||||
|
||||
#+begin_src
|
||||
M-x counsel-linux-app
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
This tool parses .desktop files.
|
||||
|
||||
33
20230522132213-org_attach.org
Normal file
33
20230522132213-org_attach.org
Normal file
@@ -0,0 +1,33 @@
|
||||
:PROPERTIES:
|
||||
:ID: b02ca084-7831-4013-8389-45f4cd969e25
|
||||
:END:
|
||||
#+title: org-attach
|
||||
#+filetags: :ORG:EMACS:
|
||||
|
||||
File Storing System based on org headers. For browsing,[[id:9ce51551-fcb1-446a-9924-9dd26f5d56aa][helm-org-rifle]]
|
||||
|
||||
Default Keybinding:
|
||||
|
||||
~C-c C-a~
|
||||
|
||||
(the view may be shifted, scroll up with ~M-v~)
|
||||
|
||||
|
||||
|
||||
Code to try (not yet integrated):
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-attach-directory "~/.emacs.d/data")
|
||||
(setq org-attach-method (quote mv))
|
||||
|
||||
(defun yourname/create_temp_dir ()
|
||||
(setq uuid (org-id-copy))
|
||||
(setq dir_temp (org-attach-id-uuid-folder-format uuid))
|
||||
(setq dir_temp2 (concat org-attach-directory "/" dir_temp "/"))
|
||||
(setq dir_temp_usage (concat org-attach-directory "/" "TEMP/"))
|
||||
(org-set-property "DIR" dir_temp_usage)
|
||||
(copy-directory dir_temp2 dir_temp_usage t t t))
|
||||
|
||||
(global-set-key (kbd "<f12>") (lambda () (interactive) (yourname/create_temp_dir)))
|
||||
#+end_src
|
||||
|
||||
33
20230522132448-helm_org_rifle.org
Normal file
33
20230522132448-helm_org_rifle.org
Normal file
@@ -0,0 +1,33 @@
|
||||
:PROPERTIES:
|
||||
:ID: 9ce51551-fcb1-446a-9924-9dd26f5d56aa
|
||||
:END:
|
||||
#+title: helm-org-rifle
|
||||
#+filetags: :EMACS:ORG::
|
||||
|
||||
Fast-Search-Programme
|
||||
This is my rifle. There are many like it, but this one is mine. My rifle is my best friend. It is my life. I must master it as I must master my life.
|
||||
What does my rifle do? It searches rapidly through my Org files, quickly bringing me the information I need to defeat the enemy.
|
||||
This package is inspired by org-search-goto/org-search-goto-ml. It searches both headings and contents of entries in Org buffers, and it displays entries that match all search terms, whether the terms appear in the heading, the contents, or both. Matching portions of entries’ contents are displayed with surrounding context and grouped by buffer to make it easy to acquire your target.
|
||||
|
||||
* Troubleshooting
|
||||
|
||||
If the package is loaded normally it works, but then annoying error messages are spit out. To fix this you have to set a simple '. The helm-org-rifle.el would then only have to be recompiled, or the corresponding function would have to be added to the init file.
|
||||
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun helm-org-rifle-get-source-for-buffer (buffer)
|
||||
"Return Helm source for BUFFER."
|
||||
(let ((source (helm-build-sync-source (buffer-name buffer)
|
||||
:after-init-hook 'helm-org-rifle-after-init-hook ;;der sTrich muss hin (') wird aber in der helm-rifle.el nicht gesourced...
|
||||
:candidates (lambda ()
|
||||
(when (s-present? helm-pattern)
|
||||
(helm-org-rifle--get-candidates-in-buffer (helm-attr 'buffer) helm-pattern)))
|
||||
:candidate-transformer helm-org-rifle-transformer
|
||||
:match 'identity
|
||||
:multiline helm-org-rifle-multiline
|
||||
:volatile t
|
||||
:action 'helm-org-rifle-actions
|
||||
:keymap helm-org-rifle-map)))
|
||||
(helm-attrset 'buffer buffer source)
|
||||
source))
|
||||
#+end_src
|
||||
133
20230522132904-org_web_tools.org
Normal file
133
20230522132904-org_web_tools.org
Normal file
@@ -0,0 +1,133 @@
|
||||
:PROPERTIES:
|
||||
:ID: f68dfc34-5349-42d1-8074-6c4be231a69b
|
||||
:END:
|
||||
#+title: org-web-tools
|
||||
#+filetags: :ORG:EMACS:
|
||||
|
||||
Toolbox for downloading HTML websites. There are several functions of the framework. We need the external program [[id:75ea690d-deee-4592-ae99-1c2385c208fb][pandoc]] to convert the HTML pages to org-files....
|
||||
|
||||
|
||||
* Commands
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-insert-link-for-url |Insert an Org-mode link to the URL in |
|
||||
| |the clipboard or kill-ring. Downloads |
|
||||
| |the page to get the HTML title. |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-insert-web-page-as-entry |Insert the web page for the URL in the |
|
||||
| |clipboard or kill-ring as an Org-mode |
|
||||
| |entry, as a sibling heading of the |
|
||||
| |current entry. |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-read-url-as-org |Display the web page for the URL in the |
|
||||
| |clipboard or kill-ring as Org-mode text |
|
||||
| |in a new buffer, processed with |
|
||||
| |eww-readable. |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-convert-links-to-page-entries|Convert all URLs and Org links in |
|
||||
| |current Org entry to Org headings, each |
|
||||
| |containing the web page content of that |
|
||||
| |URL, converted to Org-mode text and |
|
||||
| |processed with eww-readable. This should|
|
||||
| |be called on an entry that solely |
|
||||
| |contains a list of URLs or links. |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-archive-attach |Download archive of page at URL and |
|
||||
| |attach with org-attach. If CHOOSE-FN is |
|
||||
| |non-nil (interactively, with universal |
|
||||
| |prefix), prompt for the archive function|
|
||||
| |to use. If VIEW is non-nil |
|
||||
| |(interactively, with two universal |
|
||||
| |prefixes), view the archive immediately |
|
||||
| |after attaching. (See also org-board). |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|org-web-tools-archive-view |Open Zip file archive of web |
|
||||
| |page. Extracts to a temp directory and |
|
||||
| |opens with |
|
||||
| |browse-url-default-browser. Note, the |
|
||||
| |extracted files are left on-disk in the |
|
||||
| |temp directory. |
|
||||
+-------------------------------------------+----------------------------------------+
|
||||
|
||||
* Troubleshooting
|
||||
|
||||
The attach command does not work natively because wget's variables are set incorrectly. The solution is:
|
||||
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-web-tools
|
||||
:ensure t
|
||||
:config
|
||||
(setq org-web-tools-archive-wget-options
|
||||
(delete "--execute robots=off" org-web-tools-archive-wget-options))
|
||||
(setq org-web-tools-archive-wget-html-only-options
|
||||
(delete "--execute robots=off" org-web-tools-archive-wget-html-only-options))
|
||||
|
||||
(add-to-list 'org-web-tools-archive-wget-options "-e robots=off")
|
||||
(add-to-list 'org-web-tools-archive-wget-html-only-options "-e robots=off"))
|
||||
#+end_src
|
||||
|
||||
Nevertheless, the normal attach function cannot be used, but only the command with C-u as prefix (1xtype and then the command. There then HTML-only or tar with resources can be used.
|
||||
|
||||
|
||||
* Functions
|
||||
These are used in the commands above and may be useful in building your own commands.
|
||||
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--dom-to-html |Return parsed HTML DOM as an |
|
||||
| |HTML string. Note: This is an |
|
||||
| |approximation and is not |
|
||||
| |necessarily correct HTML |
|
||||
| |(e.g. IMG tags may be rendered|
|
||||
| |with a closing “</img>” tag). |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--eww-readable |Return “readable” part of HTML|
|
||||
| |with title. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--get-url |Return content for URL as |
|
||||
| |string. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--html-title |Return title of HTML page. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--html-to-org-with-pandoc|Return string of HTML |
|
||||
| |converted to Org with |
|
||||
| |Pandoc. When SELECTOR is |
|
||||
| |non-nil, the HTML is filtered |
|
||||
| |using esxml-query SELECTOR and|
|
||||
| |re-rendered to HTML with |
|
||||
| |org-web-tools--dom-to-html, |
|
||||
| |which see. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--url-as-readable-org |Return string containing Org |
|
||||
| |entry of URL’s web page |
|
||||
| |content. Content is processed |
|
||||
| |with eww-readable and |
|
||||
| |Pandoc. Entry will be a |
|
||||
| |top-level heading, with |
|
||||
| |article contents below a |
|
||||
| |second-level “Article” |
|
||||
| |heading, and a timestamp in |
|
||||
| |the first-level entry for |
|
||||
| |writing comments. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--demote-headings-below |Demote all headings in buffer |
|
||||
| |so the highest level is below |
|
||||
| |LEVEL. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--get-first-url |Return URL in clipboard, or |
|
||||
| |first URL in the kill-ring, or|
|
||||
| |nil if none. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--read-url |Return a URL by searching at |
|
||||
| |point, then in clipboard, then|
|
||||
| |in kill-ring, and finally |
|
||||
| |prompting the user. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--read-org-bracket-link |Return (TARGET . DESCRIPTION) |
|
||||
| |for Org bracket LINK or next |
|
||||
| |link on current line. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|org-web-tools--remove-dos-crlf |Remove all DOS CRLF (^M) in |
|
||||
| |buffer. |
|
||||
+--------------------------------------+------------------------------+
|
||||
|
||||
|
||||
318
20230522133129-pandoc.org
Normal file
318
20230522133129-pandoc.org
Normal file
@@ -0,0 +1,318 @@
|
||||
:PROPERTIES:
|
||||
:ID: 75ea690d-deee-4592-ae99-1c2385c208fb
|
||||
:END:
|
||||
#+title: pandoc
|
||||
#+filetags: :linux:
|
||||
|
||||
Pandoc is a converter tool written in Haskell. Files can be converted from the [[id:d71414fc-349c-4763-a703-9f7092fc90d6][command-line]]. It is a part of the [[id:f68dfc34-5349-42d1-8074-6c4be231a69b][org-web-tools]] but can also be used as a standalone programme.
|
||||
|
||||
|
||||
* [[https://pandoc.org/demos.html][Pandoc - Demos]] :website:
|
||||
|
||||
[2023-03-04 Sa 10:28]
|
||||
|
||||
You can try pandoc online [[http://johnmacfarlane.net/pandoc/try][here]].
|
||||
|
||||
*** Examples
|
||||
|
||||
To see the output created by each of the commands below, click on the name of the output file:
|
||||
|
||||
1. HTML fragment:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt -o example1.html
|
||||
#+end_example
|
||||
|
||||
2. Standalone HTML file:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -o example2.html
|
||||
#+end_example
|
||||
|
||||
3. HTML with table of contents, CSS, and custom footer:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --toc -c pandoc.css -A footer.html MANUAL.txt -o example3.html
|
||||
#+end_example
|
||||
|
||||
4. [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]]:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -o example4.tex
|
||||
#+end_example
|
||||
|
||||
5. From LaTeX to markdown:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s example4.tex -o example5.text
|
||||
#+end_example
|
||||
|
||||
6. reStructuredText:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -t rst --toc MANUAL.txt -o example6.text
|
||||
#+end_example
|
||||
|
||||
7. Rich text format (RTF):
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -o example7.rtf
|
||||
#+end_example
|
||||
|
||||
8. Beamer slide show:
|
||||
|
||||
#+begin_example
|
||||
pandoc -t beamer SLIDES -o example8.pdf
|
||||
#+end_example
|
||||
|
||||
9. DocBook XML:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -t docbook MANUAL.txt -o example9.db
|
||||
#+end_example
|
||||
|
||||
10. Man page:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -t man pandoc.1.md -o example10.1
|
||||
#+end_example
|
||||
|
||||
11. ConTeXt:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -t context MANUAL.txt -o example11.tex
|
||||
#+end_example
|
||||
|
||||
12. Converting a web page to markdown:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -r html http://www.gnu.org/software/make/ -o example12.text
|
||||
#+end_example
|
||||
|
||||
13. From markdown to PDF:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt --pdf-engine=xelatex -o example13.pdf
|
||||
#+end_example
|
||||
|
||||
14. PDF with numbered sections and a custom LaTeX header:
|
||||
|
||||
#+begin_example
|
||||
pandoc -N --variable "geometry=margin=1.2in" --variable mainfont="Palatino" --variable sansfont="Helvetica" --variable monofont="Menlo" --variable fontsize=12pt --variable version=2.0 MANUAL.txt --include-in-header fancyheaders.tex --pdf-engine=xelatex --toc -o example14.pdf
|
||||
#+end_example
|
||||
|
||||
15. ipynb (Jupyter notebook):
|
||||
|
||||
#+begin_example
|
||||
pandoc example15.md -o example15.ipynb
|
||||
#+end_example
|
||||
|
||||
16. HTML slide shows:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --mathml -i -t dzslides SLIDES -o example16a.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --webtex -i -t slidy SLIDES -o example16b.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --mathjax -i -t revealjs SLIDES -o example16d.html
|
||||
#+end_example
|
||||
|
||||
17. TeX math in HTML:
|
||||
|
||||
#+begin_example
|
||||
pandoc math.text -s -o mathDefault.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc math.text -s --mathml -o mathMathML.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc math.text -s --webtex -o mathWebTeX.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc math.text -s --mathjax -o mathMathJax.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc math.text -s --katex -o mathKaTeX.html
|
||||
#+end_example
|
||||
|
||||
18. Syntax highlighting of delimited code blocks:
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style pygments -o example18a.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style kate -o example18b.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style monochrome -o example18c.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style espresso -o example18d.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style haddock -o example18e.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style tango -o example18f.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc code.text -s --highlight-style zenburn -o example18g.html
|
||||
#+end_example
|
||||
|
||||
19. GNU Texinfo, converted to info and HTML formats:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt -s -o example19.texi
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
makeinfo --no-validate --force example19.texi -o example19.info
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
makeinfo --no-validate --force example19.texi --html -o example19
|
||||
#+end_example
|
||||
|
||||
20. OpenDocument XML:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt -s -t opendocument -o example20.xml
|
||||
#+end_example
|
||||
|
||||
21. ODT (OpenDocument Text, readable by OpenOffice):
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt -o example21.odt
|
||||
#+end_example
|
||||
|
||||
22. MediaWiki markup:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s -t mediawiki --toc MANUAL.txt -o example22.wiki
|
||||
#+end_example
|
||||
|
||||
23. EPUB ebook:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.txt -o MANUAL.epub
|
||||
#+end_example
|
||||
|
||||
24. Markdown citations:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --bibliography biblio.bib --citeproc CITATIONS -o example24a.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --bibliography biblio.json --citeproc --csl chicago-fullnote-bibliography.csl CITATIONS -o example24b.html
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
pandoc -s --bibliography biblio.yaml --citeproc --csl ieee.csl CITATIONS -t man -o example24c.1
|
||||
#+end_example
|
||||
|
||||
25. Textile writer:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -t textile -o example25.textile
|
||||
#+end_example
|
||||
|
||||
26. Textile reader:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s example25.textile -f textile -t html -o example26.html
|
||||
#+end_example
|
||||
|
||||
27. [[id:66d0f2d2-f2ea-4ab6-af2c-fefaaab755a5][org-mode]]:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -o example27.org
|
||||
#+end_example
|
||||
|
||||
28. AsciiDoc:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -t asciidoc -o example28.txt
|
||||
#+end_example
|
||||
|
||||
29. Word docx:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s MANUAL.txt -o example29.docx
|
||||
#+end_example
|
||||
|
||||
30. LaTeX math to docx:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s math.tex -o example30.docx
|
||||
#+end_example
|
||||
|
||||
31. DocBook to markdown:
|
||||
|
||||
#+begin_example
|
||||
pandoc -f docbook -t markdown -s howto.xml -o example31.text
|
||||
#+end_example
|
||||
|
||||
32. MediaWiki to html5:
|
||||
|
||||
#+begin_example
|
||||
pandoc -f mediawiki -t html5 -s haskell.wiki -o example32.html
|
||||
#+end_example
|
||||
|
||||
33. Chunked HTML:
|
||||
|
||||
#+begin_example
|
||||
pandoc -t chunkedhtml --split-level=2 --toc --toc-depth=2 --number-sections -o example33 MANUAL.txt
|
||||
#+end_example
|
||||
|
||||
34. Docx with a reference docx:
|
||||
|
||||
#+begin_example
|
||||
pandoc --reference-doc twocolumns.docx -o UsersGuide.docx MANUAL.txt
|
||||
#+end_example
|
||||
|
||||
35. Docx to markdown, including math:
|
||||
|
||||
#+begin_example
|
||||
pandoc -s example30.docx -t markdown -o example35.md
|
||||
#+end_example
|
||||
|
||||
36. EPUB to plain text:
|
||||
|
||||
#+begin_example
|
||||
pandoc MANUAL.epub -t plain -o example36.text
|
||||
#+end_example
|
||||
|
||||
37. Using a template to produce a table from structured data:
|
||||
|
||||
#+begin_example
|
||||
pandoc fishwatch.yaml -t rst --template fishtable.rst -o fish.rst # see also the partial species.rst
|
||||
#+end_example
|
||||
|
||||
38. Converting a bibliography from BibTeX to CSL JSON:
|
||||
|
||||
#+begin_example
|
||||
pandoc biblio.bib -t csljson -o biblio2.json
|
||||
#+end_example
|
||||
|
||||
39. Producing a formatted version of a bibliography:
|
||||
|
||||
#+begin_example
|
||||
pandoc biblio.bib --citeproc --csl ieee.csl -s -o biblio.html
|
||||
#+end_example
|
||||
|
||||
|
||||
86
20230522133530-helm_bibtex.org
Normal file
86
20230522133530-helm_bibtex.org
Normal file
@@ -0,0 +1,86 @@
|
||||
:PROPERTIES:
|
||||
:ID: b3503901-bb4f-4fda-b85f-5e738df311fb
|
||||
:END:
|
||||
#+title: helm-bibtex
|
||||
#+filetags: :EMACS:
|
||||
|
||||
Helm-bibtex is a search engine based on Helm literature. You can specify here the path to the bibtex file and to the corresponding PDF.
|
||||
|
||||
|
||||
* Minimal config
|
||||
#+begin_src emacs-lisp
|
||||
;;(autoload 'helm-bibtex "helm-bibtex" "" t)
|
||||
(use-package helm-bibtex
|
||||
:ensure t
|
||||
)
|
||||
#+end_src
|
||||
A minimal configuration involves telling bibtex-completion where your bibliographies can be found:
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(setq bibtex-completion-bibliography
|
||||
'("/path/to/bibtex-file-1.bib"
|
||||
"/path/to/bibtex-file-2.bib"))
|
||||
|
||||
#+end_src
|
||||
Org-bibtex users can also specify org-mode bibliography files, in which case it will be assumed that a BibTeX file exists with the same name and extension bib instead of org. If the bib file has a different name, use a cons cell ("orgfile.org" . “bibfile.bib") instead:
|
||||
#+begin_src emacs-lisp
|
||||
(setq bibtex-completion-bibliography
|
||||
'("/path/to/bibtex-file-1.bib"
|
||||
"/path/to/org-bibtex-file.org"
|
||||
("/path/to/org-bibtex-file2.org" . "/path/to/bibtex-file.bib")))
|
||||
#+end_src
|
||||
* Basic config
|
||||
Specify where PDFs can be found:
|
||||
#+begin_src emacs-lisp
|
||||
(setq bibtex-completion-library-path '("/path1/to/pdfs" "/path2/to/pdfs"))
|
||||
#+end_src
|
||||
Bibtex-completion assumes that the name of a PDF consists of the BibTeX key followed plus a user-defined suffix (.pdf by default). For example, if a BibTeX entry has the key Darwin1859, bibtex-completion searches for Darwin1859.pdf.
|
||||
|
||||
If the BibTeX entries have a field that specifies the full path to the PDFs, that field can also be used. For example, JabRef and Zotero store the location of PDFs in a field called File:
|
||||
#+begin_src emacs-lisp
|
||||
(setq bibtex-completion-pdf-field "File")
|
||||
#+end_src
|
||||
If bibtex-completion-pdf-field is non-nil, bibtex-completion will first try to retrieve the file specified in this field. If the field is not set for an entry or if the specified file does not exists, bibtex-completion falls back to the method described above (searching for key + .pdf in the directories listed in bibtex-completion-library-path).
|
||||
|
||||
File specifications can be bare paths or follow the format used by JabRef, Zotero, Calibre, and Mendeley. This format also allows the specification of multiple files (e.g., the main paper and supplementary material). Examples:
|
||||
|
||||
File = {/path/to/article.pdf}
|
||||
File = {:/path/to/article.pdf:PDF}
|
||||
File = {:/path/to/article.pdf:PDF;:/path/to/supplementary_materials.pdf:PDF}
|
||||
|
||||
* Notes
|
||||
ibtex-completion supports two methods for storing notes. It can either store all notes in one file or store notes in multiple files, one file per publication. In the first case, the customization variable bibtex-completion-notes-path has to be set to the full path of the notes file:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq bibtex-completion-notes-path "/path/to/notes.org")
|
||||
#+end_src
|
||||
If one file per publication is preferred, bibtex-completion-notes-path should point to the directory used for storing the notes files:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq bibtex-completion-notes-path "/path/to/notes")
|
||||
#+end_src
|
||||
The names of these files consist of the BibTeX key plus a user-defined suffix (.org by default).
|
||||
|
||||
At this point most people will be ready to go. Skip to Usage below to see how to use helm-bibtex and ivy-bibtex.
|
||||
|
||||
* Follow Processor
|
||||
Invoking helm-bibtex or ivy-bibtex when point is on an org-mode citation will automatically select that key. However, the default org-open-at-point on a org citation will take you to the corresponding bibliography entry. The following code will change this behavior to instead open helm-bibtex-follow when following an org citation by entering RET or clicking on it:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-cite-follow-processor 'helm-bibtex-org-cite-follow)
|
||||
#+end_src
|
||||
Note in the case of an org citation with multiple keys, the above code will not preselect any entry when the [cite: portion is selected. See here for the ivy alternative.
|
||||
|
||||
* LaTeX citation commands
|
||||
Bibtex-completion prompts for a LaTeX citation command when inserting citations in LaTeX documents. The list of commands available for auto-completion can be defined using the variable bibtex-completion-cite-commands.
|
||||
|
||||
The default setting includes all cite commands defined in biblatex (except multicite commands and \volcite et al.). If no command is entered, a default command is used which can be configured using bibtex-completion-cite-default-command. The default value for the default command is cite. The variable bibtex-completion-cite-default-as-initial-input controls how the default command is used. If t, it is inserted into the minibuffer before reading input from the user. If nil, it is not inserted into the minibuffer but used as the default if the user doesn’t enter anything.
|
||||
|
||||
By default, bibtex-completion also prompts for the optional pre- and postnotes for the citation. This can be switched off by setting the variable bibtex-completion-cite-prompt-for-optional-arguments to nil.
|
||||
|
||||
See also the section Insert LaTeX cite commands below.
|
||||
* Insert LaTeX cite commands
|
||||
The action for inserting a citation command into a LaTeX document prompts for the citation command and, if applicable, for the pre- and postnote arguments. The prompt for the citation command has its own minibuffer history, which means that previous inputs can be accessed by pressing the <up> key for helm-bibtex or M-p for ivy-bibtex. By pressing <down> it is also possible to access the list of all citation commands defined in biblatex (except for multicite commands and volcite et al. which have different argument structures). The prompt also supports auto-completion via the tab key. If no command is entered, the default command is used. The default command is defined in the customization variable bibtex-completion-cite-default-command. By default, helm-bibtex and ivy-bibtex prompt for pre- and postnotes for the citation. This can be switched off by setting the variable bibtex-completion-cite-prompt-for-optional-arguments to nil.
|
||||
|
||||
|
||||
|
||||
16
20230522133838-org_roam.org
Normal file
16
20230522133838-org_roam.org
Normal file
@@ -0,0 +1,16 @@
|
||||
:PROPERTIES:
|
||||
:ID: 9d782b7c-5d45-4963-96f4-ee01a00ba280
|
||||
:END:
|
||||
#+title: org-roam
|
||||
#+filetags: :EMACS:ORG:
|
||||
|
||||
|
||||
Org-roam is an application in [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] that allows to index [[id:66d0f2d2-f2ea-4ab6-af2c-fefaaab755a5][org]] files and collect them in a database. Among other things, this can be used to create a "second brain". By default, every heading and org document that is in the Roam directory is added to the database. This behavior can be prevented with a property.
|
||||
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; :PROPERTIES:
|
||||
;;:ID: foo
|
||||
;;:ROAM_EXCLUDE: t
|
||||
;;:END:
|
||||
#+end_src
|
||||
14
20230522134224-org_mode.org
Normal file
14
20230522134224-org_mode.org
Normal file
@@ -0,0 +1,14 @@
|
||||
:PROPERTIES:
|
||||
:ID: 66d0f2d2-f2ea-4ab6-af2c-fefaaab755a5
|
||||
:END:
|
||||
#+title: org-mode
|
||||
#+filetags: :INDEX:EMACS:ORG:
|
||||
|
||||
Org-Mode is an [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] built-in that allows to create markdown-like notes. It is the basic framework for various other Emacs packages and programs. A list of these programs follows here.
|
||||
|
||||
* Index
|
||||
** [[id:9ce51551-fcb1-446a-9924-9dd26f5d56aa][helm-org-rifle]]
|
||||
** [[id:f68dfc34-5349-42d1-8074-6c4be231a69b][org-web-tools]]
|
||||
** [[id:7bd1f7dd-fcb2-4efc-a4df-f233a4bf3fcd][org-gcal]]
|
||||
** [[id:b02ca084-7831-4013-8389-45f4cd969e25][org-attach]]
|
||||
** [[id:7f5dafdd-7d74-4551-bd7b-666729b1c1d4][org-marginalia]]
|
||||
64
20230522134437-org_marginalia.org
Normal file
64
20230522134437-org_marginalia.org
Normal file
@@ -0,0 +1,64 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7f5dafdd-7d74-4551-bd7b-666729b1c1d4
|
||||
:END:
|
||||
#+title: org-marginalia
|
||||
Org-marginalia ist ein [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] addon Package, welches es ermöglicht, Notes an ordinäre .org-Files anzuhängen und diese auch zu markieren. Dieses Package ist nicht in [[id:79bae242-a2b4-4753-9960-1f929c8c6300][melpa]] enthalten und muss deshalb über die Befehle
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'load-path "~/.emacs.d/packages/marginalia")
|
||||
#+end_src
|
||||
|
||||
und
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'org-marginalia)
|
||||
#+end_src
|
||||
Eingefügt werden.
|
||||
|
||||
Außerdem wird der Mode noch in die Texthook eingefügt.
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(setq om/notes-file-path "~/org/annotations/file-notes/diss_notes.org")
|
||||
(add-hook 'after-init-hook (lambda()
|
||||
(add-to-list 'load-path "~/local-repos/org-marginalia/")
|
||||
(require 'org-marginalia)
|
||||
(add-hook 'text-mode-hook #'org-marginalia-mode 1)
|
||||
|
||||
|
||||
#+end_src
|
||||
|
||||
Die Markierungen müssen manuell über ~om/save~ gespeichert werden, ansonsten muss das in die "after-save-hook"
|
||||
|
||||
* Befehle
|
||||
** ~org-marginalia-mode~
|
||||
Org-marginalia is a local minor mode. Toggle it on/off with using org-marginalia-mode. On activating, it loads your saved highlights from the marginalia file (defined by om/notes-file-path), and enables automatic saving of highlights. The automatic saving is achieved via function om/save added to after-save-hook.
|
||||
|
||||
** ~om/mark~ (C-c m by default)
|
||||
Select a region of text, and call om/mark to highlight the region. It will generate a new ID, and start tracking the location – so you can edit text around the highlighted text. Do not cut, copy and paste as the highlight will disappear and it is a bit tricky to recover it. To create a new margin note entry in the marginalia file, save the buffer.
|
||||
|
||||
** ~om/save~
|
||||
By default, Org-marginalia automatically creates or updates corresponding entries in the marginalia file with location and text of highlights on saving the buffer. Nevertheless, you can manually call om/save to do so (automatic process also call this command).
|
||||
|
||||
** ~om/open~ (C-c n o by default)
|
||||
Move your cursor on the highlighted text, and call om/open to open the relevant margin notes in a separate window. Your cursor will move to the marginalia buffer narrowed to the relevant margin notes entry. You can edit the marginalia buffer as a normal Org buffer. Once you have done editing, you may simply save and close the it (kill it or close the window) as per your normal workflow. Technically, the marginalia buffer is a cloned indirect buffer of the marginalia file.
|
||||
|
||||
** ~om/load~
|
||||
This command visits the marginalia file and loads the saved highlights onto the current buffer. If there is no margin notes for it, it will output a message in the echo. Highlights tracked locally by Org-marginalia cannot persist when you kill the buffer, or quit Emacs. When you re-launch Emacs, ensure to turn on org-marginalia-mode to load the highlights. Loading is automatically done when you activate the minor mode.
|
||||
|
||||
** ~om/remove~
|
||||
This command removes the highlight at point. It will remove the highlight, and remove the properties from the marginalia, but will keep the headline and notes in tact.
|
||||
|
||||
** ~om/next~ (C-c n ] by default)
|
||||
Move to the next highlight if any. If there is none below the cursor, and there is a highlight above, loop back to the top one.
|
||||
|
||||
** ~om/prev~ (C-c n [ by default)
|
||||
Move to the previous highlight if any. If there is none above the cursor, and there is a highlight below, loop back to the bottom one.
|
||||
|
||||
** ~om/toggle~
|
||||
Toggle showing/hiding of highlighters in current buffer. It only affects the display of the highlighters. When hidden, highlights’ locations are still kept tracked; thus, upon buffer-save the correct locations are still recorded in the marginalia file.
|
||||
|
||||
* Customizing
|
||||
You can customize settings in the ~org-marginalia~ group.
|
||||
Highlight’s face can be changed via ~om/highlighter~
|
||||
Marginalia file is defined by ~om/notes-file-path~
|
||||
|
||||
22
20230522134551-melpa.org
Normal file
22
20230522134551-melpa.org
Normal file
@@ -0,0 +1,22 @@
|
||||
:PROPERTIES:
|
||||
:ID: 79bae242-a2b4-4753-9960-1f929c8c6300
|
||||
:END:
|
||||
#+title: melpa
|
||||
#+filetags: :EMACS:
|
||||
|
||||
MELPA (Milkypostman's Emacs Lisp Package Archive) is a package manager of [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]], the [[id:4e30f168-3601-4b99-9daa-790161c03901][elpa]] extension to some (many) more packages.
|
||||
|
||||
|
||||
* Up-to-date packages built on our [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][servers]] from upstream source
|
||||
* Installable in any Emacs with 'package.el'
|
||||
no local version-control tools needed
|
||||
* Curated
|
||||
no obsolete, renamed, forked or randomly hacked packages
|
||||
* Comprehensive
|
||||
more packages than any other archive
|
||||
* Automatic updates
|
||||
new commits result in new packages
|
||||
* Extensible
|
||||
contribute new recipes, and we'll build the packages
|
||||
|
||||
|
||||
9
20230522134725-elpa.org
Normal file
9
20230522134725-elpa.org
Normal file
@@ -0,0 +1,9 @@
|
||||
:PROPERTIES:
|
||||
:ID: 4e30f168-3601-4b99-9daa-790161c03901
|
||||
:END:
|
||||
#+title: elpa
|
||||
#+filetags: :EMACS:
|
||||
|
||||
ELPA is the Emacs Lisp [[id:b7c4f849-d1b1-4837-8634-82f6976a1473][package archive]], written originally by TomTromey. It is included in Gnu [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] starting with version 24. package.el is the package manager library for ELPA. another possible package archive is [[id:79bae242-a2b4-4753-9960-1f929c8c6300][melpa]].
|
||||
|
||||
|
||||
16
20230523094356-betterlockscreen.org
Normal file
16
20230523094356-betterlockscreen.org
Normal file
@@ -0,0 +1,16 @@
|
||||
:PROPERTIES:
|
||||
:ID: 71c7b2c6-8601-446c-bdbb-3598d74be178
|
||||
:END:
|
||||
#+title: betterlockscreen
|
||||
|
||||
The lockscreen used by [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] and [[id:2f4f9e1b-ed75-4e35-b6db-b26ab8f60c15][archlinux-logout]]. Is also called Arcolinux-betterlockscreen.
|
||||
* Location
|
||||
Location: ~/.config/arcolinux-betterlockscreen
|
||||
* Commands
|
||||
** -u /Path/to/file
|
||||
*** Bilder Cashen
|
||||
*** Funktioniert nicht mit Arcologout
|
||||
*** ohne ""
|
||||
** -l
|
||||
*** lock den Bildschirm mit dem gecashten Bild
|
||||
|
||||
17
20230523094510-archlinux_logout.org
Normal file
17
20230523094510-archlinux_logout.org
Normal file
@@ -0,0 +1,17 @@
|
||||
:PROPERTIES:
|
||||
:ID: 2f4f9e1b-ed75-4e35-b6db-b26ab8f60c15
|
||||
:END:
|
||||
#+title: archlinux-logout
|
||||
|
||||
Locking manager used by [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]]. Is used by the [[id:0613de5a-4b4f-429a-ba52-09d63c0a92d6][window-manager]] to lock the session or to shut it down.
|
||||
|
||||
* Key-combination
|
||||
#+begin_src bash
|
||||
[super-x]
|
||||
#+end_src
|
||||
* Location
|
||||
#+begin_src bash
|
||||
~/.config/archlinux-logout/archlinux-logout.conf
|
||||
#+end_src
|
||||
* Integrates
|
||||
[[id:71c7b2c6-8601-446c-bdbb-3598d74be178][betterlockscreen]]
|
||||
13
20230523095800-keychain.org
Normal file
13
20230523095800-keychain.org
Normal file
@@ -0,0 +1,13 @@
|
||||
:PROPERTIES:
|
||||
:ID: 404dad63-5eb6-4328-ae85-475874b48ac4
|
||||
:END:
|
||||
#+title: keychain
|
||||
#+filetags: :linux:
|
||||
|
||||
A Linux program that allows access to the gpg keychain. The password should only have to be entered once. Keychain is called in the HerbstluftWM config.
|
||||
|
||||
* The command there is:
|
||||
#+begin_src sh
|
||||
keychain --agents gpg
|
||||
#+end_src
|
||||
This will only consider the gpg agents, but not the ssh agents.
|
||||
40
20230523100211-pulse_audio.org
Normal file
40
20230523100211-pulse_audio.org
Normal file
@@ -0,0 +1,40 @@
|
||||
:PROPERTIES:
|
||||
:ID: efaaf6e8-b638-497b-bfc2-366d64f2413b
|
||||
:END:
|
||||
#+title: pulse-audio
|
||||
#+filetags: :linux:
|
||||
|
||||
Linux program to control the audio drivers. Does not work very well with the Sounblaster-Z soundcard. It works only an old version with old alsa-card-profiles. The update of Pulseaudio, alsa and alsa-cardprofiles is suspended so that these programs are not updated.
|
||||
|
||||
An update should therefore always be performed via update and not via pacman -Suy.
|
||||
|
||||
|
||||
|
||||
If this is the case, you can use the command:
|
||||
[[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] access needed ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
|
||||
#+begin_src bash
|
||||
sudo pacman -U /var/cache/pacman/pkg/libpulse-14.2-3-x86_64.pkg.tar.zst /var/cache/pacman/pkg/pulseaudio-14.2-3-x86_64.pkg.tar.zst /var/cache/pacman/pkg/alsa-card-profiles-1\:0.3.32-1-x86_64.pkg.tar.zst
|
||||
#+end_src
|
||||
|
||||
Restore the old constellation.
|
||||
|
||||
|
||||
|
||||
Otherwise simply:
|
||||
|
||||
#+begin_src
|
||||
alsactl init
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
|
||||
Solutions that did not work:
|
||||
|
||||
#+begin_src bash
|
||||
options snd-hda-intel dmic_detect=0
|
||||
|
||||
options snd-hda-intel model=generic
|
||||
#+end_src
|
||||
|
||||
Those [[id:18661cd7-f886-48b7-91e6-190ebe24a6df][pulse-audio-settings]] could make audio quality better.
|
||||
50
20230523100635-pulse_audio_settings.org
Normal file
50
20230523100635-pulse_audio_settings.org
Normal file
@@ -0,0 +1,50 @@
|
||||
:PROPERTIES:
|
||||
:ID: 18661cd7-f886-48b7-91e6-190ebe24a6df
|
||||
:END:
|
||||
#+title: pulse-audio-settings
|
||||
#+filetags: :linux:pulse-audio:
|
||||
|
||||
|
||||
* Binaural audio with OpenAL
|
||||
For games using OpenAL, if you use headphones you may get much better positional audio using OpenAL's HRTF filters. To enable, run the following command:
|
||||
|
||||
#+begin_src bash
|
||||
echo "hrtf = true" >> ~/.alsoftrc
|
||||
#+end_src
|
||||
Alternatively, install openal-hrtfAUR from the AUR, and edit the options in /etc/openal/alsoftrc.conf
|
||||
|
||||
For Source games, the ingame setting `dsp_slow_cpu` must be set to `1` to enable HRTF, otherwise the game will enable its own processing instead. You will also either need to set up Steam to use native runtime, or link its copy of openal.so to your own local copy. For completeness, also use the following options:
|
||||
|
||||
#+begin_src bash
|
||||
dsp_slow_cpu 1 # Disable in-game spatialiazation
|
||||
#+end_src
|
||||
|
||||
snd_spatialize_roundrobin 1 # Disable spatialization 1.0*100% of sounds
|
||||
dsp_enhance_stereo 0 # Disable DSP sound effects. You may want to leave this on, if you find it does not interfere with your perception of the sound effects.
|
||||
snd_pitchquality 1 # Use high quality sounds
|
||||
* Tuning PulseAudio
|
||||
If you are using PulseAudio, you may wish to tweak some default settings to make sure it is running optimally.
|
||||
|
||||
** Enabling realtime priority and negative nice level
|
||||
Pulseaudio is built to be run with realtime priority, being an audio daemon. However, because of security risks of it locking up the system, it is scheduled as a regular thread by default. To adjust this, first make sure you are in the audio group. Then, uncomment and edit the following lines in /etc/pulse/daemon.conf:
|
||||
|
||||
/etc/pulse/daemon.conf
|
||||
#+begin_src bash
|
||||
high-priority = yes
|
||||
nice-level = -11
|
||||
|
||||
realtime-scheduling = yes
|
||||
realtime-priority = 5
|
||||
#+end_src
|
||||
and restart pulseaudio.
|
||||
|
||||
** Using higher quality remixing for better sound
|
||||
PulseAudio on Arch uses speex-float-1 by default to remix channels, which is considered a 'medium-low' quality remixing. If your system can handle the extra load, you may benefit from setting it to one of the following instead:
|
||||
|
||||
#+begin_src bash
|
||||
resample-method = speex-float-10
|
||||
#+end_src
|
||||
|
||||
** Matching hardware buffers to Pulse's buffering
|
||||
Matching the buffers can reduce stuttering and increase performance marginally. See here for more details.
|
||||
|
||||
30
20230523101440-xdg.org
Normal file
30
20230523101440-xdg.org
Normal file
@@ -0,0 +1,30 @@
|
||||
:PROPERTIES:
|
||||
:ID: 6c1849a8-ab61-4ab1-b2e8-97d1d0dfb0fd
|
||||
:END:
|
||||
#+title: xdg
|
||||
#+filetags: :linux:
|
||||
|
||||
XDG is a tool that works with mimetypes. With the aid of xdg standard programs can be assigned to certain mimetypes, standard programs can be queried or mimetypes of programs can be displayed
|
||||
|
||||
All standard programs are in the file
|
||||
#+begin_src bash
|
||||
~.config/mimeapps.list
|
||||
#+end_src
|
||||
|
||||
There also the input of xdg-mime default is stored.
|
||||
|
||||
* Command
|
||||
** xdg-open <file>
|
||||
opens the file with the default program specified for the file's mimetype.
|
||||
|
||||
** xdg-open <file>
|
||||
opens the file with the default program specified for the file's mimetype.
|
||||
** xdg-mime
|
||||
*** query
|
||||
Performs a query, after:
|
||||
**** filetype <file>
|
||||
xdg-mime query filetype <file> gibt den Mimetype dieser Datei zurück
|
||||
**** default <Mimetype>
|
||||
xdg-mime query filetype <file> returns the mimetype of this file
|
||||
*** default
|
||||
xdg-mime default <program>.desktop <mimetype> sets the named program as the default program for the named mimetype, provided that this program has a ~.desktop~ entry in (user generated) ~/home/<user/.local/share/applications/~. The path whe ~.desktop~ files are stored by the system; /~/usr/share/applications/ or /usr/local/share/applications~/
|
||||
20
20230523101551-mimetypes.org
Normal file
20
20230523101551-mimetypes.org
Normal file
@@ -0,0 +1,20 @@
|
||||
:PROPERTIES:
|
||||
:ID: d60f8060-4557-42d5-831d-b68bfb42df59
|
||||
:END:
|
||||
#+title: mimetypes
|
||||
#+filetags: :linux:
|
||||
|
||||
A MIME type or "media type" is a text string that identifies a particular file format.
|
||||
|
||||
It consists of two parts - a type and a subtype - separated by a slash.
|
||||
|
||||
For example, the MIME type of a plain text file is:
|
||||
|
||||
|
||||
|
||||
text/plain
|
||||
|
||||
Mimetypes and their interaction can be edited with the [[id:6c1849a8-ab61-4ab1-b2e8-97d1d0dfb0fd][xdg]] tool.
|
||||
|
||||
The [[id:870ccd4f-605f-468f-b094-5c1c953079d3][mimetype-list]] includes a large list of mimetypes and their matching file extensions.
|
||||
|
||||
658
20230523101806-mimetype_list.org
Normal file
658
20230523101806-mimetype_list.org
Normal file
@@ -0,0 +1,658 @@
|
||||
:PROPERTIES:
|
||||
:ID: 870ccd4f-605f-468f-b094-5c1c953079d3
|
||||
:END:
|
||||
#+title: mimetype-list
|
||||
#+filetags: :linux:mimetype:
|
||||
|
||||
An incomplete list of mimetypes:
|
||||
|
||||
| Suffixes applicable | Media type and subtype(s) |
|
||||
|---------------------+-------------------------------------------------------|
|
||||
| .3dm | x-world/x-3dmf |
|
||||
| .3dmf | x-world/x-3dmf |
|
||||
| .a | application/octet-stream |
|
||||
| .aab | application/x-authorware-bin |
|
||||
| .aam | application/x-authorware-map |
|
||||
| .aas | application/x-authorware-seg |
|
||||
| .abc | text/vnd.abc |
|
||||
| .acgi | text/html |
|
||||
| .afl | video/animaflex |
|
||||
| .ai | application/postscript |
|
||||
| .aif | audio/aiff |
|
||||
| .aif | audio/x-aiff |
|
||||
| .aifc | audio/aiff |
|
||||
| .aifc | audio/x-aiff |
|
||||
| .aiff | audio/aiff |
|
||||
| .aiff | audio/x-aiff |
|
||||
| .aim | application/x-aim |
|
||||
| .aip | text/x-audiosoft-intra |
|
||||
| .ani | application/x-navi-animation |
|
||||
| .aos | application/x-nokia-9000-communicator-add-on-software |
|
||||
| .aps | application/mime |
|
||||
| .arc | application/octet-stream |
|
||||
| .arj | application/arj |
|
||||
| .arj | application/octet-stream |
|
||||
| .art | image/x-jg |
|
||||
| .asf | video/x-ms-asf |
|
||||
| .asm | text/x-asm |
|
||||
| .asp | text/asp |
|
||||
| .asx | application/x-mplayer2 |
|
||||
| .asx | video/x-ms-asf |
|
||||
| .asx | video/x-ms-asf-plugin |
|
||||
| .au | audio/basic |
|
||||
| .au | audio/x-au |
|
||||
| .avi | application/x-troff-msvideo |
|
||||
| .avi | video/avi |
|
||||
| .avi | video/msvideo |
|
||||
| .avi | video/x-msvideo |
|
||||
| .avs | video/avs-video |
|
||||
| .bcpio | application/x-bcpio |
|
||||
| .bin | application/mac-binary |
|
||||
| .bin | application/macbinary |
|
||||
| .bin | application/octet-stream |
|
||||
| .bin | application/x-binary |
|
||||
| .bin | application/x-macbinary |
|
||||
| .bm | image/bmp |
|
||||
| .bmp | image/bmp |
|
||||
| .bmp | image/x-windows-bmp |
|
||||
| .boo | application/book |
|
||||
| .book | application/book |
|
||||
| .boz | application/x-bzip2 |
|
||||
| .bsh | application/x-bsh |
|
||||
| .bz | application/x-bzip |
|
||||
| .bz2 | application/x-bzip2 |
|
||||
| .c | text/plain |
|
||||
| .c | text/x-c |
|
||||
| .c++ | text/plain |
|
||||
| .cat | application/vnd.ms-pki.seccat |
|
||||
| .cc | text/plain |
|
||||
| .cc | text/x-c |
|
||||
| .ccad | application/clariscad |
|
||||
| .cco | application/x-cocoa |
|
||||
| .cdf | application/cdf |
|
||||
| .cdf | application/x-cdf |
|
||||
| .cdf | application/x-netcdf |
|
||||
| .cer | application/pkix-cert |
|
||||
| .cer | application/x-x509-ca-cert |
|
||||
| .cha | application/x-chat |
|
||||
| .chat | application/x-chat |
|
||||
| .class | application/java |
|
||||
| .class | application/java-byte-code |
|
||||
| .class | application/x-java-class |
|
||||
| .com | application/octet-stream |
|
||||
| .com | text/plain |
|
||||
| .conf | text/plain |
|
||||
| .cpio | application/x-cpio |
|
||||
| .cpp | text/x-c |
|
||||
| .cpt | application/mac-compactpro |
|
||||
| .cpt | application/x-compactpro |
|
||||
| .cpt | application/x-cpt |
|
||||
| .crl | application/pkcs-crl |
|
||||
| .crl | application/pkix-crl |
|
||||
| .crt | application/pkix-cert |
|
||||
| .crt | application/x-x509-ca-cert |
|
||||
| .crt | application/x-x509-user-cert |
|
||||
| .csh | application/x-csh |
|
||||
| .csh | text/x-script.csh |
|
||||
| .css | application/x-pointplus |
|
||||
| .css | text/css |
|
||||
| .cxx | text/plain |
|
||||
| .dcr | application/x-director |
|
||||
| .deepv | application/x-deepv |
|
||||
| .def | text/plain |
|
||||
| .der | application/x-x509-ca-cert |
|
||||
| .dif | video/x-dv |
|
||||
| .dir | application/x-director |
|
||||
| .dl | video/dl |
|
||||
| .dl | video/x-dl |
|
||||
| .doc | application/msword |
|
||||
| .dot | application/msword |
|
||||
| .dp | application/commonground |
|
||||
| .drw | application/drafting |
|
||||
| .dump | application/octet-stream |
|
||||
| .dv | video/x-dv |
|
||||
| .dvi | application/x-dvi |
|
||||
| .dwf | drawing/x-dwf (old) |
|
||||
| .dwf | model/vnd.dwf |
|
||||
| .dwg | application/acad |
|
||||
| .dwg | image/vnd.dwg |
|
||||
| .dwg | image/x-dwg |
|
||||
| .dxf | application/dxf |
|
||||
| .dxf | image/vnd.dwg |
|
||||
| .dxf | image/x-dwg |
|
||||
| .dxr | application/x-director |
|
||||
| .el | text/x-script.elisp |
|
||||
| .elc | application/x-bytecode.elisp (compiled elisp) |
|
||||
| .elc | application/x-elc |
|
||||
| .env | application/x-envoy |
|
||||
| .eps | application/postscript |
|
||||
| .es | application/x-esrehber |
|
||||
| .etx | text/x-setext |
|
||||
| .evy | application/envoy |
|
||||
| .evy | application/x-envoy |
|
||||
| .exe | application/octet-stream |
|
||||
| .f | text/plain |
|
||||
| .f | text/x-fortran |
|
||||
| .f77 | text/x-fortran |
|
||||
| .f90 | text/plain |
|
||||
| .f90 | text/x-fortran |
|
||||
| .fdf | application/vnd.fdf |
|
||||
| .fif | application/fractals |
|
||||
| .fif | image/fif |
|
||||
| .fli | video/fli |
|
||||
| .fli | video/x-fli |
|
||||
| .flo | image/florian |
|
||||
| .flx | text/vnd.fmi.flexstor |
|
||||
| .fmf | video/x-atomic3d-feature |
|
||||
| .for | text/plain |
|
||||
| .for | text/x-fortran |
|
||||
| .fpx | image/vnd.fpx |
|
||||
| .fpx | image/vnd.net-fpx |
|
||||
| .frl | application/freeloader |
|
||||
| .funk | audio/make |
|
||||
| .g | text/plain |
|
||||
| .g3 | image/g3fax |
|
||||
| .gif | image/gif |
|
||||
| .gl | video/gl |
|
||||
| .gl | video/x-gl |
|
||||
| .gsd | audio/x-gsm |
|
||||
| .gsm | audio/x-gsm |
|
||||
| .gsp | application/x-gsp |
|
||||
| .gss | application/x-gss |
|
||||
| .gtar | application/x-gtar |
|
||||
| .gz | application/x-compressed |
|
||||
| .gz | application/x-gzip |
|
||||
| .gzip | application/x-gzip |
|
||||
| .gzip | multipart/x-gzip |
|
||||
| .h | text/plain |
|
||||
| .h | text/x-h |
|
||||
| .hdf | application/x-hdf |
|
||||
| .help | application/x-helpfile |
|
||||
| .hgl | application/vnd.hp-hpgl |
|
||||
| .hh | text/plain |
|
||||
| .hh | text/x-h |
|
||||
| .hlb | text/x-script |
|
||||
| .hlp | application/hlp |
|
||||
| .hlp | application/x-helpfile |
|
||||
| .hlp | application/x-winhelp |
|
||||
| .hpg | application/vnd.hp-hpgl |
|
||||
| .hpgl | application/vnd.hp-hpgl |
|
||||
| .hqx | application/binhex |
|
||||
| .hqx | application/binhex4 |
|
||||
| .hqx | application/mac-binhex |
|
||||
| .hqx | application/mac-binhex40 |
|
||||
| .hqx | application/x-binhex40 |
|
||||
| .hqx | application/x-mac-binhex40 |
|
||||
| .hta | application/hta |
|
||||
| .htc | text/x-component |
|
||||
| .htm | text/html |
|
||||
| .html | text/html |
|
||||
| .htmls | text/html |
|
||||
| .htt | text/webviewhtml |
|
||||
| .htx | text/html |
|
||||
| .ice | x-conference/x-cooltalk |
|
||||
| .ico | image/x-icon |
|
||||
| .idc | text/plain |
|
||||
| .ief | image/ief |
|
||||
| .iefs | image/ief |
|
||||
| .iges | application/iges |
|
||||
| .iges | model/iges |
|
||||
| .igs | application/iges |
|
||||
| .igs | model/iges |
|
||||
| .ima | application/x-ima |
|
||||
| .imap | application/x-httpd-imap |
|
||||
| .inf | application/inf |
|
||||
| .ins | application/x-internett-signup |
|
||||
| .ip | application/x-ip2 |
|
||||
| .isu | video/x-isvideo |
|
||||
| .it | audio/it |
|
||||
| .iv | application/x-inventor |
|
||||
| .ivr | i-world/i-vrml |
|
||||
| .ivy | application/x-livescreen |
|
||||
| .jam | audio/x-jam |
|
||||
| .jav | text/plain |
|
||||
| .jav | text/x-java-source |
|
||||
| .java | text/plain |
|
||||
| .java | text/x-java-source |
|
||||
| .jcm | application/x-java-commerce |
|
||||
| .jfif | image/jpeg |
|
||||
| .jfif | image/pjpeg |
|
||||
| .jfif-tbnl | image/jpeg |
|
||||
| .jpe | image/jpeg |
|
||||
| .jpe | image/pjpeg |
|
||||
| .jpeg | image/jpeg |
|
||||
| .jpeg | image/pjpeg |
|
||||
| .jpg | image/jpeg |
|
||||
| .jpg | image/pjpeg |
|
||||
| .jps | image/x-jps |
|
||||
| .js | application/x-javascript |
|
||||
| .js | application/javascript |
|
||||
| .js | application/ecmascript |
|
||||
| .js | text/javascript |
|
||||
| .js | text/ecmascript |
|
||||
| .jut | image/jutvision |
|
||||
| .kar | audio/midi |
|
||||
| .kar | music/x-karaoke |
|
||||
| .ksh | application/x-ksh |
|
||||
| .ksh | text/x-script.ksh |
|
||||
| .la | audio/nspaudio |
|
||||
| .la | audio/x-nspaudio |
|
||||
| .lam | audio/x-liveaudio |
|
||||
| .latex | application/x-latex |
|
||||
| .lha | application/lha |
|
||||
| .lha | application/octet-stream |
|
||||
| .lha | application/x-lha |
|
||||
| .lhx | application/octet-stream |
|
||||
| .list | text/plain |
|
||||
| .lma | audio/nspaudio |
|
||||
| .lma | audio/x-nspaudio |
|
||||
| .log | text/plain |
|
||||
| .lsp | application/x-lisp |
|
||||
| .lsp | text/x-script.lisp |
|
||||
| .lst | text/plain |
|
||||
| .lsx | text/x-la-asf |
|
||||
| .ltx | application/x-latex |
|
||||
| .lzh | application/octet-stream |
|
||||
| .lzh | application/x-lzh |
|
||||
| .lzx | application/lzx |
|
||||
| .lzx | application/octet-stream |
|
||||
| .lzx | application/x-lzx |
|
||||
| .m | text/plain |
|
||||
| .m | text/x-m |
|
||||
| .m1v | video/mpeg |
|
||||
| .m2a | audio/mpeg |
|
||||
| .m2v | video/mpeg |
|
||||
| .m3u | audio/x-mpequrl |
|
||||
| .man | application/x-troff-man |
|
||||
| .map | application/x-navimap |
|
||||
| .mar | text/plain |
|
||||
| .mbd | application/mbedlet |
|
||||
| .mc$ | application/x-magic-cap-package-1.0 |
|
||||
| .mcd | application/mcad |
|
||||
| .mcd | application/x-mathcad |
|
||||
| .mcf | image/vasa |
|
||||
| .mcf | text/mcf |
|
||||
| .mcp | application/netmc |
|
||||
| .me | application/x-troff-me |
|
||||
| .mht | message/rfc822 |
|
||||
| .mhtml | message/rfc822 |
|
||||
| .mid | application/x-midi |
|
||||
| .mid | audio/midi |
|
||||
| .mid | audio/x-mid |
|
||||
| .mid | audio/x-midi |
|
||||
| .mid | music/crescendo |
|
||||
| .mid | x-music/x-midi |
|
||||
| .midi | application/x-midi |
|
||||
| .midi | audio/midi |
|
||||
| .midi | audio/x-mid |
|
||||
| .midi | audio/x-midi |
|
||||
| .midi | music/crescendo |
|
||||
| .midi | x-music/x-midi |
|
||||
| .mif | application/x-frame |
|
||||
| .mif | application/x-mif |
|
||||
| .mime | message/rfc822 |
|
||||
| .mime | www/mime |
|
||||
| .mjf | audio/x-vnd.audioexplosion.mjuicemediafile |
|
||||
| .mjpg | video/x-motion-jpeg |
|
||||
| .mm | application/base64 |
|
||||
| .mm | application/x-meme |
|
||||
| .mme | application/base64 |
|
||||
| .mod | audio/mod |
|
||||
| .mod | audio/x-mod |
|
||||
| .moov | video/quicktime |
|
||||
| .mov | video/quicktime |
|
||||
| .movie | video/x-sgi-movie |
|
||||
| .mp2 | audio/mpeg |
|
||||
| .mp2 | audio/x-mpeg |
|
||||
| .mp2 | video/mpeg |
|
||||
| .mp2 | video/x-mpeg |
|
||||
| .mp2 | video/x-mpeq2a |
|
||||
| .mp3 | audio/mpeg3 |
|
||||
| .mp3 | audio/x-mpeg-3 |
|
||||
| .mp3 | video/mpeg |
|
||||
| .mp3 | video/x-mpeg |
|
||||
| .mpa | audio/mpeg |
|
||||
| .mpa | video/mpeg |
|
||||
| .mpc | application/x-project |
|
||||
| .mpe | video/mpeg |
|
||||
| .mpeg | video/mpeg |
|
||||
| .mpg | audio/mpeg |
|
||||
| .mpg | video/mpeg |
|
||||
| .mpga | audio/mpeg |
|
||||
| .mpp | application/vnd.ms-project |
|
||||
| .mpt | application/x-project |
|
||||
| .mpv | application/x-project |
|
||||
| .mpx | application/x-project |
|
||||
| .mrc | application/marc |
|
||||
| .ms | application/x-troff-ms |
|
||||
| .mv | video/x-sgi-movie |
|
||||
| .my | audio/make |
|
||||
| .mzz | application/x-vnd.audioexplosion.mzz |
|
||||
| .nap | image/naplps |
|
||||
| .naplps | image/naplps |
|
||||
| .nc | application/x-netcdf |
|
||||
| .ncm | application/vnd.nokia.configuration-message |
|
||||
| .nif | image/x-niff |
|
||||
| .niff | image/x-niff |
|
||||
| .nix | application/x-mix-transfer |
|
||||
| .nsc | application/x-conference |
|
||||
| .nvd | application/x-navidoc |
|
||||
| .o | application/octet-stream |
|
||||
| .oda | application/oda |
|
||||
| .omc | application/x-omc |
|
||||
| .omcd | application/x-omcdatamaker |
|
||||
| .omcr | application/x-omcregerator |
|
||||
| .p | text/x-pascal |
|
||||
| .p10 | application/pkcs10 |
|
||||
| .p10 | application/x-pkcs10 |
|
||||
| .p12 | application/pkcs-12 |
|
||||
| .p12 | application/x-pkcs12 |
|
||||
| .p7a | application/x-pkcs7-signature |
|
||||
| .p7c | application/pkcs7-mime |
|
||||
| .p7c | application/x-pkcs7-mime |
|
||||
| .p7m | application/pkcs7-mime |
|
||||
| .p7m | application/x-pkcs7-mime |
|
||||
| .p7r | application/x-pkcs7-certreqresp |
|
||||
| .p7s | application/pkcs7-signature |
|
||||
| .part | application/pro_eng |
|
||||
| .pas | text/pascal |
|
||||
| .pbm | image/x-portable-bitmap |
|
||||
| .pcl | application/vnd.hp-pcl |
|
||||
| .pcl | application/x-pcl |
|
||||
| .pct | image/x-pict |
|
||||
| .pcx | image/x-pcx |
|
||||
| .pdb | chemical/x-pdb |
|
||||
| .pdf | application/pdf |
|
||||
| .pfunk | audio/make |
|
||||
| .pfunk | audio/make.my.funk |
|
||||
| .pgm | image/x-portable-graymap |
|
||||
| .pgm | image/x-portable-greymap |
|
||||
| .pic | image/pict |
|
||||
| .pict | image/pict |
|
||||
| .pkg | application/x-newton-compatible-pkg |
|
||||
| .pko | application/vnd.ms-pki.pko |
|
||||
| .pl | text/plain |
|
||||
| .pl | text/x-script.perl |
|
||||
| .plx | application/x-pixclscript |
|
||||
| .pm | image/x-xpixmap |
|
||||
| .pm | text/x-script.perl-module |
|
||||
| .pm4 | application/x-pagemaker |
|
||||
| .pm5 | application/x-pagemaker |
|
||||
| .png | image/png |
|
||||
| .pnm | application/x-portable-anymap |
|
||||
| .pnm | image/x-portable-anymap |
|
||||
| .pot | application/mspowerpoint |
|
||||
| .pot | application/vnd.ms-powerpoint |
|
||||
| .pov | model/x-pov |
|
||||
| .ppa | application/vnd.ms-powerpoint |
|
||||
| .ppm | image/x-portable-pixmap |
|
||||
| .pps | application/mspowerpoint |
|
||||
| .pps | application/vnd.ms-powerpoint |
|
||||
| .ppt | application/mspowerpoint |
|
||||
| .ppt | application/powerpoint |
|
||||
| .ppt | application/vnd.ms-powerpoint |
|
||||
| .ppt | application/x-mspowerpoint |
|
||||
| .ppz | application/mspowerpoint |
|
||||
| .pre | application/x-freelance |
|
||||
| .prt | application/pro_eng |
|
||||
| .ps | application/postscript |
|
||||
| .psd | application/octet-stream |
|
||||
| .pvu | paleovu/x-pv |
|
||||
| .pwz | application/vnd.ms-powerpoint |
|
||||
| .py | text/x-script.phyton |
|
||||
| .pyc | application/x-bytecode.python |
|
||||
| .qcp | audio/vnd.qcelp |
|
||||
| .qd3 | x-world/x-3dmf |
|
||||
| .qd3d | x-world/x-3dmf |
|
||||
| .qif | image/x-quicktime |
|
||||
| .qt | video/quicktime |
|
||||
| .qtc | video/x-qtc |
|
||||
| .qti | image/x-quicktime |
|
||||
| .qtif | image/x-quicktime |
|
||||
| .ra | audio/x-pn-realaudio |
|
||||
| .ra | audio/x-pn-realaudio-plugin |
|
||||
| .ra | audio/x-realaudio |
|
||||
| .ram | audio/x-pn-realaudio |
|
||||
| .ras | application/x-cmu-raster |
|
||||
| .ras | image/cmu-raster |
|
||||
| .ras | image/x-cmu-raster |
|
||||
| .rast | image/cmu-raster |
|
||||
| .rexx | text/x-script.rexx |
|
||||
| .rf | image/vnd.rn-realflash |
|
||||
| .rgb | image/x-rgb |
|
||||
| .rm | application/vnd.rn-realmedia |
|
||||
| .rm | audio/x-pn-realaudio |
|
||||
| .rmi | audio/mid |
|
||||
| .rmm | audio/x-pn-realaudio |
|
||||
| .rmp | audio/x-pn-realaudio |
|
||||
| .rmp | audio/x-pn-realaudio-plugin |
|
||||
| .rng | application/ringing-tones |
|
||||
| .rng | application/vnd.nokia.ringing-tone |
|
||||
| .rnx | application/vnd.rn-realplayer |
|
||||
| .roff | application/x-troff |
|
||||
| .rp | image/vnd.rn-realpix |
|
||||
| .rpm | audio/x-pn-realaudio-plugin |
|
||||
| .rt | text/richtext |
|
||||
| .rt | text/vnd.rn-realtext |
|
||||
| .rtf | application/rtf |
|
||||
| .rtf | application/x-rtf |
|
||||
| .rtf | text/richtext |
|
||||
| .rtx | application/rtf |
|
||||
| .rtx | text/richtext |
|
||||
| .rv | video/vnd.rn-realvideo |
|
||||
| .s | text/x-asm |
|
||||
| .s3m | audio/s3m |
|
||||
| .saveme | application/octet-stream |
|
||||
| .sbk | application/x-tbook |
|
||||
| .scm | application/x-lotusscreencam |
|
||||
| .scm | text/x-script.guile |
|
||||
| .scm | text/x-script.scheme |
|
||||
| .scm | video/x-scm |
|
||||
| .sdml | text/plain |
|
||||
| .sdp | application/sdp |
|
||||
| .sdp | application/x-sdp |
|
||||
| .sdr | application/sounder |
|
||||
| .sea | application/sea |
|
||||
| .sea | application/x-sea |
|
||||
| .set | application/set |
|
||||
| .sgm | text/sgml |
|
||||
| .sgm | text/x-sgml |
|
||||
| .sgml | text/sgml |
|
||||
| .sgml | text/x-sgml |
|
||||
| .sh | application/x-bsh |
|
||||
| .sh | application/x-sh |
|
||||
| .sh | application/x-shar |
|
||||
| .sh | text/x-script.sh |
|
||||
| .shar | application/x-bsh |
|
||||
| .shar | application/x-shar |
|
||||
| .shtml | text/html |
|
||||
| .shtml | text/x-server-parsed-html |
|
||||
| .sid | audio/x-psid |
|
||||
| .sit | application/x-sit |
|
||||
| .sit | application/x-stuffit |
|
||||
| .skd | application/x-koan |
|
||||
| .skm | application/x-koan |
|
||||
| .skp | application/x-koan |
|
||||
| .skt | application/x-koan |
|
||||
| .sl | application/x-seelogo |
|
||||
| .smi | application/smil |
|
||||
| .smil | application/smil |
|
||||
| .snd | audio/basic |
|
||||
| .snd | audio/x-adpcm |
|
||||
| .sol | application/solids |
|
||||
| .spc | application/x-pkcs7-certificates |
|
||||
| .spc | text/x-speech |
|
||||
| .spl | application/futuresplash |
|
||||
| .spr | application/x-sprite |
|
||||
| .sprite | application/x-sprite |
|
||||
| .src | application/x-wais-source |
|
||||
| .ssi | text/x-server-parsed-html |
|
||||
| .ssm | application/streamingmedia |
|
||||
| .sst | application/vnd.ms-pki.certstore |
|
||||
| .step | application/step |
|
||||
| .stl | application/sla |
|
||||
| .stl | application/vnd.ms-pki.stl |
|
||||
| .stl | application/x-navistyle |
|
||||
| .stp | application/step |
|
||||
| .sv4cpio | application/x-sv4cpio |
|
||||
| .sv4crc | application/x-sv4crc |
|
||||
| .svf | image/vnd.dwg |
|
||||
| .svf | image/x-dwg |
|
||||
| .svr | application/x-world |
|
||||
| .svr | x-world/x-svr |
|
||||
| .swf | application/x-shockwave-flash |
|
||||
| .t | application/x-troff |
|
||||
| .talk | text/x-speech |
|
||||
| .tar | application/x-tar |
|
||||
| .tbk | application/toolbook |
|
||||
| .tbk | application/x-tbook |
|
||||
| .tcl | application/x-tcl |
|
||||
| .tcl | text/x-script.tcl |
|
||||
| .tcsh | text/x-script.tcsh |
|
||||
| .tex | application/x-tex |
|
||||
| .texi | application/x-texinfo |
|
||||
| .texinfo | application/x-texinfo |
|
||||
| .text | application/plain |
|
||||
| .text | text/plain |
|
||||
| .tgz | application/gnutar |
|
||||
| .tgz | application/x-compressed |
|
||||
| .tif | image/tiff |
|
||||
| .tif | image/x-tiff |
|
||||
| .tiff | image/tiff |
|
||||
| .tiff | image/x-tiff |
|
||||
| .tr | application/x-troff |
|
||||
| .tsi | audio/tsp-audio |
|
||||
| .tsp | application/dsptype |
|
||||
| .tsp | audio/tsplayer |
|
||||
| .tsv | text/tab-separated-values |
|
||||
| .turbot | image/florian |
|
||||
| .txt | text/plain |
|
||||
| .uil | text/x-uil |
|
||||
| .uni | text/uri-list |
|
||||
| .unis | text/uri-list |
|
||||
| .unv | application/i-deas |
|
||||
| .uri | text/uri-list |
|
||||
| .uris | text/uri-list |
|
||||
| .ustar | application/x-ustar |
|
||||
| .ustar | multipart/x-ustar |
|
||||
| .uu | application/octet-stream |
|
||||
| .uu | text/x-uuencode |
|
||||
| .uue | text/x-uuencode |
|
||||
| .vcd | application/x-cdlink |
|
||||
| .vcs | text/x-vcalendar |
|
||||
| .vda | application/vda |
|
||||
| .vdo | video/vdo |
|
||||
| .vew | application/groupwise |
|
||||
| .viv | video/vivo |
|
||||
| .viv | video/vnd.vivo |
|
||||
| .vivo | video/vivo |
|
||||
| .vivo | video/vnd.vivo |
|
||||
| .vmd | application/vocaltec-media-desc |
|
||||
| .vmf | application/vocaltec-media-file |
|
||||
| .voc | audio/voc |
|
||||
| .voc | audio/x-voc |
|
||||
| .vos | video/vosaic |
|
||||
| .vox | audio/voxware |
|
||||
| .vqe | audio/x-twinvq-plugin |
|
||||
| .vqf | audio/x-twinvq |
|
||||
| .vql | audio/x-twinvq-plugin |
|
||||
| .vrml | application/x-vrml |
|
||||
| .vrml | model/vrml |
|
||||
| .vrml | x-world/x-vrml |
|
||||
| .vrt | x-world/x-vrt |
|
||||
| .vsd | application/x-visio |
|
||||
| .vst | application/x-visio |
|
||||
| .vsw | application/x-visio |
|
||||
| .w60 | application/wordperfect6.0 |
|
||||
| .w61 | application/wordperfect6.1 |
|
||||
| .w6w | application/msword |
|
||||
| .wav | audio/wav |
|
||||
| .wav | audio/x-wav |
|
||||
| .wb1 | application/x-qpro |
|
||||
| .wbmp | image/vnd.wap.wbmp |
|
||||
| .web | application/vnd.xara |
|
||||
| .wiz | application/msword |
|
||||
| .wk1 | application/x-123 |
|
||||
| .wmf | windows/metafile |
|
||||
| .wml | text/vnd.wap.wml |
|
||||
| .wmlc | application/vnd.wap.wmlc |
|
||||
| .wmls | text/vnd.wap.wmlscript |
|
||||
| .wmlsc | application/vnd.wap.wmlscriptc |
|
||||
| .word | application/msword |
|
||||
| .wp | application/wordperfect |
|
||||
| .wp5 | application/wordperfect |
|
||||
| .wp5 | application/wordperfect6.0 |
|
||||
| .wp6 | application/wordperfect |
|
||||
| .wpd | application/wordperfect |
|
||||
| .wpd | application/x-wpwin |
|
||||
| .wq1 | application/x-lotus |
|
||||
| .wri | application/mswrite |
|
||||
| .wri | application/x-wri |
|
||||
| .wrl | application/x-world |
|
||||
| .wrl | model/vrml |
|
||||
| .wrl | x-world/x-vrml |
|
||||
| .wrz | model/vrml |
|
||||
| .wrz | x-world/x-vrml |
|
||||
| .wsc | text/scriplet |
|
||||
| .wsrc | application/x-wais-source |
|
||||
| .wtk | application/x-wintalk |
|
||||
| .xbm | image/x-xbitmap |
|
||||
| .xbm | image/x-xbm |
|
||||
| .xbm | image/xbm |
|
||||
| .xdr | video/x-amt-demorun |
|
||||
| .xgz | xgl/drawing |
|
||||
| .xif | image/vnd.xiff |
|
||||
| .xl | application/excel |
|
||||
| .xla | application/excel |
|
||||
| .xla | application/x-excel |
|
||||
| .xla | application/x-msexcel |
|
||||
| .xlb | application/excel |
|
||||
| .xlb | application/vnd.ms-excel |
|
||||
| .xlb | application/x-excel |
|
||||
| .xlc | application/excel |
|
||||
| .xlc | application/vnd.ms-excel |
|
||||
| .xlc | application/x-excel |
|
||||
| .xld | application/excel |
|
||||
| .xld | application/x-excel |
|
||||
| .xlk | application/excel |
|
||||
| .xlk | application/x-excel |
|
||||
| .xll | application/excel |
|
||||
| .xll | application/vnd.ms-excel |
|
||||
| .xll | application/x-excel |
|
||||
| .xlm | application/excel |
|
||||
| .xlm | application/vnd.ms-excel |
|
||||
| .xlm | application/x-excel |
|
||||
| .xls | application/excel |
|
||||
| .xls | application/vnd.ms-excel |
|
||||
| .xls | application/x-excel |
|
||||
| .xls | application/x-msexcel |
|
||||
| .xlt | application/excel |
|
||||
| .xlt | application/x-excel |
|
||||
| .xlv | application/excel |
|
||||
| .xlv | application/x-excel |
|
||||
| .xlw | application/excel |
|
||||
| .xlw | application/vnd.ms-excel |
|
||||
| .xlw | application/x-excel |
|
||||
| .xlw | application/x-msexcel |
|
||||
| .xm | audio/xm |
|
||||
| .xml | application/xml |
|
||||
| .xml | text/xml |
|
||||
| .xmz | xgl/movie |
|
||||
| .xpix | application/x-vnd.ls-xpix |
|
||||
| .xpm | image/x-xpixmap |
|
||||
| .xpm | image/xpm |
|
||||
| .x-png | image/png |
|
||||
| .xsr | video/x-amt-showrun |
|
||||
| .xwd | image/x-xwd |
|
||||
| .xwd | image/x-xwindowdump |
|
||||
| .xyz | chemical/x-pdb |
|
||||
| .z | application/x-compress |
|
||||
| .z | application/x-compressed |
|
||||
| .zip | application/x-compressed |
|
||||
| .zip | application/x-zip-compressed |
|
||||
| .zip | application/zip |
|
||||
| .zip | multipart/x-zip |
|
||||
| .zoo | application/octet-stream |
|
||||
| .zsh | text/x-script.zsh |
|
||||
|
||||
|
||||
25
20230523145313-portainer_docker.org
Normal file
25
20230523145313-portainer_docker.org
Normal file
@@ -0,0 +1,25 @@
|
||||
:PROPERTIES:
|
||||
:ID: 4afb1f41-983a-4b54-9828-a1e3788eb28b
|
||||
:END:
|
||||
#+title: portainer-docker
|
||||
|
||||
Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]], Swarm, Kubernetes and ACI environments. It is designed to be as simple to deploy as it is to use. The application allows you to manage all your orchestrator resources ([[id:936191f2-696b-4d9a-96ad-c8449778ae26][containers]], images, volumes, [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][networks]] and more) through a ‘smart’ GUI and/or an extensive API.
|
||||
|
||||
Portainer consists of a single container that can run on any cluster. It can be deployed as a [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Linux]] container or a Windows native container.
|
||||
|
||||
This container is deployed to oversee all deployed docker containers. You can create the container with the following commands:
|
||||
|
||||
#+begin_src bash
|
||||
docker volume create portainer_data
|
||||
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
|
||||
#+end_src
|
||||
|
||||
* Multiple [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]
|
||||
Portainer can be used to manage multiple instances of docker (servers). For that to be possible a second portainer container has to be deployed on the machine that is added to the main portainer manager. [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priv. needed ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]]).
|
||||
#+begin_src bash
|
||||
sudo docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
|
||||
#+end_src
|
||||
For that to work, the port has to be accessible from the main portainer instance. After the conatiner is spawnd, access the additional instance through the portainer [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] on port 9000 and add it via the environment tab as a swarm instance.
|
||||
|
||||
* Stacks
|
||||
Portainer has a feature for controlling Docker Stacks (multiple containers that act as a complementary unit). To do that, the containers need to be started as a stack inside the portainer UI. This must be done as a docker compose file. Thzis file can be either created in portainer or imported from different sources. you can controll all containers in a stack at the same time to stop/start the whole unit.
|
||||
46
20230607103155-crontab.org
Normal file
46
20230607103155-crontab.org
Normal file
@@ -0,0 +1,46 @@
|
||||
:PROPERTIES:
|
||||
:ID: 94b5e3fb-bbf9-40ec-902f-9e15c74c5f99
|
||||
:END:
|
||||
#+title: crontab
|
||||
#+filetags: :basics:
|
||||
|
||||
Crontab is a Unix command that creates a table or list of commands, each of which is to be executed by the [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][operating system]]t a specified time and on a regular schedule. Crontab is used to create the crontab file (the list) and later used to change the previously created crontab file.
|
||||
|
||||
A crontab is structured as follows: * * * * * command
|
||||
first *: min (0-59)
|
||||
second *: hour (0-23)
|
||||
third *: day (0-31)
|
||||
fourth *: month (1-12)
|
||||
fifth *: day of month (0-7) 0&7 are sunday
|
||||
|
||||
* crontab-command
|
||||
** create a crontab
|
||||
#+begin_src bash
|
||||
crontab -e
|
||||
#+end_src
|
||||
** list crontabs
|
||||
#+begin_src bash
|
||||
crontab -l #(as user or [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]])
|
||||
crontab -l -u smad user (user=smad)
|
||||
#+end_src
|
||||
** before save a crontab a new line is added at the end of the script or the crontab will not be installed
|
||||
|
||||
* on this [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]] (all machines as root) crontab is used for doing:
|
||||
** autoupdate at 0:00 all 15th & 30th in a month with [[id:d88b7b60-742d-4bc0-8b48-3fbcfad2373d][pacman]]
|
||||
#+begin_src bash
|
||||
0 0 15,30 * * pacman -Syu --noconfirm
|
||||
#+end_src
|
||||
** reboot after autoupdate (1) and that with each machine time-delayed
|
||||
#+begin_src bash
|
||||
30 0 15,30 * * /sbin/shutdown -r now
|
||||
#+end_src
|
||||
** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] down & up (one min before reboot) so that a permanent connection of the [[id:70899526-8b7d-4976-94fc-cc07c41e550a][clients]] to the [[id:1af47b07-4205-46ac-837a-ee078067328a][vpn]] [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] is guaranteed
|
||||
#+begin_src bash
|
||||
29 0 * * * wg-quick down wg1 && wg-quick up wg1
|
||||
#+end_src
|
||||
|
||||
* on [[id:d54bf885-a702-48bb-b108-e9e982bc5952][W0]] and [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][W10]] (user=smad) for doing:
|
||||
** [[id:56d784ed-a87c-441f-b819-73369760ca32][Backup]]
|
||||
#+begin_src bash
|
||||
0 2 * * * /home/smad/backups/backup.sh
|
||||
#+end_src
|
||||
112
20230607105613-borg_backup.org
Normal file
112
20230607105613-borg_backup.org
Normal file
@@ -0,0 +1,112 @@
|
||||
:PROPERTIES:
|
||||
:ID: 56d784ed-a87c-441f-b819-73369760ca32
|
||||
:END:
|
||||
#+title: borg-backup
|
||||
#+filetags: :backup:
|
||||
|
||||
Borg (previously called Attic) is deduplicating backup software for various Unix-like operating systems.
|
||||
|
||||
* Install borg on all machines that store data ([[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]]1, client2 etc.) and on which data is to be stored (backup-[[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]])
|
||||
** command
|
||||
#+begin_src bash
|
||||
yay borg
|
||||
#+end_src
|
||||
* Borg installed
|
||||
** clients
|
||||
*** [[id:d54bf885-a702-48bb-b108-e9e982bc5952][W0]]
|
||||
*** [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][W10]]
|
||||
** backup-server
|
||||
*** [[id:fbf9a139-a414-4349-b217-663f15e9a8bd][W11]]
|
||||
* Create [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]-key and .ssh directory
|
||||
** command
|
||||
#+begin_src bash
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keygen
|
||||
#+end_src
|
||||
Note: Press 1x enter for save the file in ~/home/<user>/.ssh/id_rsa~, following enter two times the passphrase, which is created before in [[id:308a3798-0f57-4024-a561-c6d8153348e9][keepassxc]].
|
||||
|
||||
#+begin_src bash
|
||||
cat .ssh/id_rsa.pub
|
||||
cat .ssh/id_rsa.pub | ssh <user>@<client> "cat >> .ssh/authorized_keys"
|
||||
#+end_src
|
||||
Note: Do this for all clients which want to save data.
|
||||
Note: Check on backup-server with ~cat ~/home/<user>/.ssh/authorized_keys~ whether the keys have been piped over.
|
||||
* Change the file on backup-server, which before created in ~/home/<user>/.ssh/authorized_keys~ and write following command before the corresponding ssh-key
|
||||
#+begin_src bash
|
||||
command="borg serve --restrict-to-path /home/<user>/backups/<client> --append-only"
|
||||
#+end_src
|
||||
* Create on client a backup directory and a backup.sh file
|
||||
#+begin_src bash
|
||||
mkdir -p backups
|
||||
touch backup.sh
|
||||
sudo nano backup.sh
|
||||
#+end_src
|
||||
For the last command you need [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priviliges or [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]].
|
||||
Insert following script into the backup.sh file
|
||||
#+begin_src bash
|
||||
#!/bin/bash
|
||||
DATE=`date +"%Y-%m-%d"`
|
||||
REPOSITORY="ssh://<user>@<ip-adress>:22/~/backups/<client>"
|
||||
export BORG_PASSPHRASE="<which is created before> "
|
||||
borg create $REPOSITORY::$DATE /home/<user>/<path_which_want_to_be_saved> --exclude-caches
|
||||
#+end_src
|
||||
Make script executable
|
||||
#+begin_src bash
|
||||
chmod +x ./backup.sh
|
||||
#+end_src
|
||||
* Create on backup-server a backup directonary and for each client a folder inside the backup folder
|
||||
#+begin_src bash
|
||||
mkdir -p backups/<for_each_client>
|
||||
#+end_src
|
||||
Note: The name ~<for_each_client>~ folder must be the same like the command in the ~/home/<user>/.ssh/authorized_keys~ file on the backup-server, which is written before the corresponding ssh-key
|
||||
* Create a borg repo for created client folder
|
||||
#+begin_src bash
|
||||
borg init --encryption=repokey backups/<for_each_client>
|
||||
#+end_src
|
||||
After enter two times the passphrase for each client. Choose yes/no if the passphrase should be displayed.
|
||||
* Create a backup
|
||||
The following command is listed in path ~/home/<user>/backups~ on each client
|
||||
#+begin_src bash
|
||||
./backup.sh
|
||||
#+end_src
|
||||
Answer "yes" to fingerprint.
|
||||
Note: If the backup failed, change the owner/user for the folder, which want to be saved.
|
||||
#+begin_src bash
|
||||
chmod -r <folder_which_need_permission>
|
||||
#+end_src
|
||||
** List & [[id:c69a77dc-f87f-418c-9870-eedddc43be37][mount]] a backup for each client
|
||||
#+begin_src bash
|
||||
borg list /home/<user>/backups/<client>
|
||||
mkdir mnt
|
||||
borg mount /home/<user>/backups/<client> mnt/
|
||||
#+end_src
|
||||
Enter the passphrase.
|
||||
* Restore backup
|
||||
To restore the backup the borg key and the corresponding passphrase is neccessary.
|
||||
Get the borg key on the backup-server from each client
|
||||
#+begin_src bash
|
||||
borg key export /home/<user>/backups/<client> key-export_<client>
|
||||
cat key-export_<client>
|
||||
rm key-export_<client> (after copy and saved on a extern hdd)
|
||||
#+end_src
|
||||
* Create a [[id:94b5e3fb-bbf9-40ec-902f-9e15c74c5f99][crontab]] as user
|
||||
#+begin_src bash
|
||||
crontab -e
|
||||
0 2 * * * /home/<user>/backups/backup.sh
|
||||
#+end_src
|
||||
* Create a prune-backup.sh file for to automatically manage the created backups.
|
||||
#+begin_src bash
|
||||
#!/bin/bash
|
||||
|
||||
# <client>:
|
||||
export BORG_PASSPHRASE="<which_is_created_before>"
|
||||
borg prune -v ~/backups/<client> \
|
||||
--keep-daily=30
|
||||
--keep-weekly=5
|
||||
--keep-monthly=12
|
||||
#+end_src
|
||||
Make script executable
|
||||
#+begin_src bash
|
||||
chmod +x prune-backup.sh
|
||||
./prune-backup.sh
|
||||
#+end_src
|
||||
35
20230607132218-cluster.org
Normal file
35
20230607132218-cluster.org
Normal file
@@ -0,0 +1,35 @@
|
||||
:PROPERTIES:
|
||||
:ID: 408e8348-778a-4fbd-a14d-9f3d9c595b4a
|
||||
:END:
|
||||
#+title: cluster
|
||||
A computer cluster is a set of computers that work together so that they can be viewed as a single system. Unlike grid computers, computer clusters have each node set to perform the same task, controlled and scheduled by software.
|
||||
|
||||
The components of a cluster are usually connected to each other through fast local area networks ([[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]), with each node (computer used as a [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]) running its own instance of an [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][operating system]]. In most circumstances, all of the nodes use the same hardware and the same operating system, although in some setups (e.g. using Open Source Cluster Application Resources (OSCAR)), different operating systems can be used on each computer, or different hardware.
|
||||
|
||||
Clusters are usually deployed to improve performance and availability over that of a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.
|
||||
The cluster deployed at Madrigal Inc is constructed of the following [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]:
|
||||
|
||||
|
||||
* [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]]list
|
||||
** [[id:56a6d355-01cf-44b8-87c7-c77f9db2ce29][w3]]
|
||||
** [[id:845742e6-33e3-4d5b-8a4e-5cec9f448862][w4]]
|
||||
** [[id:cd93c833-85b6-4955-8660-d150373d4ac5][w5]]
|
||||
** [[id:d48299ee-efe3-40d4-a223-26d2c772b522][w6]]
|
||||
** [[id:a08abe7e-23ab-4b59-a105-9873dc79de43][w9]]
|
||||
** [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][w10]]
|
||||
** [[id:fbf9a139-a414-4349-b217-663f15e9a8bd][w11]]
|
||||
|
||||
* [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][openmpi]] & [[id:422e07f8-c888-460f-849e-76d451946045][ssh-key]] & [[id:574b9e96-1a86-4e43-878c-30534e0dcecb][MBSE (Modell based system engineering)]]
|
||||
** [[id:d54bf885-a702-48bb-b108-e9e982bc5952][mw0]]
|
||||
** [[id:f13f2c9c-4550-4e44-8a14-dc327234d38e][cw1]]
|
||||
** [[id:45e10136-fb77-4712-85ef-32adf5cdc489][cw2]]
|
||||
** [[id:56a6d355-01cf-44b8-87c7-c77f9db2ce29][cw3]]
|
||||
** [[id:845742e6-33e3-4d5b-8a4e-5cec9f448862][cw4]]
|
||||
** [[id:cd93c833-85b6-4955-8660-d150373d4ac5][cw5]]
|
||||
** [[id:d48299ee-efe3-40d4-a223-26d2c772b522][cw6]]
|
||||
** [[id:a08abe7e-23ab-4b59-a105-9873dc79de43][cw9]]
|
||||
** [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][cw10]]
|
||||
|
||||
Note: Client [[id:fbf9a139-a414-4349-b217-663f15e9a8bd][W11]] isn't used in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] cluster because it's the backup-server.
|
||||
Note: The [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]-key is also used for [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]].
|
||||
Note: wX = cwX & X =
|
||||
16
20230607132413-w0.org
Normal file
16
20230607132413-w0.org
Normal file
@@ -0,0 +1,16 @@
|
||||
:PROPERTIES:
|
||||
:ID: d54bf885-a702-48bb-b108-e9e982bc5952
|
||||
:END:
|
||||
#+title: server-w0
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Open-MP master and routing [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] for any [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] connection inside the 10.0.0.0/32 subnet. There are also some [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] container running on w0 as well as the [[id:46107a80-aa2d-4861-8362-6836c547dda4][rustdesk]] connection server. This server is also responsible for any [[id:80666401-173e-4828-9c29-552dab716946][dns]] request inside the regular- and subnet (192.0.0.0 and 10.0.0.0/32).
|
||||
* Addresses
|
||||
** regular [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
*** 192.168.178.173
|
||||
*** w0.lan.green-chem.net
|
||||
** wireguard [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnetworks]]
|
||||
*** 10.0.0.3
|
||||
*** w0.internal.green-chem.net
|
||||
** [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] MPI (master)
|
||||
*** mw0
|
||||
9
20230607132745-rustdesk.org
Normal file
9
20230607132745-rustdesk.org
Normal file
@@ -0,0 +1,9 @@
|
||||
:PROPERTIES:
|
||||
:ID: 46107a80-aa2d-4861-8362-6836c547dda4
|
||||
:END:
|
||||
#+title: rustdesk
|
||||
|
||||
A desktop and screen sharing engine that can be run on premise as a self hosted service
|
||||
RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration. You have full control of your data, with no concerns about security. The [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] is open source and theres a choice between the fully featured Professional [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] available to purchase on our website and the basic free and OSS Server based on our Professional Server.(source rustdesk)
|
||||
The rustdesk server can also be deployed via [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]].
|
||||
|
||||
23
20230607132948-dns.org
Normal file
23
20230607132948-dns.org
Normal file
@@ -0,0 +1,23 @@
|
||||
:PROPERTIES:
|
||||
:ID: 80666401-173e-4828-9c29-552dab716946
|
||||
:END:
|
||||
#+title: dns
|
||||
#+filetags: :network:basics:
|
||||
|
||||
dynamic naming service that transforms [[id:f055acfb-05dd-4228-a92a-356240b8c975][IP]] addresses into human readable form. can be used to give [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] domain names (A-entry) or to giver domain names an alias (Cname-entry).
|
||||
|
||||
* How To change the local resolving dns server
|
||||
If the pc changes the network interface (e.g. when connecting/disconnecting from wireguard subet) the network manager checks for the corresponding dns server. The usual server responsible for that is the networking router (ftitzbox 192.168.178.1). In the case of an internal server running the local dns this is not the case, because the Fritzbox does not have the corresponding dns entries for the local network. To change this behaviour one could change the [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] DNS Setting in ~/etc/wireguard/w1.conf~ for every peer that needs the new dns. If the dns should not be dependent on the wireguard connection ( relevance for [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]] server in local networks) the ~resolve.conf~ file should be changed to the local dns server. For that you must:
|
||||
|
||||
** alter the file
|
||||
Change ther file to look for the local dnbs server. ([[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] priv. needed ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
|
||||
#+begin_src bash
|
||||
sudo nano /etc/resolv.conf
|
||||
#+end_src
|
||||
To include the ~nameserver~ of your choice for example:
|
||||
#+begin_src bash
|
||||
nameserver 127.0.0.1
|
||||
#+end_src
|
||||
If the Peer has its own nameserver running, or any other IP in the local network.
|
||||
|
||||
NOTE: The server has to deploy the dns server on [[id:f4bb4857-2112-4e10-a22e-6da1436ce7b7][port]] 53 for that to work and the [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in question has to have acces to this server port.
|
||||
17
20230607133620-server_w1.org
Normal file
17
20230607133620-server_w1.org
Normal file
@@ -0,0 +1,17 @@
|
||||
:PROPERTIES:
|
||||
:ID: f13f2c9c-4550-4e44-8a14-dc327234d38e
|
||||
:END:
|
||||
#+title: server-w1
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
*** 192.168.178.168
|
||||
*** w1.lan.green-chem.net
|
||||
** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnet]]
|
||||
*** 10.0.0.4
|
||||
*** w1.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw1
|
||||
18
20230607134015-server_w2.org
Normal file
18
20230607134015-server_w2.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: 45e10136-fb77-4712-85ef-32adf5cdc489
|
||||
:END:
|
||||
#+title: server-w2
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
*** 192.168.178.172
|
||||
*** w2.lan.green-chem.net
|
||||
** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnet]]
|
||||
*** 10.0.0.2
|
||||
*** w2.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw2
|
||||
18
20230607134339-server_w3.org
Normal file
18
20230607134339-server_w3.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: 56a6d355-01cf-44b8-87c7-c77f9db2ce29
|
||||
:END:
|
||||
#+title: server-w3
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
*** 192.168.178.175
|
||||
*** w3.lan.green-chem.net
|
||||
** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] [[id:c9461f7b-7368-4b88-b90b-2d785fda2159][subnet]]
|
||||
*** 10.0.0.5
|
||||
*** w3.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw3
|
||||
|
||||
18
20230607134550-server_w4.org
Normal file
18
20230607134550-server_w4.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: 845742e6-33e3-4d5b-8a4e-5cec9f448862
|
||||
:END:
|
||||
#+title: server-w4
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular [[id:213d19d9-ca8d-42b1-998a-2f34d1d9cd4c][LAN]]
|
||||
*** 192.168.178.183
|
||||
*** w4.lan.green-chem.net
|
||||
** [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] [[roam:subnet]]
|
||||
*** 10.0.0.6
|
||||
*** w4.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw4
|
||||
|
||||
18
20230607134731-server_w5.org
Normal file
18
20230607134731-server_w5.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: cd93c833-85b6-4955-8660-d150373d4ac5
|
||||
:END:
|
||||
#+title: server-w5
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular lan
|
||||
*** 192.168.178.186
|
||||
*** w5.lan.green-chem.net
|
||||
** wireguard subnet
|
||||
*** 10.0.0.7
|
||||
*** w5.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw5
|
||||
|
||||
18
20230607134900-server_w6.org
Normal file
18
20230607134900-server_w6.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: d48299ee-efe3-40d4-a223-26d2c772b522
|
||||
:END:
|
||||
#+title: server-w6
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular lan
|
||||
*** 192.168.178.182
|
||||
*** w6.lan.green-chem.net
|
||||
** wireguard subnet
|
||||
*** 10.0.0.8
|
||||
*** w6.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw6
|
||||
|
||||
18
20230607135040-server_w9.org
Normal file
18
20230607135040-server_w9.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: a08abe7e-23ab-4b59-a105-9873dc79de43
|
||||
:END:
|
||||
#+title: server-w9
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Regular [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular lan
|
||||
*** 192.168.178.187
|
||||
*** w9.lan.green-chem.net
|
||||
** wireguard subnet
|
||||
*** 10.0.0.15
|
||||
*** w9.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw9
|
||||
|
||||
20
20230607135227-server_w10.org
Normal file
20
20230607135227-server_w10.org
Normal file
@@ -0,0 +1,20 @@
|
||||
:PROPERTIES:
|
||||
:ID: 80a4104e-af18-4d90-a45e-2c92b51e8c0c
|
||||
:END:
|
||||
#+title: server-w10
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Communication [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] of Madrigal Inc. There are some very important communication programms runnung on this server, such as [[id:7c74176b-a637-4d3b-838e-05fae7ad3789][nextcloud]], [[id:29c8ec85-9de8-4ace-8c52-13a086341861][rocket-chat]] and the [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]] [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]]. This server is backed up via [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]] to the backup server ([[id:fbf9a139-a414-4349-b217-663f15e9a8bd][w11]]).
|
||||
|
||||
Regular server [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] in the [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Addresses
|
||||
** regular lan
|
||||
*** 192.168.178.171
|
||||
*** w10.lan.green-chem.net
|
||||
** wireguard subnet
|
||||
*** 10.0.0.13
|
||||
*** w10.internal.green-chem.net
|
||||
** open MPI
|
||||
*** cw10
|
||||
|
||||
72
20230607135405-rocket_chat.org
Normal file
72
20230607135405-rocket_chat.org
Normal file
@@ -0,0 +1,72 @@
|
||||
:PROPERTIES:
|
||||
:ID: 29c8ec85-9de8-4ace-8c52-13a086341861
|
||||
:END:
|
||||
#+title: rocket-chat
|
||||
#+filetags: :communication:
|
||||
|
||||
Main text communication programm. Runs as a [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] container on the communication [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] ([[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][server-w10]]). There exists no [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] file for the startup because the rocket-chat container in combination with the [[id:91deae5f-e670-4463-8fee-688212d13030][mongo-db]] is startted as a *stack* inside the [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer]] [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]]. The Rocketchat Gui is hosted via the [[id:90e3b8a2-b523-4044-af6f-fd4a559b2d7f][traefik_docker]].
|
||||
|
||||
* docker compose file
|
||||
#+begin_src bash
|
||||
services:
|
||||
rocketchat:
|
||||
image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
|
||||
restart: on-failure
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.rocketchat.entrypoints=websecure"
|
||||
- "traefik.http.routers.rocketchat.rule=Host(`chat.green-chem.net`)"
|
||||
- "traefik.http.routers.rocketchat.tls=true"
|
||||
- "traefik.http.routers.rocketchat.tls.certresolver=production"
|
||||
- "traefik.http.routers.rocketchat.service=rocketchat"
|
||||
- "traefik.http.services.rocketchat.loadbalancer.server.port=3000"
|
||||
- "traefik.docker.network=traefik_relay"
|
||||
#- "traefik.http.routers.rocketchat.middlewares=default@file"
|
||||
environment:
|
||||
MONGO_URL: "${MONGO_URL:-\
|
||||
mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
|
||||
${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
|
||||
MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
|
||||
-mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
|
||||
local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
|
||||
ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}
|
||||
PORT: ${PORT:-3000}
|
||||
DEPLOY_METHOD: docker
|
||||
#DEPLOY_PLATFORM: ${DEPLOY_PLATFORM}
|
||||
depends_on:
|
||||
- mongodb
|
||||
networks:
|
||||
- chat_relay
|
||||
- traefik_relay
|
||||
mongodb:
|
||||
image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-latest}
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- mongodb_data:/bitnami/mongodb
|
||||
environment:
|
||||
MONGODB_REPLICA_SET_MODE: primary
|
||||
MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
|
||||
MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
|
||||
MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
|
||||
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
|
||||
MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
|
||||
MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
|
||||
ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}
|
||||
networks:
|
||||
- chat_relay
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
|
||||
networks:
|
||||
traefik_relay:
|
||||
external: true
|
||||
chat_relay:
|
||||
internal: true
|
||||
#+end_src
|
||||
|
||||
* Networks
|
||||
The internal network ~chat_relay~ will be created automatically but the external network ~traefik_relay~ has to be created beforhand when the traefik reverse proxy is created.
|
||||
|
||||
|
||||
|
||||
7
20230607135858-server_w11.org
Normal file
7
20230607135858-server_w11.org
Normal file
@@ -0,0 +1,7 @@
|
||||
:PROPERTIES:
|
||||
:ID: fbf9a139-a414-4349-b217-663f15e9a8bd
|
||||
:END:
|
||||
#+title: server-w11
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
Main Backup server of Madrigal Inc. [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]] is running here and creates encrypted backups chosen servers.
|
||||
6
20230607142156-keepassxc.org
Normal file
6
20230607142156-keepassxc.org
Normal file
@@ -0,0 +1,6 @@
|
||||
:PROPERTIES:
|
||||
:ID: 308a3798-0f57-4024-a561-c6d8153348e9
|
||||
:END:
|
||||
#+title: keepassxc
|
||||
|
||||
Keyring for storing encrypted passwords. The keepss database is stored on [[id:d54bf885-a702-48bb-b108-e9e982bc5952][server-w0]] and backed up to [[id:fbf9a139-a414-4349-b217-663f15e9a8bd][server-w11]].
|
||||
8
20230607154216-mongo_db.org
Normal file
8
20230607154216-mongo_db.org
Normal file
@@ -0,0 +1,8 @@
|
||||
:PROPERTIES:
|
||||
:ID: 91deae5f-e670-4463-8fee-688212d13030
|
||||
:END:
|
||||
#+title: mongo-db
|
||||
#+filetags: :docker:
|
||||
|
||||
Mongo-DB is a database for storing user data like [[id:ae46c92b-d5fd-4172-944f-9165a61d2217][maria_DB]]. It is specialized to use in combination with [[id:29c8ec85-9de8-4ace-8c52-13a086341861][rocket-chat]] in [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]]. The container is run as a *stack* started inside the [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer]] [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]].
|
||||
|
||||
144
20230607154727-traefik_docker.org
Normal file
144
20230607154727-traefik_docker.org
Normal file
@@ -0,0 +1,144 @@
|
||||
:PROPERTIES:
|
||||
:ID: 90e3b8a2-b523-4044-af6f-fd4a559b2d7f
|
||||
:END:
|
||||
#+title: traefik_docker
|
||||
#+filetags: :docker:
|
||||
|
||||
Traefik is a reverse proxy for hosting various applications on [[id:80666401-173e-4828-9c29-552dab716946][dns]] entries. It is run as a [[id:df046fd7-1f82-4e12-9065-56d222f56408][docker]] container on the communikation [[id:80a4104e-af18-4d90-a45e-2c92b51e8c0c][server w10]]. To host a container in reverse proxy mode, the *tags* feature of docker containers. These tags have to be added to a container to uphost it. Those tags declare which type of hosting is wanted and what service/router is to be used. The traefik container needs access to [[id:f4bb4857-2112-4e10-a22e-6da1436ce7b7][port]] 80, 443 for hosting and port 8080 for the dashboard.
|
||||
|
||||
* how to run traefik
|
||||
- create a ~traefik~ folder using ~mkdir~
|
||||
- create a ~treafik.yml~ file using ~touch traefik.yml~
|
||||
- insert the code as shown under the _traefik.yml_ heading into the ~traefik.yml~ file
|
||||
- crate a compose file or a stack using poertainer
|
||||
- insert the code as shown under the _docker-compose_ heading into the stack or the compse file
|
||||
- create a ~certs~ ([[id:e28dfeaa-876b-4255-a25e-dcc0c909d08a][certificate]]) folder inside your ~traefik~ folder
|
||||
- link all the folders into the docker compose or stack file as bind volumes (if you created the ~traefik~ folder in ~/home/<user>/~ than you just need to add in your user name)
|
||||
- add your email to the ~traefik.yml~ file
|
||||
- run the compose file
|
||||
- add the flags to your application container as shown under the heading _flags_
|
||||
- fill in the needed data
|
||||
- run the application container and check the logs
|
||||
- make sure the application and the proxy are in the same network
|
||||
- check the dashboard at port 8080 for more information
|
||||
|
||||
* traefik.yml file
|
||||
This file should be stored in the traefik home folder as specified in the.
|
||||
#+begin_src bash
|
||||
global:
|
||||
checkNewVersion: true
|
||||
sendAnonymousUsage: false # true by default
|
||||
|
||||
# (Optional) Log information
|
||||
# ---
|
||||
# log:
|
||||
# level: ERROR # DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||||
# format: common # common, json, logfmt
|
||||
# filePath: /var/log/traefik/traefik.log
|
||||
|
||||
# (Optional) Accesslog
|
||||
# ---
|
||||
# accesslog:
|
||||
# format: common # common, json, logfmt
|
||||
# filePath: /var/log/traefik/access.log
|
||||
|
||||
# (Optional) Enable API and Dashboard
|
||||
# ---
|
||||
api:
|
||||
dashboard: true # true by default
|
||||
insecure: true # Don't do this in production!
|
||||
|
||||
# Entry Points configuration
|
||||
# ---
|
||||
entryPoints:
|
||||
web:
|
||||
address: :80
|
||||
# (Optional) Redirect to HTTPS
|
||||
# ---
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
|
||||
websecure:
|
||||
address: :443
|
||||
|
||||
# Configure your CertificateResolver here...
|
||||
# ---
|
||||
certificatesResolvers:
|
||||
staging:
|
||||
acme:
|
||||
email: <email>
|
||||
storage: /etc/traefik/certs/acme.json
|
||||
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
|
||||
production:
|
||||
acme:
|
||||
email: <email>
|
||||
storage: /etc/traefik/certs/acme.json
|
||||
caServer: "https://acme-v02.api.letsencrypt.org/directory"
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
|
||||
# (Optional) Overwrite Default Certificates
|
||||
# tls:
|
||||
# stores:
|
||||
# default:
|
||||
# defaultCertificate:
|
||||
# certFile: /etc/traefik/certs/cert.pem
|
||||
# keyFile: /etc/traefik/certs/cert-key.pem
|
||||
# (Optional) Disable TLS version 1.0 and 1.1
|
||||
# options:
|
||||
# default:
|
||||
# minVersion: VersionTLS12
|
||||
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false # Default is true
|
||||
file:
|
||||
# watch for dynamic configuration changes
|
||||
directory: /etc/traefik
|
||||
watch: true
|
||||
#+end_src
|
||||
For more informationm on the secure [[id:bd5b34ba-aa98-4808-b97b-2376aa7b8866][protocol]]: [[id:872ee33b-8361-40c7-9d88-69b3afe5ade2][TLS]] and [[id:95c8982d-e104-43a2-9bb2-fd7e1c3204f2][SSL]]
|
||||
* Networks
|
||||
To host a service, this service has to be in the same [[id:9d04fac3-89ae-4a96-b326-9ae7e2c22118][docker-network]] as the the traefik proxy. It doesn't matter if the service container is added to the traefik network or vice versa. The default approach is to add all services to the ~traefik-relay~ network. The Services themselfes can have other network for their supportive containers. Those secondary containers should not be added to the traefik network, because this network is exposed to the internet.
|
||||
|
||||
* Compose file
|
||||
This is the compose file that has to be run either manually or via the [[id:4afb1f41-983a-4b54-9828-a1e3788eb28b][portainer-docker]].
|
||||
#+begin_src bash
|
||||
volumes:
|
||||
traefik_ssl_certs:
|
||||
driver: local
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.5
|
||||
container_name: madrigal_traefik
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8080:8080 # (optional) expose the dashboard !don't use in production!
|
||||
volumes:
|
||||
- /home/<user>/traefik:/etc/traefik
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- traefik_ssl_certs:/ssl-certs
|
||||
restart: unless-stopped
|
||||
#+end_src
|
||||
|
||||
* Typical flags for containers
|
||||
Typical flags for hosting a container (under the labels section in a [[id:fcbfabfa-4a8c-4826-8b57-5dce05965c76][docker-compose]] file.
|
||||
#+begin_src bash
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.<application router>.entrypoints=<entrypoint-s>" # as described in the traefik.yml (default web and/or websecure)
|
||||
- "traefik.http.routers.<application router>.rule=Host(`<subdomain.domain-name.ending>`)"
|
||||
- "traefik.http.routers.<application router>.tls=true" #if tls is wanted
|
||||
- "traefik.http.routers.<application router>.tls.certresolver=<cert stage>" #as described in the traefik.yml file (default staging or production)
|
||||
- "traefik.http.routers.<application router>.service=<name of service>"
|
||||
- "traefik.http.services.<application router>.loadbalancer.server.port=<application port>"
|
||||
- "traefik.docker.network=<traefik_relay network>"
|
||||
#+end_src
|
||||
74
20230607171316-openmpi.org
Normal file
74
20230607171316-openmpi.org
Normal file
@@ -0,0 +1,74 @@
|
||||
:PROPERTIES:
|
||||
:ID: e56e90b1-ae5b-4344-97eb-993e5a81263e
|
||||
:END:
|
||||
#+title: OpenMPI
|
||||
#+filetags: :CLUSTER:
|
||||
|
||||
OpenMPI is a Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI). It is used by many TOP500 supercomputers including Roadrunner, which was the world's fastest supercomputer from June 2008 to November 2009, and K computer, the fastest supercomputer from June 2011 to June 2012.
|
||||
|
||||
Note: To use OpenMPI, [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]-keys are created just like for [[id:56d784ed-a87c-441f-b819-73369760ca32][borg-backup]].
|
||||
|
||||
* Configure the Host file
|
||||
Here map the IP adresses to the host names so that it is not requiered to type the ip adresses again and again...
|
||||
For that you need [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]] ([[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]])
|
||||
#+begin_src bash
|
||||
sudo nano /etc/hosts
|
||||
#+end_src
|
||||
|
||||
* Example for map the IP adresses
|
||||
#+begin_src bash
|
||||
# Standard host addresses
|
||||
127.0.0.1 localhost
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
# This host address
|
||||
127.0.1.1 <client1>
|
||||
#MPI SETUP
|
||||
<local IP adress of master> <master>
|
||||
<local IP adress of client> <client1 but set annother name >
|
||||
#+end_src
|
||||
NOTE: Do this for all [[id:70899526-8b7d-4976-94fc-cc07c41e550a][clients]] and for the master. The master must known all clients but the clients only there self and the master.
|
||||
|
||||
* Setting up NFS
|
||||
NFS is used to share object file among all the systems and sharable datas in this [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
[[id:c69a77dc-f87f-418c-9870-eedddc43be37][Mounting]] the sharable folder:
|
||||
** NFS on Master
|
||||
#+begin_src bash
|
||||
yay nfs-utils
|
||||
mkdir <name of sharable folder>
|
||||
cat /etc/exports #/home/<user>/<name of sharbel folder>* (rw,sync,no_root_squash,no_subtree_check)
|
||||
exportfs -a
|
||||
sudo systemctl enable nfs-utils && sudo systemctl start nfs-utils && sudo systemctl restart nfs-utils
|
||||
#+end_src
|
||||
|
||||
** NFS on Clients
|
||||
#+begin_src bash
|
||||
yay nfs-utils
|
||||
mkdir <name of sharable folder>
|
||||
sudo mount -t nfs <master>:/home/<user>/<name of sharable folder> ~/storage
|
||||
df -h
|
||||
sudo systemctl enable nfs-utils && sudo systemctl start nfs-utils && sudo systemctl restart nfs-utils
|
||||
#+end_src
|
||||
|
||||
** Add the entry to the file system table on clients
|
||||
#+begin_src bash
|
||||
cat /etc/fstab
|
||||
#MPI Cluster SetUP
|
||||
<master>:/home/<smad>/<name of sharable folder> /home/<smad>/<name of sharable folder> nfs
|
||||
#+end_src
|
||||
|
||||
** Write a program in C and compile the code
|
||||
- the file have to be a <name of file>.c on the Master-Node
|
||||
#+begin_src bash
|
||||
cd <name of sharable folder>
|
||||
pwd /home/<user>/<name of sharable folder>
|
||||
mpicc <name of file>.c
|
||||
#+end_src
|
||||
|
||||
** Run the C-Code on Master-Node
|
||||
#+begin_src bash
|
||||
mpirund -np 4 -hosts <master>,<client1>,<client2> ./a.out
|
||||
#+end_src
|
||||
|
||||
NOTE: The file.c can be every file from [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]], [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]] or other c compatible program.
|
||||
8
20230607222618-linphone.org
Normal file
8
20230607222618-linphone.org
Normal file
@@ -0,0 +1,8 @@
|
||||
:PROPERTIES:
|
||||
:ID: a88d9210-6085-4def-982a-d4a6ff391a2e
|
||||
:END:
|
||||
#+title: linphone
|
||||
|
||||
Linphone is an open source [[id:6f3d3914-0739-4e26-b8f8-05c932cd2833][SIP]] [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]] for HD voice/video calls, 1-to-1 and group instant messaging, conference calls etc.
|
||||
To use Linphone its necessary to install [[id:5c50958e-e38d-4f6c-b111-2a50a48cc1de][freepbx]] on a [[id:0dea8c51-5e1e-460c-9d0a-28293d62013e][VM]]. After Asterisk etc. has been installed, [[id:daa194c9-63f1-433e-8826-a0b4e9020e16][wireguard]] will also installed.
|
||||
|
||||
14
20230607234103-mbse_modell_based_system_engineering.org
Normal file
14
20230607234103-mbse_modell_based_system_engineering.org
Normal file
@@ -0,0 +1,14 @@
|
||||
:PROPERTIES:
|
||||
:ID: 574b9e96-1a86-4e43-878c-30534e0dcecb
|
||||
:END:
|
||||
#+title: MBSE (Modell based system engineering)
|
||||
|
||||
Model-based systems engineering (MBSE), according to the International Council on Systems Engineering (INCOSE), is the formalized application of modeling to support system requirements, design, analysis, verification and validation activities beginning in the conceptual design phase and continuing throughout development and later life cycle phases. MBSE is a technical approach to systems engineering that focuses on creating and exploiting domain models as the primary means of information exchange, rather than on document-based information exchange. MBSE technical approaches are commonly applied to a wide range of industries with complex systems, such as aerospace, defense, rail, automotive, manufacturing, etc.
|
||||
|
||||
Programmes that are used for MBSE are:
|
||||
- [[id:a4953b2b-81de-4c15-91e7-10d0cb5f22dd][freeCAD]]
|
||||
- [[id:6acf9122-b289-44e4-87e1-c3dfb5c7aeb2][salome]]
|
||||
- [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]]
|
||||
- [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]]
|
||||
- [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab-docker]]
|
||||
|
||||
6
20230607234636-salome.org
Normal file
6
20230607234636-salome.org
Normal file
@@ -0,0 +1,6 @@
|
||||
:PROPERTIES:
|
||||
:ID: 6acf9122-b289-44e4-87e1-c3dfb5c7aeb2
|
||||
:END:
|
||||
#+title: salome
|
||||
|
||||
Salome is a open-source computer programme that can be used to process three-dimensional activities in the CAE area. It is used for pre- and post-processing of numerical simulations such as FEM. Salome is used to partition the geometry created by [[id:a4953b2b-81de-4c15-91e7-10d0cb5f22dd][freeCAD]] before it is meshed in [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]].
|
||||
282
20230607235645-gmsh.org
Normal file
282
20230607235645-gmsh.org
Normal file
@@ -0,0 +1,282 @@
|
||||
:PROPERTIES:
|
||||
:ID: f2d9ff98-f926-442e-ae9b-fc1023e15b07
|
||||
:END:
|
||||
#+title: GMSH
|
||||
|
||||
Gmsh is a software for grid generation or meshing for the finite element method. The free software was programmed by Christophe Geuzaine and Jean-François Remacle under the GNU General Public License (GPL) and contains 4 modules:
|
||||
|
||||
- a graphics module to create 3-dimensional shapes
|
||||
- a meshing module
|
||||
- an equation solver module
|
||||
- a postprocessor module
|
||||
|
||||
Gmsh is considered one of the best 3D file viewers and is used and described scientifically. Gmsh is used after [[id:a4953b2b-81de-4c15-91e7-10d0cb5f22dd][freeCAD]] & [[id:6acf9122-b289-44e4-87e1-c3dfb5c7aeb2][salome]] to mesh the brep file after export in salome. For better performance, Gmsh should be compiled with [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][openmpi]] in [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]]. After meshing the Mesh is imported to [[id:2d45175d-7fcc-4a55-b81c-14da72247eef][FEA-Tool]] (as standalone-app or in [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab]]).
|
||||
|
||||
An [[id:5f1df0e1-384f-4685-ae1e-fec2431b04e5][emacs]] mode for GMSH and GetDP languages to provide indentation and nice coloring. Add the following lines your emacs configuration file (probably ~/home/<user>//.emacs.d/init.el~): (load "~/home/<user>/.emacs.d/path/to/gmsh_getdp.el~")
|
||||
|
||||
* GMSH command line flags
|
||||
#+begin_src bash
|
||||
gmsh -<flag> <file>.geo
|
||||
#+end_src
|
||||
|
||||
** Geometry:
|
||||
~-0~
|
||||
Output model, then exit
|
||||
|
||||
~-tol value~
|
||||
Set geometrical tolerance (Geometry.Tolerance)
|
||||
|
||||
~-match~
|
||||
Match geometries and meshes
|
||||
|
||||
** Mesh:
|
||||
|
||||
~-1, -2, -3~
|
||||
Perform 1D, 2D or 3D mesh generation, then exit
|
||||
|
||||
~-format string~
|
||||
Select output mesh format: auto, msh1, msh2, msh22, msh3, msh4, msh40, msh41, msh, unv, vtk, wrl, mail, stl, p3d, mesh, bdf, cgns, med, diff, ir3, inp, ply2, celum, su2, x3d, dat, neu, m, key, off, rad (Mesh.Format)
|
||||
|
||||
~-bin~
|
||||
Create binary files when possible (Mesh.Binary)
|
||||
|
||||
~-refine~
|
||||
Perform uniform mesh refinement, then exit
|
||||
|
||||
~-barycentric_refine~
|
||||
Perform barycentric mesh refinement, then exit
|
||||
|
||||
~-reclassify angle~
|
||||
Reclassify surface mesh, then exit
|
||||
|
||||
~-reparam angle~
|
||||
Reparametrize surface mesh, then exit
|
||||
|
||||
~-part int~
|
||||
Partition after batch mesh generation (Mesh.NbPartitions)
|
||||
|
||||
~-part_weight [tri,quad,tet,hex,pri,pyr,trih] int~
|
||||
Weight of a triangle/quad/etc. during partitioning (Mesh.Partition[Tri,Quad,...]Weight)
|
||||
|
||||
~-part_split~
|
||||
Save mesh partitions in separate files (Mesh.PartitionSplitMeshFiles)
|
||||
|
||||
~-part_[no_]topo~
|
||||
Create the partition topology (Mesh.PartitionCreateTopology)
|
||||
|
||||
~-part_[no_]ghosts~
|
||||
Create ghost cells (Mesh.PartitionCreateGhostCells)
|
||||
|
||||
~-part_[no_]physicals~
|
||||
Create physical groups for partitions (Mesh.PartitionCreatePhysicals)
|
||||
|
||||
~-part_topo_pro~
|
||||
Save the partition topology .pro file (Mesh.PartitionTopologyFile)
|
||||
|
||||
~-preserve_numbering_msh2~
|
||||
Preserve element numbering in MSH2 format (Mesh.PreserveNumberingMsh2)
|
||||
|
||||
~-save_all~
|
||||
Save all elements (Mesh.SaveAll)
|
||||
|
||||
~-save_parametric~
|
||||
Save nodes with their parametric coordinates (Mesh.SaveParametric)
|
||||
|
||||
~-save_topology~
|
||||
Save model topology (Mesh.SaveTopology)
|
||||
|
||||
~-algo string~
|
||||
Select mesh algorithm: auto, meshadapt, del2d, front2d, delquad, quadqs, initial2d, del3d, front3d, mmg3d, hxt, initial3d (Mesh.Algorithm and Mesh.Algorithm3D)
|
||||
|
||||
~-smooth int~
|
||||
Set number of mesh smoothing steps (Mesh.Smoothing)
|
||||
|
||||
~-order int~
|
||||
Set mesh order (Mesh.ElementOrder)
|
||||
|
||||
~-optimize[_netgen]~
|
||||
Optimize quality of tetrahedral elements (Mesh.Optimize[Netgen])
|
||||
|
||||
~-optimize_threshold~
|
||||
Optimize tetrahedral elements that have a quality less than a threshold (Mesh.OptimizeThreshold)
|
||||
|
||||
~-optimize_ho~
|
||||
Optimize high order meshes (Mesh.HighOrderOptimize)
|
||||
|
||||
~-ho_[min,max,nlayers]~
|
||||
High-order optimization parameters (Mesh.HighOrderThreshold[Min,Max], Mesh.HighOrderNumLayers)
|
||||
|
||||
~-clscale value~
|
||||
Set mesh element size factor (Mesh.MeshSizeFactor)
|
||||
|
||||
~-clmin value~
|
||||
Set minimum mesh element size (Mesh.MeshSizeMin)
|
||||
|
||||
~-clmax value~
|
||||
Set maximum mesh element size (Mesh.MeshSizeMax)
|
||||
|
||||
~-clextend value~
|
||||
Extend mesh element sizes from boundaries (Mesh.MeshSizeExtendFromBoundary)
|
||||
|
||||
~-clcurv value~
|
||||
Compute mesh element size from curvature, with value the target number of elements per 2*pi radians (Mesh.MeshSizeFromCurvature)
|
||||
|
||||
~-aniso_max value~
|
||||
Set maximum anisotropy for bamg (Mesh.AnisoMax)
|
||||
|
||||
~-smooth_ratio value~
|
||||
Set smoothing ration between mesh sizes at nodes of a same edge for bamg (Mesh.SmoothRatio)
|
||||
|
||||
~-epslc1d value~
|
||||
Set accuracy of evaluation of mesh size field for 1D mesh (Mesh.LcIntegrationPrecision)
|
||||
|
||||
~-swapangle value~
|
||||
Set the threshold angle (in degrees) between two adjacent faces below which a swap is allowed (Mesh.AllowSwapAngle)
|
||||
|
||||
~-rand value~
|
||||
Set random perturbation factor (Mesh.RandomFactor)
|
||||
|
||||
~-bgm file~
|
||||
Load background mesh from file
|
||||
|
||||
~-check~
|
||||
Perform various consistency checks on mesh
|
||||
|
||||
~-ignore_periocity~
|
||||
Ignore periodic boundaries (Mesh.IgnorePeriodicity)
|
||||
|
||||
** Post-processing:
|
||||
|
||||
~-link int~
|
||||
Select link mode between views (PostProcessing.Link)
|
||||
|
||||
~-combine~
|
||||
Combine views having identical names into multi-time-step views
|
||||
|
||||
** Solver:
|
||||
|
||||
~-listen string~
|
||||
Always listen to incoming connection requests (Solver.AlwaysListen) on the given socket (uses Solver.SocketName if not specified)
|
||||
|
||||
~-minterpreter string~
|
||||
Name of Octave interpreter (Solver.OctaveInterpreter)
|
||||
|
||||
~-pyinterpreter string~
|
||||
Name of Python interpreter (Solver.OctaveInterpreter)
|
||||
|
||||
~-run~
|
||||
Run ONELAB solver(s)
|
||||
|
||||
** Display:
|
||||
|
||||
~-n~
|
||||
Hide all meshes and post-processing views on startup (View.Visible, Mesh.[Points,Lines,SurfaceEdges,...])
|
||||
|
||||
~-nodb~
|
||||
Disable double buffering (General.DoubleBuffer)
|
||||
|
||||
~-numsubedges~
|
||||
Set num of subdivisions for high order element display (Mesh.NumSubEdges)
|
||||
|
||||
~-fontsize int~
|
||||
Specify the font size for the [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] (General.FontSize)
|
||||
|
||||
~-theme string~
|
||||
Specify FLTK GUI theme (General.FltkTheme)
|
||||
|
||||
~-display string~
|
||||
Specify display (General.Display)
|
||||
|
||||
~-camera~
|
||||
Use camera mode view (General.CameraMode)
|
||||
|
||||
~-stereo~
|
||||
OpenGL quad-buffered stereo rendering (General.Stereo)
|
||||
|
||||
~-gamepad~
|
||||
Use gamepad controller if available
|
||||
|
||||
** Other:
|
||||
|
||||
~-, -parse_and_exit~
|
||||
Parse input files, then exit
|
||||
|
||||
~-save~
|
||||
Save output file, then exit
|
||||
|
||||
~-o file~
|
||||
Specify output file name
|
||||
|
||||
~-new~
|
||||
Create new model before merge next file
|
||||
|
||||
~-merge~
|
||||
Merge next files
|
||||
|
||||
~-open~
|
||||
Open next files
|
||||
|
||||
~-log filename~
|
||||
Log all messages to filename
|
||||
|
||||
~-a, -g, -m, -s, -p~
|
||||
Start in automatic, geometry, mesh, solver or post-processing mode (General.InitialModule)
|
||||
|
||||
~-pid~
|
||||
Print process id on stdout
|
||||
|
||||
~-watch pattern~
|
||||
Pattern of files to merge as they become available (General.WatchFilePattern)
|
||||
|
||||
~-bg file~
|
||||
Load background (image or PDF) file (General.BackgroundImageFileName)
|
||||
|
||||
~-v int~
|
||||
Set verbosity level (General.Verbosity)
|
||||
|
||||
~-string "string"~
|
||||
Parse command string at startup
|
||||
|
||||
~-setnumber name value~
|
||||
Set constant, ONELAB or option number name=value
|
||||
|
||||
~-setstring name value~
|
||||
Set constant, ONELAB or option string name=value
|
||||
|
||||
~-nopopup~
|
||||
Don’t popup dialog windows in scripts (General.NoPopup)
|
||||
|
||||
~-noenv~
|
||||
Don’t modify the environment at startup
|
||||
|
||||
~-nolocale~
|
||||
Don’t modify the locale at startup
|
||||
|
||||
~-option file~
|
||||
Parse option file at startup
|
||||
|
||||
~-convert files~
|
||||
Convert files into latest binary formats, then exit
|
||||
|
||||
~-nt int~
|
||||
Set number of threads (General.NumThreads)
|
||||
|
||||
~-cpu~
|
||||
Report CPU times for all operations
|
||||
|
||||
~-version~
|
||||
Show version number
|
||||
|
||||
~-info~
|
||||
Show detailed version information
|
||||
|
||||
~-help~
|
||||
Show command line usage
|
||||
|
||||
~-help_options~
|
||||
Show all options
|
||||
|
||||
* Convert a gmsh mesh to openfoam
|
||||
- [[id:34c4e594-2aee-42d6-803a-6f843176d3b9][openFoam]] mesh conversion/manipulation tools
|
||||
** ~gmshToFoam <nameofmesh>.msh~ in OpenFOAM terminal within the case directory
|
||||
** ~splitMeshRegions -cellZonesOnly -overwrite~ (this is only used if there are multiple parts (volumes) to be split up) works only in main case folder, where ~.msh~ is present
|
||||
22
20230608000906-fea_tool.org
Normal file
22
20230608000906-fea_tool.org
Normal file
@@ -0,0 +1,22 @@
|
||||
:PROPERTIES:
|
||||
:ID: 2d45175d-7fcc-4a55-b81c-14da72247eef
|
||||
:END:
|
||||
#+title: FEA-Tool
|
||||
|
||||
FEA-Tool is a physics, finite element analysis (FEA), and PDE simulation toolbox. FEATool Multiphysics features the ability to model fully coupled heat transfer, fluid dynamics, chemical engineering, structural mechanics, fluid-structure interaction (FSI), electromagnetics, as well as user-defined and custom PDE problems in 1D, 2D (axisymmetry), or 3D, all within a graphical user interface ([[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]]) or optionally as script files. FEATool has been employed and used in academic research, teaching, and industrial engineering simulation contexts.
|
||||
|
||||
NOTE: FEA-Tool can be compile as featool.c file with [[id:e56e90b1-ae5b-4344-97eb-993e5a81263e][OpenMPI]] as [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]] in a [[id:408e8348-778a-4fbd-a14d-9f3d9c595b4a][cluster]].
|
||||
|
||||
* Install on [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] & [[id:e336814a-3a58-4b25-8d02-0af07623ce45][Matlab]] in Download folder
|
||||
** On [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] as standallone app
|
||||
- Download:
|
||||
#+begin_src bash
|
||||
wget https://github.com/precise-simulation/featool-multiphysics/releases/latest/download/FEATool_Multiphysics.install #+end_src
|
||||
|
||||
|
||||
** On [[id:e336814a-3a58-4b25-8d02-0af07623ce45][Matlab]]
|
||||
- Download:
|
||||
#+begin_src bash
|
||||
wget https://github.com/precise-simulation/featool-multiphysics/releases/latest/download/FEATool_Multiphysics.mlappinstall
|
||||
#+end_src
|
||||
- hahahahaha
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user