Listing posts

Displaying posts 1 - 5 of 345 in total
Firefox personalizations attachment
mouse 4578 · person cloud · link
Last update
2025-04-22
2025
04-22
«browser apps/addons/plugins»

Firefox user interface

From mozilla forum:

  1. in about:config set toolkit.legacyUserProfileCustomizations.stylesheets = true
  2. clone & install custom CSS from https://github.com/aris-t2/customcssforfx
  3. uncomment @import "./css/tabs/tabs_below_navigation_toolbar.css"; in current/userChrome.css
  4. cd firefox_profile && rm -rf chrome && ln -sf /path/to/repo/current

Extra

My about:config settings

  • browser.download.alwaysOpenPanel = false -- fix naggin download panel since FF 98
  • browser.tabs.loadDivertedInBackground = true @
  • security.dialog_enable_delay = 100 @
  • browser.tabs.hoverPreview.enabled = false @
  • browser.tabs.hoverPreview.showThumbnails = false (Settings>General>Tabs) @
  • set a custom user agent:

    1. Add new string value general.useragent.override
    2. Enter your preferred UA
    3. Check it on https://www.whatsmyua.info/

    This is especially useful if you are on an ARM device (like raspberry pi) and google keeps giving you its mobile version, for example:

    1
    2
    Mozilla/5.0 (X11; Linux armv7l; rv:60.0) Gecko/20100101 Firefox/60.0    # before
    Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0    # after
    

Date format (displaying input type=date fields)

Set intl.regional_prefs.use_os_locales = true then:

1
2
export LANG=it_IT.UTF-8
exec /opt/firefox/firefox

Add-ons

old:


Source: userChrome.org, CustomCSSforFx


~~~ * ~~~

Android apps
Last update
2025-04-09
2025
04-09
«a collection of must have android apps for many common needs
apps/addons/plugins»

Stores: Google Play, NeoStore, F-Droid, Droid-ify, Aurora (src)

To check

General

Media

Games

System

Home automation

Svago


Other lists: Retrial, Finalboss77


~~~ * ~~~

Backup & restore disk/partitions
mouse 4128 · person cloud · link
Last update
2025-04-05
2025
04-05
«squashfs»

1. Partition table

1
2
3
4
5
# dump raw ms-dos table/mbr
dd if=/dev/sdX of=mbr.bin     bs=512 count=1
dd if=/dev/sdX of=mbr_2mb.bin bs=2MB count=1 # paranoia
# restore
dd if=mbr.bin of=/dev/sdX
  • using sfdisk (version > 2.26 for GPT support):
1
2
3
4
5
6
7
8
9
# dump raw partition table
sfdisk -b -O disk /dev/sdX # disk-<device>-<offset>.bak
# restore
ls disk-*.bak | sed -r 's/(.+)-(0x.+).bak/dd if=\0 of=\/dev\/sdX seek=$((\2)) bs=1 conv=notrunc/' | bash

# dump partition table in text format
sfdisk -d /dev/sdX > sdcard.ptable
# restore
sfdisk    /dev/sdX < sdcard.ptable

2. Partition data

You can use FSarchiver or the old school way:

  • ext* efficient backup/restore:
1
2
e2image -ra /dev/sdXY - | pv | 7za a -mx=9 -si sdXY.e2i.7z
7za x -so sdXY.e2i.7z | pv | dd of=/dev/sdXY bs=4K

or create a squashfs mountable image1:

1
2
3
4
5
6
7
8
9
10
11
apt install squashfs-tools

# backup
mkdir tmpdir
mksquashfs tmpdir sdXY.squashfs -p "sdXY.img f 444 root root e2image -ra /dev/sdXY -" -comp xz

# mount and...
mkdir tmpdir mntdir
mount sdXY.squashfs tmpdir
pv tmpdir/sdXY.img | dd of=/dev/sdXY # ...restore or...
mount tmpdir/sdXY.img mntdir         # ...inspect

Convert a .tgz backup file to squashfs using squashfs-tools-ng:

1
2
apt install squashfs-tools
gunzip -c file.tgz | tar2sqfs file.squashfs
  • ntfs efficient backup/restore:
1
2
ntfsclone -s -o - /dev/sdXY | pv | 7za a -mx=9 -si sdXY.nc.7z
7za x -so sdXY.nc.7z | pv | ntfsclone -r -O /dev/sdXY -
  • raw full backup/restore:
1
2
dd if=/dev/sdXY | pv | 7za a -mx=9 -si sdXY.dd.7z
7za x -so sdXY.dd.7z | pv | dd of=/dev/sdXY bs=4K

Tips: dd seek/skip


~~~ * ~~~

Install Debian on F2FS filesystem
mouse 45 · person cloud · link
Last update
2025-04-05
2025
04-05
«flash friendly filesystem»

Install

  • boot: advanced options > expert install
  • proceed until Load installer components..., then select f2fs-modules
  • proceed until Partition disks, then:
  • select Execute a shell, then:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  df -hT   # show mounted device names
  umount /target/boot
  cp -a /target /tg
  umount /target
  anna-install f2fs-tools-udeb  # or anna-install f2fs-modules; depmod; modprobe f2fs
  mkfs.f2fs -l mylabel -f -i -O extra_attr,inode_checksum,sb_checksum,compression /dev/sdX2
  mount -t f2fs -o compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime /dev/sdX2 /target
  cp -a /tg/. /target
  blkid -s UUID -o value /dev/sdX2 >> /target/etc/fstab
  echo "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime" >> /target/etc/fstab
  nano /target/etc/fstab # edit `/`: replace UUID, set type=f2fs, prepend options
  mount /dev/sdX1 /target/boot
  df -hT   # re-check mounted device names
  exit
  • select Install the base system
  • reboot
  • grub (/etc/default/grub & update-grub)

System backup

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 1. copy latest `busybox` into destination folder
#   in order to use `tar` and `gzip` applets

# 2.boot debian netinst cd > Advanced > Rescue mode > Execute a Shell
anna-install f2fs-modules
depmod
modprobe f2fs
mkdir src dst
mount -t f2fs -o ro /dev/sdX2 /src
mount -t f2fs /dev/mmcblk0p1 /dst
cd /dst 
./busybox tar -C /src --numeric-owner -cvpf - . | ./busybox gzip -c > backup.tgz
cd /
umount /src /dst

Source: davidsebek, archlinux, debian, kernel


~~~ * ~~~

Test disk speed
mouse 1903 · person cloud · link
Last update
2025-04-05
2025
04-05
« — »
1
2
3
4
5
6
7
8
9
# read speed
hdparm -t -T /dev/sda

# write speed: file on filesystem
dd if=/dev/zero of=/tmp/output conv=fdatasync bs=1M count=100; rm -f /tmp/output
dd if=/dev/zero of=/tmp/output bs=100M count=1 oflag=dsync   ; rm -f /tmp/output

# write speed on disk/partition (destructive!)
dd if=/dev/zero of=/dev/sdXY conv=fdatasync bs=1M count=100

Source: AskUbuntu