dataDesk BLOG

Welcome to the blog of Mr.G


Blog 6: YouCut_20260330_110709853.mp4 | (Open) | (Share)

▲ Previous | Next ▼

/Videos

(Last modified: May 19 2026 18:46:54)
Shared by © dataDesk



Blog 7: Useful_USB_disk_monitoring.md | (Open) | (Share)

▲ Previous | Next ▼

/Dev/DietPi

(Last modified: May 18 2026 01:05:26)

Useful USB disk monitoring

Useful USB disk monitoring and power-management commands on Linux/DietPi.

Show disks and UUIDs:

lsblk -f

Show currently mounted filesystems:

findmnt

Show all active mounts:

mount

Show detailed disk IDs:

ls -l /dev/disk/by-id/

Show filesystem UUIDs:

sudo blkid

Live kernel USB/disk events:

sudo dmesg -w

Filter USB-related kernel messages:

sudo dmesg -T | grep -iE "usb|reset|disconnect|uas|error"

Watch disks appear/disappear live:

watch -n1 lsblk

Show USB topology and drivers:

lsusb -t

Check current disk power state:

sudo hdparm -C /dev/sda

Possible outputs:

  • active/idle
  • standby
  • sleeping

Disable automatic disk standby temporarily:

sudo hdparm -S 0 /dev/sda

Check whether standby is disabled:

sudo hdparm -I /dev/sda | grep level

Test wake-up delay:

time ls /mnt/wd500 >/dev/null

Disable USB autosuspend temporarily until reboot:

echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend

Restore default USB autosuspend behavior:

echo 2 | sudo tee /sys/module/usbcore/parameters/autosuspend

Check current autosuspend setting:

cat /sys/module/usbcore/parameters/autosuspend

Watch raw disk activity counters:

watch -n1 'cat /proc/diskstats | grep sda'

Install iostat tools:

sudo apt install sysstat

Live disk I/O statistics:

iostat -xm 1

Manually mount a UUID-defined disk from /etc/fstab:

sudo mount /mnt/usb

Mount all entries from /etc/fstab:

sudo mount -a

Repair NTFS filesystem after unsafe disconnect:

sudo ntfsfix /dev/sdb2

Install NTFS driver support:

sudo apt install ntfs-3g

Create mount directory:

sudo mkdir -p /mnt/wd500

Example /etc/fstab entry using UUID:

UUID=9408023C08021E3C /mnt/wd500 ntfs defaults,nofail,noatime,rw,uid=1000,gid=1000,umask=0022 0 0

Example keepalive cronjob to prevent drive sleep:

*/5 * * * * /bin/ls /mnt/wd500 >/dev/null 2>&1



Blog 8: DietPI_NAS.md | (Open) | (Share)

▲ Previous | Next ▼

/Dev

Last modified: April 14 2026 03:18:37

DietPi NAS

complete setup from start to finish, only the necessary parts.


1. Install NTFS support (once)

sudo apt update
sudo apt install ntfs-3g

2. Samba setup

Edit config

sudo nano /etc/samba/smb.conf

Add this

[share]
   path = /home/dietpi
   browseable = yes
   read only = no
   guest ok = no
   valid users = dietpi
   force user = dietpi

Apply

sudo systemctl restart smbd

Add user

sudo smbpasswd -a dietpi

3. Fix permissions (once)

sudo chown -R dietpi:dietpi /home/dietpi
sudo chmod -R 775 /home/dietpi

4. Create USB mount point

sudo mkdir -p /mnt/usb

5. Find USB device

lsblk

Examples:

sdb      30G
└─sdb1   30G     → use /dev/sdb1
sda      232G
├─sda1   16M
└─sda2   232G    → use /dev/sda2

👉 always use the largest partition


6. Test mount (manual)

sudo mount -t ntfs-3g -o uid=1000,gid=1000 /dev/sdXn /mnt/usb

Check:

df -h | grep /mnt/usb

7. Auto-mount on boot

Edit

sudo nano /etc/fstab

Add

/dev/sdXn /mnt/usb ntfs-3g uid=1000,gid=1000,remove_hiberfile,nofail 0 0

Apply

sudo systemctl daemon-reload
sudo mount -a

8. If USB becomes read-only

sudo ntfsfix /dev/sdXn

If still locked:

sudo umount /mnt/usb
sudo mount -t ntfs-3g -o uid=1000,gid=1000,remove_hiberfile /dev/sdXn /mnt/usb

9. Connect from Windows

Open Explorer:

\\192.168.1.48\share

Login:

192.168.1.48\dietpi

10. What happens now

  • Boot → USB auto-mounts at /mnt/usb
  • Samba → always available
  • Windows → access via network path

11. Simple usage flow

  1. Plug USB
  2. Reboot (or mount -a)
  3. Access from Windows

Done

This is the full working setup.

UUID version

Step 1 - Find the USB partition UUID

lsblk -f

Look for the USB partition, for example:

sda
├─sda1
└─sda2  ntfs  8E2A7E432A7E287B

In this example, the USB partition is:

/dev/sda2

and the UUID is:

8E2A7E432A7E287B

You can also confirm it with:

blkid /dev/sda2

Step 2 - Add the UUID mount entry to /etc/fstab

Open /etc/fstab:

sudo nano /etc/fstab

Add this line:

UUID=8E2A7E432A7E287B /mnt/usb ntfs-3g defaults,nofail,noatime,rw,uid=1000,gid=1000,umask=0022 0 0

The fstab line depends mainly on the filesystem type.

For NTFS:

