I had a problem with a VM image I created with Gnome boxes. It had SELinux enabled. I was able to get around it by taking out this line in the XML. You can do this in VirtManager. It was the last entry </video> <redirdev bus=”usb” type=”spicevmc”> <address type=”usb” bus=”0″ port=”3″/> </redirdev> <redirdev bus=”usb” type=”spicevmc”> <address type=”usb” bus=”0″ port=”4″/> […]
VirtManager/KVM – Security Driver Module not available.
FreeBSD – repository contains packages for wrong OS version
Not sure why this happens, but I think it is a change of the upstream repository run “pkg update” since you are likely down-level – set the IGNORE_OSVERSION=yes select Y for ignore mismatch. root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg search pico pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:12:amd64 root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg -v 1.20.8 root@freebsd12_3:/home/jon2allen/test27/weather_obs # pkg update Updating FreeBSD repository […]
Bing Chat – use a class as a template prompt
Here is my now goto prompt for when I am working on a project – have a class that I need to mimic the interfaces. use the following class as a template. Call the new class “MainframeExcelText” The init take file and sheet and sets row and column location to 0. 1 function – write_text will take a row,col and […]
ChatGPT prompt for in depth language learning – Chinese/Mandarin
Here is sample of a prompt that gave results that impressed me. Prompt: can you define 漫长 in English and give possible meaning by likely occurrence in Chinese text. The term “漫长” (màncháng) in Chinese can be defined in English as “lengthy,” “protracted,” or “prolonged.” It describes something that is enduring or lasting for a long time. Here are some […]
How to display Chinese characters in Matplotlib with Windows/Jupyter
I asked ChatGPT to generate a sample list of Tang Dynasty Poets from the book of 300 poems. It gave me this – it had some duplicates and one Song Dynasty poet in it. import pandas as pd data = [ {“English Name”: “Li Bai”, “Chinese Name”: “李白”, “Dates”: “701-762”}, {“English Name”: “Du Fu”, “Chinese Name”: “杜甫”, “Dates”: “712-770”}, {“English […]
Using Bing Chat to generate json file for fixed data.
I asked Bing to create a JSON data for O’day sailboats This is a great use case to generate fixed data in way you want it for your app. Save lots of times searching and typing. create a json file for Oday’s sailboats, data to include – length overall, sailarea, make and model Bing did a search and fed […]
ChatGPT – creating a C++ file search with csv output
I first started with Python and that worked well. I then did a perl version. That went well. So, I thought – why not go for the jugular – write a c++ one. I call it file_audit – save a csv formatted file so I can review and sort by date to see what I need to save or delete. […]
FreeBSD – increasing size of root disk with KVM/QEMU
Here is how to to increase the size of the disk for FreeBSD. I am using FreeBSD 12.3 here running inside a Fedora Linux. Here are some starting requirements One needs to have qcow2 type disk. the virtual machine must be shutdown No snapshots against the virtual machine So, I cloned out the machine to test: [jon2allen@fedora Downloads]$ ll freebsd*.qcow2 […]
Find command – listing last modify path with full dir
Some examples of this command from Linux Debian and FreeBSD Here is how to do this with GNU Linux – %p gives full path name user1@f1-google-joniowa:~$ find . -name “weather_obs.log” -printf “%p\t%TY-%Tm-%Td\n” ./test27/weather_obs/weather_obs.log 2023-05-16 ./test26/weather_obs/weather_obs.log 2022-12-08 ./test28/weather_obs/weather_obs.log 2023-02-28 ./test25/weather_obs/weather_obs.log 2022-08-18 ./python/weather_obs/weather_obs.log 2021-05-24 ./test24/weather_obs/weather_obs.log 2022-11-22 Here is a bsd version – uses exec [user1@freebsd12_3 ~]$ find . -name […]
finding files and using tar for backup.
The most common solution is to use find with xargs to backup Something like this: find /var/www/html/ -type f -name my*.csv -print0 | xargs -0 tar cfvzP /backupdir/backupfile The more files you have, especially over 1000 – this will produce weird results. Number of files in the archive doesn’t match the output of the find xargs will split the input […]