How I wish we had been taught all this instead of inane and archaic stuff in college!
Author: abhijit
poor man’s directory monitor – part 2

After having created the directory monitor, I realized that it would not be suitable for everything.
For example, if I needed to know which file was getting modified in the directory, rather than just anything having gotten modified.
Well, in that case we would somehow need to store both the file name and the modified time of the file which changed.
Continue readingpoor man’s directory monitor – part 1

There have been many times over the years that I’ve been wanting a simple capability of monitoring changes in some directory or some files in my system.
Linux has inotify and Windows has WatchDirectory.
The biggest challenge has been to look for something that works seamlessly across operating systems.
So, I thought of creating my own solution!
Continue readinggitignore settings

To get git to exclude files and directories, we need to add a .gitignore file in the root folder of the project.
Some of the things I learned from setting up my .gitignore
ruby Open3 module

What a fantastic module!
Every once in a while I get to know a bit more of Ruby and I feel the joy which Matz talks about!
From: The Philosophy of Ruby –
For me the purpose of life is partly to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, So Ruby is designed to make programmers happy.
Today I was looking for executing a program from within Ruby. Now this program takes command line input and gives some output as well. So, I went around trying the usual %x(program.rb) but obviously that didn’t work.
Finally I came across Open3 which is a core module of Ruby!
Continue readingcustomizing Microsoft Word – zoom shortcuts and full path names
This adds a few convenient customizations in Microsoft Word. I’ve always liked the zoom shortcuts in browsers where Ctrl++ (Control + Numeric Keypad +) and Ctrl+- (Control + Numeric Keypad -) zooms in and out on the page. I wanted the same functionality in Microsoft Word as well.
Additionally, full path to the document in the title bar would also be nice.
Continue readingpipe localhost to the internet using inlets over Nginx

Many times during developing some application it becomes important to show the progress to someone over the internet.
Most of the time we end up using some screen sharing software. That, however, can only show my screen to the other person. They cannot really interact with the application.
We can use some software for remote desktop sharing but then I cannot work while the other person is using my screen.
One very nice solution is ngrok, which essentially creates a tunnel from the local system to ngrok’s servers and gives a nice URL.

However, I was a bit concerned since all my traffic was getting redirected via ngrok’s servers.
I was looking around for something which would do the same thing but via my servers and finally came across inlets. This is an open source project, written in Go, which can be easily self hosted.
Continue readingnginx auto-index styling

I’ve always been envious of the directory listing that Caddy has for serving files. Nginx also has the capability to list directories and files.
This is extremely useful to serve a directory out quickly over LAN or even where it is required to serve a directory listing instead of a web page.
However, the default Nginx styling leaves a lot to be desired!
Continue readingruby Classes and Modules

Classes and Modules in ruby have always intrigued me!
So, I thought I’ll write some code to understand what they were.
Besides the standard Class aspects of ruby, there are a lot of interesting things that can be done with them – like singleton objects.
Modules, of course, give another level of flexibility.
Continue readingFurious activity is no substitute for understanding.
H. H. WILLIAMS
