02 April 2023
08 March 2023
How to install .deb files on Ubuntu?
https://linuxconfig.org/install-deb-file-on-ubuntu-22-04-jammy-jellyfish-linux
$ sudo dpkg -i example.deb
If the package requires dependencies that aren’t already on your system, you will see
this error in the terminal:
dpkg: error processing package
Don’t fret, because we can install the required dependencies with a single command,
assuming that they are available in Ubuntu’s package repository. Just run this command
to install the dependencies:
$ sudo apt install -f
05 July 2022
How to give author, editor, viewer permissions to room calendars?
23 May 2022
How to delete all the lines which contain a pattern in vim?
The ex command g is very useful for acting on lines that match a pattern. You can use it with the d command, to delete all lines that contain a particular pattern, or all lines that do not contain a pattern.
For example, to delete all lines containing "profile" (remove the /d to show the lines that the command will delete):
:g/profile/d
More complex patterns can be used, such as deleting all lines that are empty or that contain only whitespace:
:g/^\s*$/d
To delete all lines that do not contain a pattern, use g!, like this command to delete all lines that are not comment lines in a Vim script:
:g!/^\s*"/d
Note that g! is equivalent to v, so you could also do the above with:
:v/^\s*"/d
The next example shows use of \| ("or") to delete all lines except those that contain "error" or "warn" or "fail" (:help pattern):
:v/error\|warn\|fail/d