Skip to content

Instantly share code, notes, and snippets.

View vyach-vasiliev's full-sized avatar

ฬะทçะรโลนร vyach-vasiliev

  • Milky Way galaxy, planet Earth
View GitHub Profile
@vyach-vasiliev
vyach-vasiliev / Extensions that make IDE from VSCode.md
Last active April 12, 2025 13:02
Cheatsheets bw VSCode and IntelliJIDEA
@vyach-vasiliev
vyach-vasiliev / Download video from post of VK (bookmarklet).md
Last active April 4, 2025 20:32
Download video from post of VK (bookmarklet)

🔥 Download video from post of VK (bookmarklet)

How to install

It's really easy!

  1. Press ctrl+B (or cmd+B on Mac).
  2. Move this link Download video from VK to the bookmarks bar.
  3. Then, right click on the new bookmark, click Edit and paste the script contents above into the URL field.
  4. Now, open the page with the video and click on the new bookmark.
  5. Wait for the request to select the quality for downloading, enter it and press Enter.

✨ The download will start. Enjoy! ✨

@vyach-vasiliev
vyach-vasiliev / Download video from post of OK (bookmarklet).md
Last active April 4, 2025 20:33
Download video from post of OK.ru (bookmarklet)

🔥 Download video from post of OK (bookmarklet)

How to install

It's really easy!

  1. Press ctrl+B (or cmd+B on Mac).
  2. Move this link Download video from OK to the bookmarks bar.
  3. Then, right click on the new bookmark, click Edit and paste the script contents above into the URL field.
  4. Now, open the page with the video and click on the new bookmark.
  5. Wait for the request to select the quality for downloading, enter it and press Enter.

✨ The download will start. Enjoy! ✨

@vyach-vasiliev
vyach-vasiliev / Download video from post of Boosty (bookmarklet).md
Last active April 4, 2025 20:32
Download video from post of Boosty (bookmarklet)

🔥 Download video from post of Boosty (bookmarklet)

How to install

It's really easy!

  1. Press ctrl+B (or cmd+B on Mac).
  2. Move this link Download video from Boosty to the bookmarks bar.
  3. Then, right click on the new bookmark, click Edit and paste the script contents above into the URL field.
  4. Now, open the page with the video and click on the new bookmark.
  5. Wait for the request to select the quality for downloading, enter it and press Enter.

✨ The download will start. Enjoy! ✨

@vyach-vasiliev
vyach-vasiliev / how_to_fix_dual_chrome_on_hyperos.md
Last active March 24, 2025 20:01
How to fix open links to Dual/Cloned Chrome app in Xiaomi and HyperOS?

Reason and description of the problem 😳

After switching to Hyper OS (POCO, XIAOMI, etc. phones), Google Chrome stopped opening in the main account when clicking on web-links from other applications (for example, telegram, whatsapp etc.).

Instead, Google Chrome opens links in the account for cloned applications
(even if the Chrome of the main account is selected by default in the system).

Empty hope 💔

The adb command removes the cloned application, but after rebooting the system, chrome clone was quietly reinstalled 😨.
The phone must be connected to the computer via USB and debugging mode must be enabled in the developer options.

@vyach-vasiliev
vyach-vasiliev / fix_wireguard_policy.md
Created December 23, 2024 07:19
Error of WireGuard Client (Scripts: disabled, per policy/Скрипты: отключено, по политике)

Fix for running scripts (ex. PostUp, PostDown) in WireGuard Client for Windows OS 10 and above.

reg add HKLM\Software\WireGuard /v DangerousScriptExecution /t REG_DWORD /d 1 /f
@vyach-vasiliev
vyach-vasiliev / wg0.conf
Created December 22, 2024 14:00
Wireguard Example Config with Excluded IPs for WinOS
[Interface]
PrivateKey = ...
Address = 10.8.1.3/32
DNS = 1.1.1.1
PostUp = powershell -command 'New-NetRoute -DestinationPrefix "<excluded ip>/32" -NextHop "192.168.0.1"'
PostDown = powershell -command 'Remove-NetRoute -DestinationPrefix "<excluded ip>/32"'
[Peer]
PublicKey = ...
PresharedKey = ...
@vyach-vasiliev
vyach-vasiliev / fix_wsl2_internet.md
Created December 12, 2024 20:57
WSL 2 Internet connection doesn't work until I connect to VPN

Author: @wushangwei
Source: microsoft/WSL#5784 (comment)

I once had the opposite problem: WSL2 lost internet connection when connected to WIreGuard VPN.

I solved the problem by editing the "AllowedIPs“ field of WireGuard conf:

[Interface]
PrivateKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@vyach-vasiliev
vyach-vasiliev / _set_google_chrom_as_default_browser.md
Last active October 30, 2024 20:23
How to REset Google Chrom by default browser in Windows OS?

RE-SET Chrome as your default browser on Windows OS

Yeah and without reinstall.

image

  1. Download new Google Chrome EXE-file from official site: https://www.google.com/chrome/
  2. Open the Terminal (or Command Line) via the context menu where the downloaded file (like chome.exe) is located.
  3. Copy and paste this command into terminal and press Enter
ChromeSetup.exe --force-fre-default-browser-step --make-chrome-default --make-default-browser

Counting score of the latest -N reviews on OZON.ru

// upd 26/10/2024
let userScores = Array.from(document.querySelectorAll('div[data-widget="webListReviews"] div'))
  .map(div => Array.from(div.children).filter(child => child.tagName === 'svg' && child.style.color === 'rgb(255, 168, 0)').length)
  .filter(score => score > 0)
  .slice(0, 10); // Get the first 10 scores

const totalScore = Math.max(1, Math.min(userScores.reduce((acc, score) => acc + score, 0) / userScores.length, 5));