Skip to content

Instantly share code, notes, and snippets.

View arvati's full-sized avatar
💭
Studying online

Ademar Arvati arvati

💭
Studying online
View GitHub Profile
@arvati
arvati / btrfs raid disk replace.txt
Last active December 6, 2021 21:28
Replace btrfs disk of a raid
btrfs device stats /mnt/btrfs
poweroff
dmesg
btrfs device scan
btrfs filesystem show
warning, device 5 is missing
Label: 'btrfs' uuid: 68706ead-a626-4209-b3d0-1187b835f803
Total devices 4 FS bytes used 2.80TiB
@arvati
arvati / howto increase aws disk size.txt
Last active April 2, 2020 00:39
Increase disk size aws
aws --version
df -h
lsblk
cat /proc/mounts
sudo service mysql stop
sudo service apache2 stop
sudo service svnserve stop
sync
sudo umount -f /srv
@arvati
arvati / install Anbox on debian buster.txt
Last active February 5, 2024 21:36
Install Anbox on Debian Buster and use android apps
sudo snap install --devmode --beta anbox
snap restart anbox.container-manager
sudo apt install android-tools-adb anbox
ls /lib/modules/`uname -r`/kernel/drivers/android/binder_linux.ko
ls /lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko
sudo modprobe ashmem_linux
sudo modprobe binder_linux
@arvati
arvati / . prepare debian environment
Last active April 18, 2020 00:49
Prepare Debian Environment
sudo nano /etc/apt/apt.conf.d/70debconf
sudo nano /etc/apt/preferences.d/main
sudo nano /etc/apt/sources.list
sudo nano /etc/apt/sources.list.d/google-chrome.list
sudo nano /etc/apt/sources.list.d/microsoft-prod.list
sudo nano /etc/apt/sources.list.d/sid.list
sudo nano /etc/apt/preferences.d/systemd
sudo nano /etc/apt/preferences.d/nosystemd
sudo nano /etc/apt/apt.conf.d/100guiconf
@arvati
arvati / android_x86 howto.txt
Last active April 18, 2020 19:29
Android_x86 dual boot with Debian
cd ~/Downloads
wget https://osdn.net/dl/android-x86/android-x86_64-9.0-r2.iso
sudo mkdir /android-x86
sudo chown $USER:$USER /android-x86
mkdir /android-x86/data
sudo mkdir /mnt/iso
sudo mount -o loop android-x86_64-9.0-r2.iso /mnt/iso
cp /mnt/iso/initrd.img /android-x86/
cp /mnt/iso/kernel /android-x86/
cp /mnt/iso/ramdisk.img /android-x86/
@arvati
arvati / Backup Everything.txt
Last active March 23, 2023 01:38
Backup OpenWrt Systems
opkg update
opkg install tar
cd /
tar -cvpzf /mnt/data/rootfs.tar.gz --exclude=/mnt/data/rootfs.tar.gz --one-file-system /
tar -cvpzf /mnt/data/overlay.tar.gz --exclude=/mnt/data/overlay.tar.gz --one-file-system /overlay-boot/
# if not full tar package just busybox tar
cat <<EOT >> /tmp/exclude.list
sys
tmp
@arvati
arvati / install draftsight beta.txt
Last active February 17, 2024 05:08
Install DraftSight Beta Linux
#wget http://dl-ak.solidworks.com/nonsecure/draftsight/2019SP2/draftSight.deb
wget http://dl-ak.solidworks.com/nonsecure/draftsight/2019SP3/draftSight.deb
sudo dpkg -i draftSight.deb
sudo apt-get install -f
sudo apt install faketime menulibre
cd /opt/dassault-systemes/DraftSight/Linux/
env --unset=XDG_CURRENT_DESKTOP --unset=DESKTOP_SESSION --unset=GNOME_DESKTOP_SESSION_ID faketime '2019-12-01 08:15:42' "/opt/dassault-systemes/DraftSight/Linux/DraftSight"
sudo nano /usr/share/applications/dassault-systemes_draftsight.desktop
@arvati
arvati / .\connect.sh
Last active April 26, 2020 19:03
Connect Bluetooth Alsa Device Openwrt
#!/bin/ash
echo "Choose Device to connect"
echo "Device 1: B28S"
echo "Device 2: PT-Music"
echo "Device 3: Memorex MW212"
echo "Device 4: ilink"
echo "Device 5: BT-163"
read -n 1 -s resp
@arvati
arvati / jupyter notebook lxc openwrt.txt
Last active May 17, 2023 03:15
Installing jupyterlab notebook on openwrt lxc container
nano /etc/config/fstab
config mount 'lxc'
option target '/srv/lxc'
option uuid '68706ead-a626-4209-b3d0-1187b835f803'
option fstype 'btrfs'
option btrfs_raid '1'
option options 'subvol=/containers,noatime,nodiratime,noacl,nossd'
# option options 'subvol=/containers,noatime,nodiratime,noacl,degraded,nossd,device=/dev/sda,device=/dev/sdb,device=/dev/sdc,device=/dev/sdd'
option enabled '1'
@arvati
arvati / . Install Jupyter Hub on LXC container in OpenWrt.md
Last active December 14, 2023 16:03
Install Jupyter Hub on LXC container in OpenWrt

Install Jupyter Hub on LXC container in OpenWrt

Config LXC Containers

Config fstab btrfs subvolume /containers to hold all LXC Containers
nano /etc/config/fstab

config mount 'lxc'
        option target '/srv/lxc'
        option uuid '68706ead-a626-4209-b3d0-1187b835f803'
        option fstype 'btrfs'
	option btrfs_raid '1'