Yesterday, I was installing LAMP stack on my local machine to get some work done. For some weird reasons, I thought I would be able to access the database as the root user through a non-root process. Here are some notes about that just in case I encounter such issues again in future. Installation First thing first, we need mysql binary to be able to create and manipulate databases. Let me get that from Arch Package Repository.
Before I start writing anything, here’s a discloser: I knew about generator functions since a long time, but did not really had a chance to use them. In this blogpost, I will demonstrate implementation of generator functions in real-world scenerios. Generator Function Before we begin, let’s quickly revise what generator functions are. They are a special kind of function which is used to generate an iterator. An Iterator is an Object which implements the Iterator Protocol.
If you ask me about the most underrated feature in Vim, my answer would be ‘Session Management’ straightaway! Just like any other “modern” editors, Vim does support sessions. What is a Session Before I go in-depth, let me explain what exactly is a Session in Vim. Simply put(from :help session): A Session keeps the Views for all windows, plus the global settings. An example of session could be: If I have opened a project and worked for an hour, and then closed it.
Mutt is a command-line email client which can connect to IMAP/POP3 and SMTP protocols as well as read emails from local directories. So, how do I stumbled upon it? I am trying to optimize my workflow. Having to click around a GUI-based email client isn’t my thing. So, I look for alternatives. Why Mutt? because Mutt features a keybinding which is similar to Vim. This means, a single set of shortcuts would work pretty much everywhere.
Intro AbortController is an interface which provides a way for terminating one or more web request as and when desired. This generally means that a request can be terminated by a user whenever needed, irrespective of whether the operation is finished or not. AbortSignal can be implemented in any web platform API which uses Promise. The API AbortController provides a few things for users to implement it effectively in code. At the time of writing this, the constructor would return an instance which contains a method AbortController.
Duplicate files, in Layman’s term, are the files which are exactly a copy of one another. For example, if we have two files biz A and B; A would be a duplicate of B if it has the same content as file B. Duplicates are generally unavoidable. No matter what you do, you would always end up getting a few of them. Going through the whole file system and finding them one by one is a tedious job.
TL,DR; go and install asciinema from asciinema.org and start recording your terminal sessions. We, the terminal geeks often need to record our shell in-order to explain something to our geek friends; or even just to showcase a new CLI tool we built yesterday night. Recording Screen … Sucks! Yes, it sucks. Why? couple of good reasons: if you have a device with low screen resolution, record output would often get pixelated there might be other distractions on screen.