Contact Us

Vim: Increment and decrement numbers

In Normal mode, Ctrl+A increments a number by one, and Ctrl+X decrements a number by one. This will work on numbers at or after the cursor. So the cursor does not need to be on the number. But the “after the cursor” thing works only if the cursor is on the same line as the number. Like most Normal mode commands, increment and decrement support numeric prefixes. For example, pressing 5Ctrl+A will increment the number by 5.

Read More ...

A progress bar with eta for FFmpeg using Python

Presenting FFprogress, a Python program for showing a progress bar for FFmpeg. It uses the python library tqdm to show the progress bar. FFprogress in Windows 10 I have not tested it properly in Linux; it seems to work. FFprogress in Lubuntu Limitations FFprogress has the following limitations. Possible Unicode problem on Windows The Unicode version of tqdm might not work on Windows. It depends on the font and font-size of the console window.

Read More ...

Chrome developer tools : auto-format JavaScript or CSS files

When viewing the source code of minified JavaScript or CSS files in Chrome Developer tools, it is very useful to be able to auto-format them. Chrome developer tools provide a pretty-print option for this purpose. A minified JS file Click on the small icon with two curly braces. A minified JS file with pretty-print option enabled Notice that the pretty-print icon has become blue to indicate that it is active. In the above picture, I am viewing the JS file in the Network tab.

Read More ...

Creating an m3u playlist with relative paths using Bash, Powershell or Python

Most of the media player software lack the option to create playlists with relative paths. Absolute paths make it difficult to move and organize media folders without breaking playlists. Let us see how to create playlists with relative paths using Bash, Powershell, and Python. I am not sure how many media players support relative paths in a playlist. The three which I tested: VLC, Media Player Classic, and mpv seem to support it.

Read More ...

Natural Sort

Natural Sort is a hazy concept; it basically means something like human-friendly sort; it could be useful if the strings being sorted are going to be visible to the user. Difference between normal sort and natural sort Let us look at an example, we consider the list [1, 2, 10] to be an ascending order list, and sorting algorithms would not disagree. But if the list happened to be a list of strings most sorting libraries would sort it like this [ “1”, “10”, “2”].

Read More ...

Disabling cache in Chrome using Developer Tools for web page testing

Caching in chrome can be disabled temporarily using chrome developer tools. Open developer tools by pressing CONTROL+SHIFT+I in Windows or COMMAND+OPTION+I on a Mac. This shortcut opens whichever developer tools panel was last open. In the network panel, enable the Disable cache option. If you want to clear resources which have already been cached, do the following. With developer tools still open, right-click the reload button or click and hold down the left mouse button on the reload button.

Read More ...