Skip to content

ginow/public-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

public-notes

  • Check NVIDIA GPU Utilisation in Debian

    nvidia-smi
  • Run any app using NVIDIA

    prime-run blender
  • If unable to do git clone on mounted drives then do:

    sudo umount /mnt/new_volume
    lsblk
    sudo mount -o rw,uid=1000,gid=1000,dmask=0022,fmask=0133 /dev/sdb1 /mnt/new_volume

    Note that lsblk is to find out the name "sdb1"

  • PDF compress command, using ghostscript command

    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
     -dPDFSETTINGS=/screen \
     -dDownsampleColorImages=true \
     -dColorImageDownsampleType=/Bicubic \
     -dColorImageResolution=130 \
     -dDownsampleGrayImages=true \
     -dGrayImageDownsampleType=/Bicubic \
     -dGrayImageResolution=130 \
     -dDownsampleMonoImages=true \
     -dMonoImageDownsampleType=/Subsample \
     -dMonoImageResolution=130 \
     -dNOPAUSE -dBATCH -dQUIET \
     -sOutputFile=output.pdf input.pdf
  • To search a file name in cmd

dir/s *filename*
  • To search string in all files, filename, dir name
findstr /I /S stringtosearchhere * > outputfiletostoreresult.txt
Get-ChildItem -Recurse | Select-String -Pattern stringtosearchhere
// Get all <a> elements within the playlist
var playlistItems = document.querySelectorAll('#items a');

// Array to store URLs
var urls = [];

// Iterate over each <a> element
playlistItems.forEach(function(item) {
    // Check if the href attribute exists and starts with "/watch"
    var href = item.getAttribute('href');
    if (href && href.startsWith && href.startsWith('/watch')) {
        // Add the URL to the array
        href=`python C:\Users\user\youtube-dl -x --audio-format mp3 --ignore-errors "https://www.youtube.com${href}"`;
        urls.push(href);
    }
});

// Convert the array of URLs to a string
var urlsText = urls.join('\n');

// Create a Blob containing the URLs
var blob = new Blob([urlsText], { type: 'text/plain' });

// Create a temporary URL to download the Blob
var url = URL.createObjectURL(blob);

// Create a link element to trigger the download
var link = document.createElement('a');
link.href = url;
link.download = 'playlist_urls.txt';

// Append the link to the document body and trigger the download
document.body.appendChild(link);
link.click();

// Cleanup: remove the link and revoke the Blob URL
document.body.removeChild(link);
URL.revokeObjectURL(url);
shutdown /s /t 0
  • To get playlist names in youtube
Not working:
 youtube-dl -o '%(playlist_index)s - %(title)s.%(ext)s' <url or id here> --get-filename

Working:
Only to get file name:
 youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" PL6n9fhu94yhUbctIoxoVTrklN3LMwTCmd --get-filename
To download videos with number prefixed:
 youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" PL6n9fhu94yhUbctIoxoVTrklN3LMwTCmd

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages