Posts
HTTPS vs SSH end points in github/bitbucket
Read Sudip Bhandari's answer to What should I do such that Git doesn't ask for username and password while pushing and pulling the code? on Quora
read morePosts
Linux aliases
Read Sudip Bhandari's answer to How can I create aliases in Linux command? on Quora
read morePosts
Quick & Simple screencasts using Peek
Read Sudip Bhandari's answer to Can you surprise me with a Linux software so good I didn't know I need it until now? on Quora
read morePosts
Setting up local postfix to send mails via Google's SMTP
Postfix Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. This is required in order to be able to send mails from the local machine (without using any vendor’s client)
Installation sudo apt-get install postfix Postfix has be configured. The suggested way to do is via: sudo dpkg-reconfigure postfix. You can also directly edit /etc/postfix/main.cf file and make changes to the configuration. For most of the purposes dpkg-reconfigure should suffice.
read morePosts
Some Useful SSH tips
Executing commands remotely and returning results One of the common usage is to log into remote machine and check some process stat to see if some program is running or not. Instead of logging in, executing command and then returning back, we can do it in a single shot by providing the command to be executed as an argument.
ssh loguser@$x.x.x "ps -ef | grep kafka" loguser 12214 12213 0 23:47 ?
read morePosts
A tiny Springboot app
This miniblog is adpated from this linkedin course
The tweet that started it all Install springboot cli Easiest way is via sdkman.
sdk install springboot Groovy classFile:
ThisClassWillActuallyRun.groovy
@Controller class ThisWillActuallyRun { @RequestMapping("/") @ResponseBody String home() { "Hello World!" } } Running the app:
spring ThisWillActuallyRun Output:
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .
read morePosts
Experimenting With Local Kafka cluster
Kafka is the platform for stream processing. The real power of Kafka comes in the scenario of distributed computing where Kafka logs can be considered as a single source of ordered-truths. Those logs can be consumed by all the relevant consumers in their own pace and own time. (within the retention period, of course). Here is a great LinkedIn blog on log, which is the core of Kafka platform.
In summary, Kafka has a number of clustered broker nodes (which actually store message inside various topics which can be partitioned (default is 3)).
read morePosts
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 more