28 August 2025

Can not Print Documents from MS OneDrive on MacBooks to Sharp Printers

(On the screen of the physical printer, enable 'MS OneDrive'.)

On user's MacBook. Open a document from MS OneDrive. File > Print.

'More Settings' > 'Printe using system dialog' > 'Printer Options' > 'Job Handling' > 'Authentication' > 'User Number'. Re-enter your password. (Password for cloud and password for local are different)

'More Settings' > 'Print Using System Dialog' > 'Presets'. Choose 'SharpBP70C45 1'. 'Save Current Settings as Preset...'.

... 'Presets' > 'Edit Preset List...'. Select 'SharpBP70C45' > '-' > 'OK'.

27 August 2025

Can not print black and white on MacBook to Sharp BP-70C45 multi-function printer

Normally, in 'Printer Options', there are 6 options, including 'Image Quality'. In 'Image Quality', there are 3 options - 'Automatic', 'Colour', and 'Black and White'.

If there are only 2 options (or fewer than 6 options) in 'Printer Options', and there is not 'Image Quality' option, 

Choose Apple menu > System Settings, then click Printers & Scanners in the sidebar. (You may have to scroll down.)

Click the printer in the Printers list on the right, click the Options & Supplies button, select (or de-select) the Use Generic Printer Features checkbox, then click OK.

23 August 2025

How to re-map keys on Ubuntu?


1.
https://github.com/sezanzeb/input-remapper

 2.

Using Gnome Tweaks
  1. Install Gnome Tweaks: Open a terminal (Ctrl+Alt+T) and run:
    bash
    sudo apt install gnome-tweaks
    
    Use code with caution.
  2. Open Tweaks: Search for "Tweaks" in the Activities overview and open the application.
  3. Navigate to Keyboard & Mouse: In the sidebar, select Keyboard & Mouse.
  4. Access Additional Options: Click on Additional Layout Options.
  5. Remap Keys: Explore options like "Caps Lock behavior" or "Ctrl position" to make predefined common remaps (e.g., swapping Left Win with Left Ctrl).

05 March 2025

How To Search And Replace String Across Multiple Files in Vim

https://irian.to/blogs/how-to-search-and-replace-string-across-multiple-files-in-vim

 

Perform substitution with macros and repeat it

While recording a macro, perform substitution on one file, and repeat the macros across all args.

Assuming the same folder structure and args, here is how it is done:

qq                                          // start macro in q register
%s/stringToBeReplaced/replacementString/ge  // the e flag tells vim to not throw an error if there is no match
:wnext                                      //important. This is similar to `:next`, but it also writes the current file
q                                           // stop macro
999@q                                       //repeat this macros either 999 times or to remaining files.

That's it!