Paws/README.md

125 lines
4.4 KiB
Markdown
Raw Normal View History

2023-05-11 14:54:10 +02:00
# Paws
2023-09-07 22:04:52 +02:00
This repo holds most of my random small scripts, configs, paws(blobs)
---
## Contents
2023-10-08 15:27:50 +02:00
* [Configs](#configs)
* [Cura](#cura)
* [Materials](#materials)
2024-03-07 21:35:11 +01:00
* [Clas Ohlsson's PLA](#clas-ohlsson-s-pla)
2024-04-08 12:39:45 +02:00
* [Tmux](#tmux)
2024-06-06 00:33:06 +02:00
* [Docker](#docker)
* [Docker Compose](#docker-compose)
2024-03-07 21:35:11 +01:00
* [Python Scripts](#python-scripts)
* [rename_backslash.py](#rename_backslash-py)
* [Shell Scripts](#shell-scripts)
* [24-bit-color.sh](#24-bit-color-sh)
2024-06-24 22:14:12 +02:00
* [reinstall-packages-with-missing-files.sh](#reinstall-packages-with-missing-files-sh)
2024-03-07 21:35:11 +01:00
* [rsync-incremental-backups.sh](#rsync-incremental-backups-sh)
* [set_dns_search_domain.sh](#set_dns_search_domain-sh)
2024-03-24 10:54:03 +01:00
2023-09-08 10:26:02 +02:00
---
2024-03-24 10:54:03 +01:00
## [Configs](Configs/)
2023-10-08 15:27:50 +02:00
2024-03-24 10:54:03 +01:00
### [Cura](Configs/Cura/)
2023-10-08 15:27:50 +02:00
2024-03-24 10:54:03 +01:00
#### [Materials](Configs/Cura/Materials/)
2023-10-08 15:27:50 +02:00
2024-03-24 10:54:03 +01:00
##### [Clas Ohlsson's PLA](Configs/Cura/Materials/ClasOhlssonPLA.xml.fdm_material)
2023-10-08 15:27:50 +02:00
2023-09-10 21:50:59 +02:00
The material config file for Clas Ohlsson's PLA Materials
2023-10-08 15:27:50 +02:00
2024-05-06 22:38:48 +02:00
---
2024-04-06 23:08:28 +02:00
### [Tmux](Configs/Tmux/tmux.conf)
My tmux config file. Some note worthy changes are:
2024-06-17 22:19:09 +02:00
* `prefix` + `r` for quick reloading the config
* higher history limit
* `alt + arrow keys` to quickly change active panel
2024-06-06 00:33:06 +02:00
2024-12-21 16:31:31 +01:00
## [Docker](Docker/)
2024-06-06 00:33:06 +02:00
2024-12-21 16:31:31 +01:00
### [Docker Compose](Docker/Docker-Compose/)
2024-06-06 00:33:06 +02:00
README's are in there respectively docker compose folders
2024-03-22 23:38:09 +01:00
## [Python Scripts](PythonScripts/)
2024-03-06 15:46:44 +01:00
2024-03-22 22:36:38 +01:00
### [rename_backslash.py](PythonScripts/rename_backslash.py)
2024-03-06 15:46:44 +01:00
2024-07-25 22:53:41 +02:00
A script to replace backslashes(\\) with in filenames within a directory and its sub-directories.
2024-03-06 15:46:44 +01:00
2024-07-25 22:53:41 +02:00
Run with ether of the commands below and replace `<path>` your actual path to the folder where the files are located that you want to rename.
```Bash
python PythonScripts/rename_backslash.py <path>
```
or
```Bash
PythonScripts/rename_backslash.py <path>
```
2024-03-24 10:54:03 +01:00
## [Shell Scripts](ShellScripts/)
2024-03-06 15:46:44 +01:00
2024-03-12 22:02:04 +01:00
This folder has a loot of different shell scripts for everything from automating stuff to toys.
2023-10-08 15:27:50 +02:00
2024-03-24 10:54:03 +01:00
### [24-bit-color.sh](ShellScripts/24-bit-color.sh)
2023-10-08 15:27:50 +02:00
2023-09-07 22:07:19 +02:00
This script echoes a bunch of 24-bit color codes to the terminal to demonstrate its functionality and test color support of terminals.
2023-09-08 10:26:02 +02:00
![An image showing four lines the first is fading black to red, second black to green, third black to blue, and the last is all rainbow colours](Docs/img/24-bit-color.png)
---
2023-10-08 15:27:50 +02:00
### [reinstall-packages-with-missing-files.sh](ShellScripts/reinstall-packages-with-missing-files.sh)
Reinstall all packages with missing files
This script uses the `pacman` package manager to check for packages with
missing files. It then iterates over each package and reinstalls it using
`pacman`. The `--overwrite` flag is used to ensure that any conflicting
files are overwritten. Finally, the `--noconfirm` flag is used to avoid
confirmation prompts for each package.
2024-06-23 15:47:38 +02:00
> Warning: This script overwrites any modified files on the system with the original files from the packages.
Usage:
> Note needs to be run as root.
```Bash
./ShellScripts/reinstall-packages-with-missing-files.sh
```
2024-03-24 10:54:03 +01:00
### [rsync-incremental-backups.sh](ShellScripts/rsync-incremental-backups.sh)
2023-10-08 15:27:50 +02:00
2023-09-08 10:26:02 +02:00
This script performs incremental backups of the specified source directory using rsync, and it keeps a symbolic link called 'latest' pointing to the most recent backup for easy reference. The script also logs backup details in a log file with a timestamp. Make sure to replace `<input folder>` and `<output folder>` with your actual source and backup directories.
---
2024-03-24 10:54:03 +01:00
### [set_dns_search_domain.sh](ShellScripts/set_dns_search_domain.sh)
Is a small script that runs the resolvectl domain command when the specific a Wi-Fi network is gets connected.
* **To configure the system to run the script:**
You can configure your system to execute the script whenever the Wi-Fi connection event occurs. This typically involves using network manager scripts or similar mechanisms provided by your Linux distribution.
replace the `<Your_Targeted_WiFi_SSID>`, `<interface>` and `<domain>` with the actual values you have.
For example, with NetworkManager, you can place the script in the /etc/NetworkManager/dispatcher.d directory. Scripts in this directory are executed when network events occur.
```Bash
sudo cp set_dns_search_domain.sh /etc/NetworkManager/dispatcher.d/
```
Ensure that the script has execute permissions:
```Bash
sudo chmod +x /etc/NetworkManager/dispatcher.d/set_dns_search_domain.sh
```
The script will be automatically executed whenever the Wi-Fi connection event occurs. When the targeted Wi-Fi network is connected, the DNS search domain will be set for the specified interface.