Showing posts with label how to. Show all posts
Showing posts with label how to. Show all posts

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?

On exchange server 2010, Exchange Management Console, mailbox > 'new mailbox' > 'room mailbox' > 'new user' 

On active directory, you will see the new room mailbox, disabled. Enable it. Create a password.


On EMC, 'distribution group' > 'new distribution group', create groups to be given (author, edit, review) permission to the new room mailbox.

Add users to each distribution group.

Log on any computer with the new room user. Open MS Outlook > new room mailbox calendar, grant each group permission to the new room mailbox calendar. (After a user is migrated to Office 365, we then can not add remote user to room calendars)

23 May 2022

How to delete all the lines which contain a pattern in vim?

https://vim.fandom.com/wiki/Delete_all_lines_containing_a_pattern



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

22 May 2022

How to pass args to a Python program when running it?

To learn how, find the Python Doc/howto/ directory and open the file 'argparse.rst', e.g. 

~/Downloads/Python-3.10.0/Doc/howto/argparse.rst