Posts

The problem with Clonezilla ...

Image
 This is just a reminder, as I seem to stumble with the same rock every now and then. The problem is the keyboard configuration and the sometimes quick time window to perform a cloning operation. All of it leads me sometimes to a number of failed attempts until I got it right. The culprit? Having passwords that use symbols that are mapped to different keys depending on the keyboard language selected. And no, selecting the UI language has nothing to do with that.  So the common symptom is my host system no longer allows the connection to the SMB share I use to store the images to (or to retrieve them from). So I first worry about potential incompatibility of the SMB versions and authentication modes. Then I think there might be I am not remembering a not so often used password right. And, eventually, I realized that the password I am typing at the terminal that I cannot read as it is not echoed back most likely contain the wrong symbols as I did not choose the right keyboard (w...

Using PyMeshLab

Image
This document summarizes some of the usage of the pymeshlab library. Unfortunately, the library has been through severe changes over time, so some methods are renamed and filter calling conventions are shifting too, which makes AI and humans mad :-) Core Concepts The MeshSet The MeshSet is the primary container for handling multiple mesh layers and applying filters. ms = pymeshlab.MeshSet() Mesh Objects Individual meshes within a MeshSet . They contain the geometry and attribute data. mesh = ms.current_mesh() Basic Operations Loading and Saving # Load a new mesh into the MeshSet ms.load_new_mesh("input.stl") # Save the currently selected mesh ms.save_current_mesh("output.stl", colormode=False) Layer Management # Get total number of meshes in the MeshSet count = ms.mesh_number() # Select a specific mesh by index ms.set_current_mesh(1) # Delete the currently active mesh ms.delete_current_mesh() # Control visibility (often used for merging) ms.set_cu...

The Problem: Why Batch Files Fail

  I recently encountered an unusual error when trying to pass certain filenames to a Python app as inputs. After a moment, I realized the troubled ones had a comma in their filename, which should be totally valid, isn't it? It turns out Windows Batch ( cmd.exe ) is built on legacy rules where the comma ( , ) , semicolon ( ; ) , and equals sign ( = ) are treated as delimiters, exactly like a space . When you drag a file named Data,Project.txt onto a .bat file: Explorer sends the raw string to the command processor. CMD sees the comma and splits the filename into two arguments: %1 becomes  Data  and %2 becomes Project.txt . The comma is deleted from the stream entirely ( 🤦 ). The Solutions: From Hack to Hero Method The "Ugly Hack" (Batch) The "Robust" Way (Shortcut) The "Pro" Way (PyInstaller) Setup Create a .bat file with %* Right-click .py > Create Shortcut Compile script to a standalone .exe The Trick python script.py "%*" Edit ...

Remote KVM

Image
I usually have Linux server boxes with only power and network cables. That works well most of the time, except when: You need to install the operating system. You screw up and render the system unresponsive, even after a power cycle. Then you realize you need to move a keyboard, mouse and display to that machine to see what is going on, and hopefully fix it. Not a big deal if you are in the next room, not ideal if you are in another city or country.  So after watching Dave's video , I decided it was time to start using these devices for my own good. And I learned a couple of interesting things while reviewing the features: There is an optional add-on, called Fingerbot, that can be used to act on a push button, like the reset or power button of your server remotely. That way you can even power off a misbehaving server, or power it back on after powering it down. That is especially useful if Wake-On-LAN is not possible at the moment (most computers do not come with that enabled). The...

Browser-based Peer to Peer file transfer

Image
On your home LAN, it is easy to send files from one device to another, but when you are away from home, things get trickier. Of course, if you are visiting a friend's home, a USB drive can be a useful tool for transferring files, but what if no one is available to move them? It is not uncommon to have a bunch of media files to share after a trip with family or friends. You can share these on social media (this is what they want you to do). However, there are several reasons you might want to keep them private, so the next question is how to share them without using cloud services.  Email comes to mind, but there are usually limits on the maximum size allowed for messages, and you might overload some recipients' mailboxes to the point where they fail to receive some of the content. And if you are a bit worried about using cloud services, email also involves some Internet servers, too.  Some peer-to-peer file sharing apps exist, but they are typically designed to allow files to ...

AI killed the video star.

Image
In the latest months, I have found myself questioning more and more often the shorts that YouTube is dropping on my feed. The point is not why they are there; the point is whether they are "real". And it is because the pervasive use of AI in video creation is making me now doubt everything I see.  There is an old Arab saying:  "Believe what you see and lay aside what you hear." Whether the origin is right or not, I cannot say( * ).  But what is becoming evident is that the power of the video as "proof" of an event is becoming thinner and thinner every day. After all, Hollywood built an empire on the idea of filming stories, where the premise is to make you believe them. However, we expect news reports to accurately convey real events, not fictional narratives. YouTube, TikTok, and the like are more about keeping us hooked on whatever crap we are interested in. Whether it is a healthy diet, running, fixing your motorbike, woodworking, plumbing, ... you nam...

Dropbox and Antigravity?

Image
I was developing some software and using one folder in my Dropbox. At some point, I wanted to share the results with another person, so I shared that folder with him. After a while, I no longer needed to share that info, so I used Windows Explorer to stop sharing that folder. To my horror, I saw that most of the files in the folder had suddenly disappeared, and an error message appeared on the Dropbox taskbar icon.  As that folder was set to always remain on the hard drive, I did not understand why that was. But even worse, the operation deleted the latest source files from my disk! I panicked and ran to my laptop, disabled the wifi, and recovered the files from the laptop's SSD. Once I felt my code was secure, I returned to my desktop computer. The Dropbox error was a synchronization error, as a file that was opened could not be synchronized. I was viewing an STL file from that folder on MeshLab. Once I closed that app, Dropbox continued to function as normal, and I could see all ...