- Prep the initial multiline by for instance adding padding (e.g. on the right side of numbers)
- Select the multiline text you would like to copy
- Go to the first line
- Enter visual block mode (Ctrl + v or q)
- Move to the last line
- Go to the end of the line (Shift + 4)
- Cut it (d)
- Paste the initial multiline text to target multiline text
Find non-empty folders containing Games in their name, print their amount of children and sort the output by number
find -type d -name "*Games*" -not -empty
This part of the command uses the find command to search for directories (-type d) that have "Games" in their name (-name "Games") and are not empty (-not -empty). The find command prints the path of each matching directory to the standard output.
-exec sh -c 'echo "{}: $(expr $(ls -l "{}" | wc -l) - 1)"' \;
This part of the command uses the -exec option of the find command to execute another command on each matching directory. The command to execute is enclosed in single quotes and has a placeholder {} for the directory name. The command ends with a semicolon, which is escaped with a backslash to prevent the shell from interpreting it.
Quickly and easily startup a VirtualBox / VMware VM without having to download and install it manually from an ISO file.
If you don’t want to install secondary OS alongside with your main OS but still want to use/try it, then you can use VirtualBox or VMware on your host operating system to run virtual machine.
- Download an image you're interested in
- Unzip it
| import time | |
| import webbrowser | |
| delay = 0.2 | |
| incognito_mode = True | |
| input_filename = 'input.txt' # <- any URLs separated by `\n` | |
| browser_path = 'C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe %s' + (' --incognito' if incognito_mode else '') | |
Find all Dockerfile.node files and do diff / wdiff between each file and 0http/.Dockerfile.node file
#!/bin/bash
# clordiff
find ../ -name "*Dockerfile.node*" -exec colordiff ../0http/.Dockerfile.node {} \;
# wdiff
find ../ -name "*Dockerfile.node*" -exec sh -c 'wdiff ../0http/.Dockerfile.node "{}" | colordiff' \;