UUID=YOUR-NTFS-UUID /mnt/usb ntfs-3g defaults,nofail,noatime,rw,uid=1000,gid=1000,umask=0022 0 0

For ext4:

UUID=YOUR-EXT4-UUID /mnt/usb2 ext4 defaults,nofail,noatime,rw 0 2

Main difference:

ntfs-3g  = for NTFS drives, usually Windows-compatible USB drives
ext4     = for Linux-native drives

The uid=1000,gid=1000,umask=0022 part is mostly needed for NTFS/FAT/exFAT because those filesystems do not store Linux ownership/permissions the same way ext4 does.

For ext4, permissions are stored on the disk itself, so after mounting you may need to set ownership once:

sudo chown -R dietpi:dietpi /mnt/usb2

or, if your user is not dietpi:

whoami
id

Then use the correct user/group.

Make sure the mount folder exists:

sudo mkdir -p /mnt/usb

Test without rebooting:

sudo mount -a
df -h


Blog 9: About_Complaining.md | (Open) | (Share)

▲ Previous | Next ▼

/4Blog

(Last modified: March 27 2026 21:45:59)

About complaining

Many cultural and philosophical traditions explicitly address the idea that complaining harms not only the complainer, but also the listener. Here are the main approaches.

Stoicism (Ancient Greece and Rome)
Stoics viewed constant complaint as a failure of self-governance. Marcus Aurelius warned that voicing unnecessary grievances spreads disturbance to others. Complaining transfers inner disorder outward - the listener becomes burdened with emotions they did not choose. Epictetus emphasized restraint in speech for this reason.

Buddhism
In Buddhism, complaining is a form of dukkha amplification. Speech that fixates on dissatisfaction strengthens suffering and transmits it. The concept of Right Speech explicitly discourages speech that is unhelpful, burdensome, or emotionally contagious. The listener absorbs the mental state of the speaker.

Confucianism
Confucian ethics stress social harmony. Complaining disrupts relational balance (he). Excessive grievance is seen as a failure of self-cultivation because it imposes private unrest onto the social sphere, forcing others into emotional labor.

Christian thought (especially monastic traditions)
Complaining (murmuring) is treated as spiritually corrosive. The Rule of Saint Benedict explicitly condemns murmuring because it poisons the community, not just the speaker. It erodes peace by spreading discontent to those who hear it.

Existential and modern philosophy
Thinkers like Kierkegaard and later existentialists treated habitual complaint as avoidance of responsibility. By voicing grievance without action, the complainer shifts emotional weight onto others, making them witnesses to inauthenticity.

Modern psychology (for context, not philosophy)
Research on emotional contagion shows that repeated negative expression elevates stress and lowers mood in listeners. This aligns closely with the older philosophical positions: complaining externalizes internal dysregulation.

Common thread across traditions
Complaining is seen as:

  • Exporting inner disorder
  • Forcing unpaid emotional labor onto listeners
  • Weakening communal trust and calm
  • Reinforcing suffering rather than resolving it

Many traditions distinguish constructive expression (seeking solutions, asking for help) from habitual complaint, which exists primarily to discharge emotion onto others.



Blog 10: Electron.md | (Open) | (Share)

▲ Previous

/

(Last modified: March 11 2026 01:20:37)

Electron

I wonder if you have tested the performance of the client before you choose to let this Baazipoker software to be your new platform.
I now wonder how much influence and chance you have at all, to repair this horrible CPU and GPU eating performance.
Is there any part of your software on github? Here are some thoughts:

A poker table UI is actually one of the simplest graphical applications possible.

Yet with Electron it becomes:

Chromium

  • CSS engine
  • JS runtime
  • GPU compositor
  • framework layers

Which is why a modern poker client can require more CPU than a 3D game.

The most probable technical issue is:
multiple Electron renderer processes + continuous animation loops

4 tables =4 Chromium renderers.
Each renderer runs:

its own JS engine (V8)
layout engine
rendering pipeline
event loop

That alone can push CPU usage high.

Even a simple Electron window often consumes:
200–400 MB RAM and noticeable CPU.

Now imagine:
main window

  • lobby
  • multiple tables

Each may be its own renderer.

Possible fixes

  1. Single renderer window
    Do not open a BrowserWindow per table.
    Use one window and render all tables inside it.

  2. Event-driven rendering
    Remove constant requestAnimationFrame loops.
    Update UI only when something changes (card dealt, timer tick, bet).

  3. Shared render loop
    If animations are needed, run one global loop, not one per table.

  4. Use Canvas/WebGL instead of heavy DOM
    Rendering cards/chips via DOM + CSS is expensive.
    Canvas or WebGL scales far better.

  5. Throttle FPS
    Poker tables do not need 60 FPS.
    Limit rendering to something like 10–20 FPS.

  6. Avoid polling loops
    Use server events (WebSocket) instead of constant polling.


In short:

One Electron renderer + event-driven UI + shared rendering pipeline.

That alone could reduce CPU usage dramatically even without changing the tech stack.

Good luck


Who I am

"Just me, myself, and I, exploring the universe of unknownment, embracing the mystery of what lies beyond, one star at a time."

Share this page on Facebook | X.com | Reddit

Page Content

  • Image YouCut 20260330 110709853
    Published: 2026-07-25
    Read
  • Image Useful USB disk monitoring
    Published: 2026-05-18
    Read
  • Image DietPI NAS
    Published: 2026-05-03
    Read
  • Image About Complaining
    Published: 2026-03-27
    Read
  • Image Electron
    Published: 2026-03-11
    Read

Tags

WebDev New York London AI NORWAY DIY Ideas Life Family News Clothing Invest Sports Health