Posts
Tracking File permissions in git
Git tracks file permissions too Although I have been extensively using git for quite some time now I never happened to come across this situation where you change the permission of the file which is tracked by git. Yes, by default git is configured to track the changes in file permission mode too.
Just to experiment with the idea, I created a dummy repo and ’touched’ an empty file. The initial default permission being: 775
read morePosts
Learn enough to be dangerous!!
Recently I came to know about a wonderful online learning resource called Learn Enough. (https://www.learnenough.com)[Learn Enough] is an initiative by (https://twitter.com/mhartl)[Michael Hartl] who is popular for his highly acclaimed Ruby on Rails tutorials series, which was, at one point, Wikipedia founder (https://en.wikipedia.org/wiki/Jimmy_Wales)[Jimmy Wales]s’ favorite book. I came to know about learn enough through one of the links in StackOverflow answer where I was reading through some answer on UNIX. After going through some of the articles on (unix, git, dev-environment) I was amazed at the simplicity and the narrative way of teaching.
read morePosts
Vimium, Browser for hackers!
How I came to know about it So, I am a regular reddit user and it’s one of my favorites online communities. While browsing through subreddit posts, there is a feature in the reddit web-app where you have keyboard shortcuts for browsing: N for next post, P for previous post and so on. I found it very convinient and easy to use especially because you don’t have to take your hands off the keyboard.
read morePosts
Leveraging Cron job to monitor network connection
Scenario: There are a handful of ways to run some script periodically on a linux machine. Cron jobs, watch command. Cron jobs are heavily used in server infrastructure for task like regular disk clean up, network monitoring, hard disk storage monitoring, setting up alerts, etc.
I have been running Ubuntu 18.04 and one common issue that I have observed is, in certain wireless connections, after a certain time network-manager stops working.
read morePosts
Leveraging git hooks
Adding tag support to Jekyll Now This blog is a forked version of a popular github blog project called Jekyll Now. It’s based on ruby and is a really elegant and easy to use tool that I have found. Being bare minimum version it doesn’t have tagging support for blog posts.
I have added tags to all the blog posts. This particular plugin isn’t supported by github so running it just like that doesn’t create ’tags’.
read morePosts
SDKMAN, Java9, Jshell, REPL
Working with multiple versions
Most of the times we as developers are working on multiple version of the language or the framework. If not managed properly it can be a nightmare dealing with different projects which use different versions of the same language. Say, project A uses python2 and project B uses python3. In python we have virtual environments which can be managed using, among many others, pipenv. Likewise for Ruby we have rbenv.
read morePosts
Declarative vs Imperative programming
Imperative programming focuses on ‘how’ and Declarative programming focuses on ‘what’.
Examples
C#
//Collection of integer objects List<int> collection = new List<int> { 1, 2, 3, 4, 5 }; //imperatively checking and creating a list of odd numbers List<int> results = new List<int>(); foreach(var num in collection) { if (num % 2 != 0) results.Add(num); } //doing the same 'declaratively' by using LINQ var results = collection.Where( num => num % 2 !
read morePosts
GitHub & Microsoft Saga
Github is the most popular hosting site for millions of git repositories around the world, most of them being open source.
Microsoft was filed for Antitrust case in 1998 and has been historically been infamous for being more business-oriented. The then CEO Steve Ballmer even said Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. However times have changed and Microsoft has come a long way.
read morePosts
Working with Spring Data and Json
1. Overview
Json is, in many places, the preferred way of storing data due to it’s brevity (mostly compared to xml) and human readability. While working in any web framework which involve operation with data models and templates, usage of json data format is almost inevitable. Languages like Python, Ruby even have this format conceptually built into the core language library itself. Hash in ruby and dictionaries in python which allow json-(dictionary/hash) conversion with an ease.
read morePosts
GDPR
GDPR (General Data Protection Regulation) is a regulation to ensure that the companies working in the European Union region in e-commerce domain comply with a set of rules in order to safeguards customer’s data and their privacy. It also requires them to completely wipe off user’s data when requested by the user. So, basically this is an attempt at empowering general user and giving them ownership of their own data. In the light of recent incidents such as Cambridge Analytica Scandal involving Facebook, enforcement of GDPR (enforceable from 25 May 2018) has been received with very much enthusiasm and anticipation.
read more