Posts
Shebang (what does "#!/bin/bash" do at the start of bash scripts?)
Demonstration by Example This was originally answered by me at Quora
#!/bin/sh sleep 50 let’s save it as a.sh and make it executable
sudo chmod +x a.sh Let’s run it in the background and stat the process.
./a.sh& [1] 11660 On looking at the process details:
ps -fp 11660 UID PID PPID C STIME TTY TIME CMD sudipbh+ 11660 11330 0 15:30 pts/7 00:00:00 /bin/sh ./a.sh We can see that the content of the file is passed as an argument to the program /bin/sh.
read morePosts
Some notes on gradle
Java plugin for gradle Add build.gradle at root of the project
apply plugin: 'java' This links the gradle. Makes gradle aware of java.
build.gradle is written in groovy Intellij comes with an inbuilt groovy console (interpreter for the language)
Groovy console can also be used as ‘java interpreter’ to quickly evaluate java code and api (akin to jshell)
groovy closures:
class Myclass{ void doSomething(Closure closure){ closure.call() } } obj = new Myclass() obj.
read morePosts
Thoughts on Kindle
Experience So far I have been using kindle paperwhite for a while and it’s been great.
Does carrying kindle look outlandish? Quora Question I have a cover/pouch for my kindle which I can fold like a leatherback diary. Even when I am reading I can hold it like a normal diary/book.
It doesn’t look outlandish at all.
Why do I prefer ebook readers quora answer I find it more convenient to read from e-ink based ebooks readers (have used kindle) over physical books for most of the cases.
read morePosts
An Essay On Technical Sophistication
Building Technical Sophistication As A Developer Idea and concept wise it’s something we all developers are quite aware of. I first came through this exact term, “technical sophistication” in Michael Hartl’s article in Learn Enough Society. The basic idea is as developer one requires a certain set of skills which can elevate their overall vision and can see things in a broad sight. One need not be technically proficient at everything but having good understanding of fundamentals enables us to debug and reach the solution faster.
read morePosts
Some notes on HTTP
Playing with HTTP: Practical Notes and Examples HTTP is the foundation of the web, but it’s easy to overlook how it actually works. This post collects some hands-on notes, experiments, and practical tips for understanding HTTP, inspired by the excellent Udacity client-server communication course. Whether you’re a beginner or just want to refresh your basics, try these out yourself!
Playing with HTTP: Practical Notes and Examples These are some hands-on notes and experiments from the excellent Udacity client-server communication course.
read morePosts
I completed Unix Workbench Course by John Hopkins University in Coursera
I recently completed UNIX workbench course by John Hopkins University in coursera. So, I thought I would write something about UNIX, GNU/Linux.
Love for UNIX There is a documentary by AT&T on Unix on youtube which I regularly rewatch now and again which shows the early story of UNIX and has Brian Kernighan talk about the power, simplicity and elegance of UNIX design.
We know the story of how linux came to be.
read morePosts
Learnings from Redis Meetup at Razorpay
Personally I haven’t extensively used redis. My limited understanding of redis would be summarized as:
redis is in-memory database, stored in RAM (making use of underutilized RAM space in servers) being stored in primary RAM it’s very fast being stored in volatile storage (RAM) it vanished as system goes off, however there are ways to persist it in the file system redis uses key value storage and supports quite a few datatypes including list, hashmaps, geocodes, etc how companies like twitter have made an extensive use of redis in caching for faster retrieval (low latency when the throughput demand is high) it can be used as pub-sub model (message broker) Trivia: Redis is an acronym for “Remote Dictionary Server”
read morePosts
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 more