Posts
Why Some ISPs block TCP 22?
Why Some ISPs block TCP 22?
Recently I got to know that some ISP indeed block any outbound traffic for port 22 (tcp) which is a standard port for ssh connections.
(I came to know about this as I was being unable to log into one of the compute instances from my terminal via gcloud in gcp. I prefer terminal logins instead of browser as it’s simply 100 times easier to work with.
read morePosts
Safely Indexing an Array (C to Java)
Arrays
Arrays are contiguous locations of memory set aside during compilation. (memory allocated is virtual address which is later mapped to actual memory address during run-time)
In the most simple form you need a base address and you can read starting from there. (there’s a limit how far you can go even with languages like C)
Simple Integer Array in C:
int arr[] = {1,2}; for (int i=0;i<10;i++){ printf("%d\n",arr[i]); } C doesn’t have a way to have a check on how far to go.
read morePosts
First PR (rather lame) that got merged
This was primarily for the inconvenience I had faced a few days prior java-storage API returns null for object with space in name
Fixing this issue required a bump in version
Upgraded version required an additional dependency which wasn’t documented. I added it.
(This is a rather lame contribution but I hope it gives me an impetus for trying and exploring more)
read morePosts
ENTRYPOINT Vs CMD in Docker
CMD Vs Entrypoint is a bit confusing at the beginning. When should you use CMD and when should you use ENTRYPOINT while building your docker images?
CMD
This is the command that runs when you start a container.
Eg:
cmd-docker
FROM ubuntu CMD [ "echo" , "this is running from CMD which runs when the container starts" ] Building an image:
docker build -t cmd-docker -f cmdvsentrypoint.yaml .
Default docker run:
read morePosts
(Book Review) Tuesdays with Morrie
Tuesdays with Morrie
I loved the narration.
I loved the content and the insights this book provides in addition to the beautifully crafted chapters. Almost every page gets you into a contemplative mode of introspection about life, love and the ‘culture’.
The biggest take away for me from this book is this:
Culture is a man-made thing and is presented in such a way that people tend to conform to it.
read morePosts
gcloud sdk
Accessing gcp compute instances via gcloud sdk
You have a bunch of options to ‘ssh’ into gcp VM instances:
open in browser window open in browser window on custom port open in browser window using provided ssh key another ssh client (putty, termius, etc) I personally find the ‘gcloud sdk’ way much more convenient to use since I can just launch it from my terminal without having to open the browser, log into cloud console, locate the vm instance and then ssh’ing into it.
read morePosts
What is good problem solving?
Problem Solving is the gold
We all focus on problem solving. We are in pursuits of so many activities which aim to identify the problems, propose a solution to them, build the solution and hopefully create some value out of it. But what is good problem solving? Especially in the realm of computer science.
The greatest part in ‘problem solving’ is not actually the solution. Its the break down of the problem.
read morePosts
Using gcsfuse to mount GCS bucket
Migration to Cloud
As your applications scale it becoomes tedious, expensive and error prone to have it all on your data centers. Modern microservices are built with the philosophy of isolation. Scaling up and down of those services should happen with a snap of a finger (enter containerization technologies like dockers replacing traditional VMs), you scale up to serve bigger traffic and also to make it fault tolerant. But even if you have 20 docker pods, a failure in data center as simple as switch failure can bring your whole infrastructure to its knees.
read morePosts
Reminder for task-warrior CLI
TaskWarrior CLI
TaskWarrior is a CLI based task manager which I find pretty handy to use. When you are working on something (where your linux terminal is always with you), you can just create an interactive todo from your command line.
~/sudip/sudipbhandari126.github.io(master*) » task add write a blog about task warrior reminder sudipbhandari@sudipbhandari-Latitude-5480 Created task 1. ---------------------------------------------------------------------------------------------------------------------------------------------- ~/sudip/sudipbhandari126.github.io(master*) » task list sudipbhandari@sudipbhandari-Latitude-5480 ID Age Description Urg 1 3s write a blog about task warrior reminder 0 1 task ---------------------------------------------------------------------------------------------------------------------------------------------- ~/sudip/sudipbhandari126.
read more