Saturday 12 March 2016

How to calculate to get an exact partition size

It is sometimes not great to see a partition size like 99.96GB or 100.30GB in My Computer. It is just not nice. I am a bit particular when it is about partition sizes. As Microsoft has chosen the way to partition using numbers in MB, it is always the issue, resulting in funny number of GB.

I used to go to a website and calculate the partition size but I unfortunately do not have access to it anymore. So, it has to be manual. This trick worked like a charm when I tried to resize a partition that was factory partitioned. I believe it would work for other situations as well.

What I did was for my 150GB partition after seeing someone's post in superuser.com.


Since I want a 150GB partition, I calculated like the following. 
(1024 x 150 ) + 4 = 153604

For every 1GB, it should be multiplied by 1024 and then 4MB should be added.

Mission accomplished finally. :)



Friday 4 March 2016

Download youtube clips (and subtitles)

youtube-dl. It is a small standalone executable file to download youtube clips and subtitles. I have no doubt this is a nice utility which does not have GUI unfortunately. So, one has to check the parameters for different download scenarios. I like to share the parameters I have tried successfully so far.

Download clip + subtitle
youtube-dl.exe --write-srt --sub-lang en https://www.youtube.com/watch?v=xxxxxxxxxxx

Download clip only
youtube-dl.exe https://www.youtube.com/watch?v=xxxxxxxxxxx

Download subtitle only
youtube-dl.exe --write-srt --sub-lang en --skip-download https://www.youtube.com/watch?v=xxxxxxxxxxx

--sub-lang may be replaced with desired language such as fr,es, and so on.