Saturday 29 October 2022

Download a youtube playlist

 Put ffmpeg.exe and yt-dlp (latest versions) to the folder where files to be downloaded.

The following command will download a playlist ${YOUR_PLAYLIST} in a subfolder with its reference name, enumerating the videos as they are ordered in the list, and assigning their names to the files. Numeration will start with 01 and with the oldest video. We need this to be able to keep the numeration later when we update the contents. The file archive.txt is needed to track the update and only download what hasn't been downloaded yet.

yt-dlp --format "bestvideo[height<=4k]+bestaudio/best" https://www.youtube.com/${YOUR_PLAYLIST} --embed-thumbnail --add-metadata --parse-metadata "description:(?s)(?P<webpage_url>.+)" --playlist-reverse --download-archive _archive --write-auto-sub --sub-langs "en,ru" -o "%%(playlist_index)s - %%(title)s - %%(id)s.%%(ext)s" --compat-option playlist-index


Wednesday 29 June 2022

Simple solution for ThinkPad TrackPoint drift

TL;DR: To get rid of the drift, replace your TrackPoint cap with a fresh one that really fits your laptop model. Get a pack of caps on Amazon or ebay (P/N 4XH0L55146 might be a fit). Even if you own a brand-new laptop and have never changed the red cap yourself, try changing it, as the manufacturer might have confused the parts or use the cap which are slightly misaligned.

I'm a heavy IBM/Lenovo ThinkPad-s user over a span of the last 15 years: T61, x120e, W520 2x, T430s, T460p, x1, and lastly – x1 Extreme. The only one which had a famous TrackPoint drift is x1 Extreme. I've been using it since September 2018 – almost 4 years by now, and though I really liked it, the drift made my experience vastly unfortunate. I've actually abandoned using TrackPoint, so painful this was. I've made many attempts to fix it (more on this later).

Thus, it was even more to my surprise that I've found a very simple solution to a TrackPoint drift problem.

Wednesday 4 August 2021

Downloading a GitHub pull request

 Adopted from here.

git clone --depth 1 git@github.com:org/repo.git
cd repo
git fetch origin branch_name:branch_name
git checkout branch_name

Saturday 9 May 2020

Favourite Visual Studio plugins

https://github.com/OpenCppCoverage/OpenCppCoveragePlugin
https://github.com/madskristensen/MarkdownEditor
https://github.com/vurdalakov/startwithoutdebugging/
https://github.com/vurdalakov/languagelocker
https://github.com/K1tty/RockMargin
Output Enhancer (Nikolay Balakin)
https://github.com/jedmao/tabsanity-vs
https://github.com/atlaste/CPPCoverage
https://marketplace.visualstudio.com/items?itemName=TrungKienPhan.WordHighlight-18439
Parallel Build Monitor (Krszystof Bukatz)
https://marketplace.visualstudio.com/items?itemName=Logicalmind.GreyTheme

Wednesday 6 November 2019

Monday 21 October 2019

OBS Studio with dual graphics

Here is how to set any app to always run on a particular GPU: https://www.tenforums.com/tutorials/103965-set-preferred-gpu-apps-windows-10-a.html. A well-hidden feature. Set OBS Studio to always run on Intel. By default it runs on NVidia, which makes it not work — lagging for minutes, not showing capture, etc.