various bambu, bangle, and arch additions

This commit is contained in:
2024-09-05 11:32:45 -04:00
parent bf326f97da
commit e246a23f45
8 changed files with 212 additions and 1 deletions

View File

@@ -49,6 +49,7 @@
- [Glances](#glances)
- [VirtualBox](#virtualbox)
- [Email](#email)
- [Traffic Usage](#traffic-usage)
## Pacman Packages
@@ -636,6 +637,16 @@ Install with flatpak.
flatpak install com.bambulab.BambuStudio
```
The config is located at `~/.var/app/com.bambulab.BambuStudio/config/BambuStudio/BambuStudio.conf`
At the very top of the config you can add a pin for a printer permanently with:
```json
"access_code": {
"printer serial number": "access code here"
},
```
## Orca Slicer
<https://github.com/SoftFever/OrcaSlicer>
@@ -811,3 +822,14 @@ pacman -S geary
- Open geary
- Add the account following protonmail bridge's instructions
## Traffic Usage
Nethogs shows per-app network utilization.
```bash
pacman -S nethogs
# You'll need to run this with sudo if you aren't root
nethogs
```

View File

@@ -0,0 +1,38 @@
# Bangle JS
## Browser
<https://www.espruino.com/Quick+Start+BLE#with-web-bluetooth>
## Android
<https://github.com/espruino/BangleApps/wiki#phone-integration>
## Apps
- [Android](https://banglejs.com/apps/?id=android)
- [Home Assistant](https://banglejs.com/apps/?id=ha)
- [Spotify](https://banglejs.com/apps/?id=spotrem)
- [Find Phone](https://banglejs.com/apps/?id=findphone)
- [Weather](https://banglejs.com/apps/?id=weather)
## Sleep Data
Export in javascript format.
Use `=(A7/(1000*60*60*24)+25569)+(-4/24)` to convert javascript to date.
Use the following table to convert `sleep` values to human-readable:
| key | value |
| --- | ----------- |
| 0 | unknown |
| 1 | not worn |
| 2 | awake |
| 3 | light sleep |
| 4 | deep sleep |
Use `=VLOOKUP(<raw sleep value>,<cell with 0>:<cell with deep sleep>,2)` to convert number to human
readable value.
Use `=(<end date>-<start date>)*1440` to calculate minutes between each timestamp.

View File

@@ -47,3 +47,14 @@ claim it's been around for a while and Nextcloud doesn't seem to be fixing it.
<https://www.wireguard.com/install/#android-play-store-direct-apk-file>
Since we don't have the play store we'll need to download from the website.
### PhoneTrack
1. `Significant motion mode: off`. This seems to break phonetrack.
2. `Minimum distance: 0`. This ensures a location update is sent every time regardless of distance moved.
3. `Minimum time: 60`. Send a location update every minute.
4. `Minimum accuracy: 100`. Don't worry about being super accurate, just get a location out.
5. `Keep GPS on between fixes: off`. This drains battery but does make location updates super accurate.
6. `Location timeout: 30`. Wait 30 seconds for GPS fix before using less accurate location.
![PhoneTrack Working Settings](images/Screenshot_20240904-121037_PhoneTrack.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

View File

@@ -0,0 +1,111 @@
# iOS
## Photos Export
<https://github.com/icloud-photos-downloader/icloud_photos_downloader>
```bash
podman run -it --rm --name icloudpd \
-v $(pwd)/iPhotos:/data \
-e TZ=America/New_York \
icloudpd/icloudpd:latest \
icloudpd \
--directory /data \
--username apple@ducoterra.net \
--watch-with-interval 3600
```
You can browse all downloaded photos with `feh`:
```bash
pacman -S feh
feh --recursive --scale-down -d -S filename $(pwd)/iPhotos
```
## Extensions
- PNG
- HEIC: iOS HDR photo
- MOV
- DNG: iOS raw photo
- JPG
- 3gp: quicktime video file
- MP4
- GIF
- WEBP: Google photo container
- CR2: Canon raw photo
## Conversion
You will need `imagemagick` and `libraw`:
```bash
pacman -S imagemagick libraw
```
Then you can convert any image with magick:
```bash
magick input.HEIC output.png
magick input.HEIC output.jpeg
```
You get a list of all unique file extensions with:
```bash
find . -type f | awk -F. '!a[$NF]++{print $NF}'
```
Then use those file extensions to create a find command:
```bash
# -o means "or" in this case
# Parentheses are required
find . -type f -printf '%p\n' \( \
-iname '*.jpg' \
-o -iname '*.heic' \
-o -iname '*.dng' \
-o -iname '*.png' \
-o -iname '*.WEBP' \
-o -iname '*.cr2' \
\)
```
And then use xargs with magick to convert the images:
```bash
find . -type f \( \
-iname '*.jpg' \
-o -iname '*.heic' \
-o -iname '*.dng' \
-o -iname '*.png' \
-o -iname '*.WEBP' \
-o -iname '*.cr2' \
\) -print0 | xargs -0 -P $(nproc) -I % python -c "\
import subprocess; \
from pathlib import Path; \
to_folder = '/run/media/ducoterra/photos/'; \
p = Path(\"%\"); \
realpath = (str(p.parent) + '/' if str(p.parent) != '.' else '') + p.stem + '.jpg'; \
subprocess.run(['mkdir', '-p', to_folder + str(Path(realpath).parent)]); \
subprocess.run(['magick', \"%\", to_folder + realpath])"
```
And then videos:
```bash
find . -type f \( \
-iname '*.MOV' \
-o -iname '*.3gp' \
-o -iname '*.MP4' \
-o -iname '*.GIF' \
\) -print0 | xargs -0 -I % python -c "\
import subprocess; \
from pathlib import Path; \
to_folder = '/run/media/ducoterra/photos/'; \
p = Path(\"%\"); \
realpath = (str(p.parent) + '/' if str(p.parent) != '.' else '') + p.stem + '.mp4'; \
subprocess.run(['mkdir', '-p', to_folder + str(Path(realpath).parent)]); \
subprocess.run(['ffmpeg', '-i', '%', '-c', 'copy', to_folder + realpath])"
```