devops

Copy a Visio drawing

Copy a Visio drawing to Word, PowerPoint, or Excel [https://support.microsoft.com/en-us/office/copy-a-visio-drawing-to-word-powerpoint-or-excel-e301fef0-27cf-4540-9f91-901a824074ee]

  1. In Visio, open the file you want to appear in the Word document.

  2. Make sure nothing is selected, and then, on the Home tab, select Copy or press Ctrl+C

  3. paste

In Word, select where you want the Visio drawing to appear and then select Paste or press Ctrl+V

In PowerPoint or Excel, On the Home tab, select Paste > Paste Special, and then select Microsoft Visio Drawing Object

LSF (Platform Load Sharing Facility)

bjobs: Displaying Job Status

bkill: cancels pending batch jobs and sends signals to running jobs

bhosts: displays hosts and their static and dynamic resources

busers: displays information about the user who runs the command

Module System

module avail: Lists the modules currently available to load on the system

module list: Lists the modules currently loaded in the user environment.

module load|add: This loads the requested module into the active environment

module purge: To clear all modules

module rm|unload: To unload a module

module switch|swap: To change the version of a loaded software module

unlock "secured" (read-protected) PDF

1
2
3
4
5
6
7
8
# Source - https://stackoverflow.com/a/63422342
# Posted by Satish Dubey, modified by community. See post 'Timeline' for change history
# Retrieved 2026-01-05, License - CC BY-SA 4.0

import pikepdf

pdf = pikepdf.open('filepath', allow_overwriting_input=True)
pdf.save('filepath')

MATLAB Win10 Unable to open the requested feature. Error code: -202

clear AppData\Roaming\MathWorks\MATLAB

miniconda3/envs/myenv/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found

[https://stackoverflow.com/a/73101774/8037585]

This is because you have some old versions not cleaned up while upgrading gcc.

First of all, make sure that you have the latest lib with conda install -c conda-forge libstdcxx-ng

OBS 无声录制带有声音的视频

录制视频时,想要 obs 能录制声音,但是不想人耳听到。

pactl load-module module-virtual-sink sink_name=VAC

unfortunately, Virtual audio sinks & settings gone after reboot

image-20250726071525899

image-20250726071325895


obs 无声录制带有声音的视频 [https://www.cnblogs.com/wztshine/p/17764073.html]

Virtual Audio Cable For Ubuntu [https://askubuntu.com/a/1268269/845522]

能不能设置个定时器,让录像自动停? [https://www.reddit.com/r/obs/comments/j5j1qa/comment/g7sk588/]

wget fetch a directory

1
$ wget -r -np -R "index.html*" http://example.com/configs/.vim/

Using wget to recursively fetch a directory with arbitrary files in it [https://stackoverflow.com/a/273776/8037585]

mount/umount ISO

1
2
$ sudo mount -t auto -o loop /path/to/matlab.iso /mnt/matlab
$ umount /mnt/iso

Google search tips

[https://static.googleusercontent.com/media/www.google.com/en//educators/downloads/Tips_Tricks_17x22.pdf]

image-20250706091436326

image-20250706091838077

Restart Xfce panel

1
xfce4-panel -r

[https://askubuntu.com/a/891209]

Rocky Linux 8 rpm for cadence binary and cdnshelp

qt5 and openssl

1
sudo yum install openssl compat-openssl10 qca-qt5-ossl.x86_64 openssl-devel

library preparation for EDA installation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
libc6, gdb
dc
libncurses5-dev
libncurses5-dev:i386
g++
pstack
libelf1:i386
libgcc-4.8-dev:i386
libstdc++6:i386
gcc-multilib
g++-multilib
libc6-dbg
libc6-dbg:i386
libexpat-dev
libexpat-dev:i386libxss-dev
libxpm4
libxpm4:i386
libmng2
libxss-dev:i386
libxft2
libxft2:i386
libxmu6
libxmu6:i386
libjpeg62-dev
libjpeg62-dev:i386
gnome-core
gnome-core:i386
xfce4
libxml2:i386
libxml2, libXft-dev
libXft-dev:i386
libSM
libSM:i386
libpng3
libpng3:i386
libxi6
libxi6:i386
glibc.i686
libX11.i686
libX11-devel.i686
libX11-devel.x86_64
gcc-c++
compat-readline5
libXext.i686
libXtst.i686
redhat-lsb.i686
libXrender.i686
glibc-devel.i686
zlib.i686
ncompress.x86_64
ksh
openmotif22.i686
openmotif22.x86_64
xterm

Rocky Linux 8 extend LVM in VMware

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
1) gparted extend
2)
lvextend -l +100%FREE /dev/rl/root
3)
xfs_growfs /dev/mapper/rl-root

usefull command:
df -h
lvdisplay
fdisk -l

-----------------------------------------------------------
https://pocketadmin.tech/en/centos-8-extend-lvm/

$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/rl/swap
LV Name swap
VG Name rl
LV UUID toZKEu-P5oV-6WOV-026Z-eFnI-xaSP-FgEbz5
LV Write Access read/write
LV Creation host, time myserver, 2021-12-03 21:28:03 +0800
LV Status available
# open 2
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1

--- Logical volume ---
LV Path /dev/rl/root
LV Name root
VG Name rl
LV UUID S2soRE-umc7-Z6b3-i44x-TiBO-ulnk-ETgEoj
LV Write Access read/write
LV Creation host, time myserver, 2021-12-03 21:28:03 +0800
LV Status available
# open 1
LV Size <194.00 GiB
Current LE 49663
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0

compile vim from source with GUI support

1
2
3
4
# gtk3 in Rocky Linux 8.5
./configure --with-features=huge --enable-gui=gtk3 --enable-python3interp --prefix=/usr
make -j`nproc`
sudo make install

binkey

Inserting a new line below: o

above: O

To insert before the cursor: i

After: a

Before the line (home): I

Append at the end of line: A

network connection using nmcli

Problem

There is no network connection and device is not managed

1
2
3
4
$ nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet unmanaged --
lo loopback unmanaged --

image-20220401011509900

solution

1
sudo nmcli networking on

Then, eth0 is connected

1
2
3
4
$ nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Ethernet connection 1
lo loopback unmanaged --

image-20220401011543866

What is the proper method to remove old kernels from a Red Hat Enterprise Linux system?

Red Hat Enterprise Linux 8

The YUM version 4 (based on the upstream DNF project) method for removing kernels and keeping only the latest version and running kernel:

1
$ yum remove --oldinstallonly

From the yum man page:

1
2
3
dnf [options] remove --oldinstallonly
Removes old installonly packages, keeping only latest versions and version of running
kernel.

New windows and forms appear behind the Library Manager in background when using GNOME 3

Using Red Hat Enterprise Linux 8, Rocky Linux 8 and the GNOME 3 window manager, the new Virtuoso Schematic/Layout/ADE windows and forms sometimes pop up under or below the Library Manager or on the desktop in the background instead of the foreground and cannot be seen. Sometimes, they are iconized; they do not come on the top in front, though it is the most recent window opened.

solution

Install Focus my window GNOME Shell extension

image-20221022002952578

reference

Article (11612426) Title: New windows and forms appear behind the Library Manager in background or iconized instead of foreground on RHEL and SuSE Linux in GNOME, KDE Desktop, Metacity window manager

VMware Disk Shrink

In Guest OS and run

1
sudo vmware-toolbox-cmd disk shrink /

https://superuser.com/q/211798

GitHub Pages Build and deployment

The repository visibility shall be public

image-20230701142405404

squash all git commits into one?

https://stackoverflow.com/a/9254257/8037585

As of git 1.6.2, you can use git rebase --root -i

For each commit except the first, change pick to squash.

this works find, but I had to do a forced push. be careful! git push -f

Build VMware host modules

1
2
3
4
5
6
7
8
git clone git@github.com:mkubecek/vmware-host-modules.git
cd vmware-host-modules/
git checkout origin/workstation-17.0.2
make -j`nproc`
sudo make install
sudo modprobe -v vmmon
sudo modprobe -v vmnet
sudo vmware-networks --start

AWT-EventQueue-0 Matlab

1
Renaming libstdc++.so.6 to libstdc++.so.6old solved it for me in MATLAB 2021B UBUNTU 20.04. Thanks!

[https://www.mathworks.com/matlabcentral/answers/329796-issue-with-libstdc-so-6#comment_2316900]