Wednesday, April 28, 2021

Cuda compute capability, compatibility

 https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/

Thursday, April 8, 2021

Copy/Extract HTML Dropdownlist Options in Plain Text

Source;  https://techbrij.com/copy-extract-html-drop-down-list-options-text

For Chrome:
Right Click on HTML Dropdownlist, Select Inspect Element and In Developer Tools, you will see html source is selected. Right click and click Copy as HTML option.

3. Paste HTML source in Notepad++
4. Remove Select tag from top and bottom if exists
5. Put cursor at top of code and Press Ctrl + F
6. Go to Replace Tab and enter following info:
Find What:
<option[^>]*>([^<]*)</option>
Replace With:
\1\n
Select Regular Expression as Search Mode and click on Replace All. If options are already in new line then no need to use \n in Replace With option.

Saturday, March 20, 2021

Wednesday, February 3, 2021

bash split single page in pdf

apt-get install mupdf-tools
 
mutool poster -y 2 input.pdf output.pdf 
 
For horizontal splits, replace y with x. And you can, of course, combine the two for more complex solutions.
Source: https://unix.stackexchange.com/questions/12482
 
 
 

Wednesday, December 2, 2020

Choice of partition for bootloader

 Taken integrally from https://askubuntu.com/questions/219514/where-to-install-bootloader-when-installing-ubuntu-as-secondary-os

Here's an example that could help you out:

Installation type

Under "Device for boot loader installation":

  • if you choose dev/sda, it will use Grub (Ubuntu's boot loader) to load all systems on this hard drive.
  • if you choose dev/sda1, Ubuntu need to be manually added to drive's boot loader after installation. (for example, you previously have Windows installed on another partition of this drive, you'll need manually add Ubuntu into mbr)

Thursday, September 24, 2020

bash - copy files from one directory into an existing directory

 Original post: https://stackoverflow.com/questions/3643848

 cp -R t1/. t2/

 The dot at the end tells it to copy the contents of the current directory, not the directory itself. This method also includes hidden files and folders.

 
If you copy a directory, cp will create a directory and copy all the files into it. If you use the pretend folder called ".", which is the same as the directory holding it, the copy behaves this way. Let's say t1 contains a file called "file". cp will perform the operation equivalent to "cp t1/./file t2/./". It is copying the folder ".", but copying files into t2's "." folder strips the "./" because "t2/./" is the same as "t2/". Technically, this means it's POSIX built in behavior... but probably not in the way you might have been expecting!

Monday, August 17, 2020

ubuntu unzip encrypted

 Source: https://stackoverflow.com/questions/42186512/

 In Ubuntu, I've to install 7zip (7z) archive tool using following command:

sudo apt-get install p7zip-full

Then, you can use Ubuntu's default Archive Manager to unzip the password protected zip files