Skip to content

ginow/public-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

public-notes

  • 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);

vscode settings.json Preferences

  • Cursor blinking phase
  • Editor: Cursor Smooth Caret Animation on
  • Editor › Sticky Scroll: Enabled
{
    "window.zoomLevel": 1,
    "editor.formatOnSave": true,
    // Command Prompt
    // "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
    // Git Bash
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "vim.insertModeKeyBindings": [
        {
            "before": [
                "k",
                "j"
            ],
            "after": [
                "<Esc>"
            ]
        }
    ],
    "vim.useSystemClipboard": true,
    // Paste image directly into markdown:
     "markdown.copyFiles.destination": {
        "**/*": "${documentWorkspaceFolder}/assets/"
    }
}
  • Vim .vimrc setting
inoremap kj <Esc>
set number
colo torte
syntax on
set clipboard=unnamed
  • Toggle maximized panel: Ctrl + Alt + T
  • Toggle terminal: Ctrl + `

VS Code vim shortcuts

gd go to definition Ctrl+O go back to previous view

VS Code shortcuts

Toggle Sidebar

Ctrl+B

Sidebar Focus

Shift+Ctrl+E

Fold unfold

Ctrl+Shift+[

Ctrl+Shift+L - Select all occurrences and edit

Official List of all commands

Open/View

Open Command Pallete

Shift+Ctrl+P

Access Settings

Ctrl+,

Toggle Terminal

Ctrl+`

Create New Terminal

Shift+Ctrl+`

Open New Window/Instance

Shift+Ctrl+N

Close Window

Ctrl+W

Working With Files

Open File/Folder From Sidebar

Ctrl+Down

Change File Tabs

Ctrl+PageUP

Quick File Open

Ctrl+P

Open File From Explorer

Ctrl+O

Save As

Shift+Ctrl+S

Close File

Ctrl+W

Delete File

Ctrl+Delete

Reopen Files

Shift+Ctrl+T

Spilt Editor

Ctrl+\

Code Editing

Go To Start & End Of Line

Ctrl+Right
Ctrl+Left

Move By Word

Alt+Right
Alt+Left

Go To Start & End Of File

Ctrl+Home
Ctrl+End

Cut, Copy & Past Line

Ctrl+X # Cut
Ctrl+C # Copy
Ctrl+V # Paste

Move Line Up & Down

Alt+Up
Alt+Down

Copy Line Up & Down

Shift+Alt+Up
Shift+Alt+Down

Remove Line

Shift+Ctrl+K

Insert Line

Ctrl+Enter # Insert below
Shift+Ctrl+Enter # Insert above

Jump To Matching Bracket

Shift+Ctrl+\

Add Line Comment

Ctrl+/

Add Block Comment

Shift+Alt+A

Select Next Match

Ctrl+D

De-select Match

Ctrl+U

Add Cursor

Alt+Click

Go to Entity (Functions, vars, etc)

Ctrl+Shift+O
  • Browser URL or filepath string: Ctrl+L

  • VScode zoom: Ctrl++ and Ctrl+-

  • To disable vim in vscode: F1 or Ctrl + Shift + P, Toggle vim mode

  • Move window: Win key + Arrow key

  • Windows shutdown for linux

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

No packages published

Languages