more notes

This commit is contained in:
Dobromir Popov
2024-07-31 09:27:52 +03:00
parent f82836130a
commit deab2815fe
8 changed files with 97 additions and 29 deletions

BIN
linux/.setup aider.md.swp Normal file

Binary file not shown.

View File

@ -15,3 +15,10 @@ docker save -o <path/to/save/image.tar> 2fauth
docker load -i <path/to/save/image.tar>
docker run -d --name <new_container_name> <backup_image_name>
# cleanup
Remove all unused images/volumes:
docker image prune -a
docker volume prune
# containers, networks, images, and volumes
docker system prune -a --volumes

View File

@ -1,27 +0,0 @@
# disk info
lsblk
sudo fdisk -l
sudo parted -l
gnome-disks
sudo umount -f /mnt
umount --lazy /mnt/data
## ntfs resize:
sudo ntfsfix /dev/sda2
# Shrink the NTFS Partition:
sudo ntfsresize --size 100G /dev/sda2 (-f)
mkdir
# folder size:
du -hs
# find big files
find / -type f -size +100M

View File

@ -11,6 +11,43 @@ fdisk p # existing partitions
# Press n to create a new partition.
# press w to write the changes to the disk.
sudo mkfs.ext4 /dev/sdXN
# mount
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /mnt/apps/docker_volumes/portainer_data:/data portainer/portainer-ce
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /mnt/apps/docker_volumes/portainer_data:/data portainer/portainer-ce
# ---------------------
# disk info
lsblk
sudo fdisk -l
sudo parted -l
gnome-disks
sudo umount -f /mnt
umount --lazy /mnt/data
## ntfs resize:
sudo ntfsfix /dev/sda2
# Shrink the NTFS Partition:
sudo ntfsresize --size 100G /dev/sda2 (-f)
mkdir
# folder size:
du -hs
# find big files
find / -type f -size +100M
# find big files - NCurses Disk Utility - https://dev.yorhel.nl/ncdu
sudo apt-get install ncdu
ncdu
Delete the File: Once you have highlighted the file you want to delete, press the d key. ncdu will prompt you to confirm the deletion.

View File

@ -21,4 +21,13 @@ export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin/ctags
export OPENAI_API_KEY=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
# dev-bro GPT4
export OPENAI_API_KEY=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
export OPENAI_API_KEY=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
# models:
https://aider.chat/docs/leaderboards/
aider --model openrouter/meta-llama/llama-3.1-405b-instruct
# https://openrouter.ai/settings/keys
OPENROUTER_API_KEY=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

View File

@ -0,0 +1,42 @@
# https://docs.waydro.id/usage/install-on-desktops
apt update
apt install curl ca-certificates -y
curl https://repo.waydro.id | bash
apt install waydroid -y
ensure we have in yml:
devices:
- "/dev/binder:/dev/binder"
- "/dev/ashmem:/dev/ashmem"
privileged: true
#
waydroid init
systemctl start waydroid-container
systemctl enable waydroid-container
systemctl status waydroid-container
<!-- ## ERROR: [Errno 2] No such file or directory: 'modprobe'
apt update
apt install kmod
## modprobe: FATAL: Module binder_linux not found in directory /lib/modules/5.15.0-91-generic
apt install linux-modules-extra-$(uname -r) -->
#
# export WAYLAND_DISPLAY=wayland-0
# export XDG_RUNTIME_DIR=/run/user/$(id -u)
useradd -m -s /bin/bash user
passwd user
usermod -aG sudo user
su - user
export DISPLAY=:1
export XDG_RUNTIME_DIR=/run/user/$(id -u)
# Start Waydroid if it is not already running
$waydroid session start

0
linux/sysyem maintain.md Normal file
View File

View File