Writing custom VSCode plugin

I enjoy writing code snippets that eventually works out as a utility to a developer. The DevTools! Developer tools are small independent code pieces those can be executed on-demand and should not have any side effects. Recently I have been using Django Admin intensively to add more and more options in list view, detail view to help debugging and developing better. But about that in some other blog. Here, I am going to talk about a VSCode plugin that I published. ...

May 20, 2022 · Pranav Gore

When & why to use PyAutoGUI

PyAutoGUI is one of the framework you can use to test desktop applications. Consider a case where you need to test a flow of the application and it is not in browser, you can go for PyAutoGUI. Selenium is another framework that comes to the mind when we talk about any type of testing automation but it only supports browser based automation. Selenium can not have control over locally running non-browser app. ...

May 2, 2022 · Pranav Gore

Video File Operations with FFmpeg

Simple Useful Features of FFmpeg In this section we will go over a beautiful tool called as FFmpeg. I have been using FFmpeg for all of my video editing in server in production for more than 4 years now. It is a very reliable, amazing open source project for playing with video editing. Small Tip before we jump in Before we dive into these cheat sheet, remember that many of the FFmepg options are applicable to input and output files both. Based on where you put the option, FFmpeg decides to apply it for input or output. Options used before the -i <input_video> will be applicable to input file. ...

September 15, 2020 · 3 min · Pranav Gore

Python code translator 2 to 3

Upgrade today!! Let’s talk about Python 2to3 , an automated code translator. This is a great tool to convert your python2 project to python3. Why you should move to python 3.x? Checkout https://pythonclock.org/ (If that link is no more available, I have added the screenshot below) Python 2 reached end of life (EOL) on January 1st, 2020 And python3 supports typing (:heart_eyes:) and a lot more (will cover it some other time). ...

May 27, 2020 · Pranav Gore

Record Screen and Audio using FFmpeg on macOS

By the end of this blog you will be able to record your screen+audio on macOS. 2 beautiful Open Source softwares Get started by installing FFmpeg with brew . Run following command brew install ffmpeg --with-sdl2 --with-ffplay (--with-ffplay is optional) Try running ffmpeg, you should see some output with version number on first line. ffmpeg version 4.2.2-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.16) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg' As of this writing I am using version 4.2.2 ...

May 12, 2020 · Pranav Gore

X virtual framebuffer (Xvfb)

Today, let’s talk about AWESOME X virtual frame buffer. Virtual memory to render GUI If you want to emulate the X server and want your UI apps to render over there then the answer is Xvfb . Xvfb uses frame buffer to emulate X server. Let’s install it first sudo apt update sudo apt install xvfb Basic Usage: Xvfb :111 -screen 0 1920x1080x24 & echo $! > /tmp/runxvfb.pid With this command we are creating a new display with 1920x1080 resolution and put the PID info /tmp/runxvfb.pid “:111” is the ID of the new display. We will use “:111” whenever we want to refer to that display. ...

April 22, 2020 · Pranav Gore

Exported but Restricted inside `internal` package.

Information about internal package , _ and . imports in Golang! If you come across any package named internal or you write a package with the name internal then it is treated special in Golang world! Only question to ask about it is, Who can import this internal package? And the answer is, any file out side the package containing internal package can NOT import internal because the name is self explanatory. Whereas, any file inside package that contains internal package, can import that internal package. ...

February 28, 2018 · Pranav Gore

Prevent accidental git-push in a simple step

If you have push access to an upstream repository and want to avoid accidental push, checkout the simple solution below. Freedom is choosing your responsibility. It’s not having no responsibilities; it’s choosing the ones you want. Let’s set the context I will call the original repository as upstream My fork for that repository will be called as origin 90% of times I push to origin and then create pull request, but few times I push directly to upstream(create new branch or update existing one). ...

February 8, 2018 · Pranav Gore

Update golang version on Fedora

Find out where Golang is installed, generally on the fedora it is /usr/local/go Or if you have custom location then check with echo $GOROOT and go to the location and rename go directory using sudo mv go go1.7.3. We keep older version for safety. Now, go to https://golang.org/dl/ and download suitable version for your system. Lets say downloaded file is in ~/Downloads/ and then execute following (modify paths as required) ...

October 16, 2017 · Pranav Gore