Posts

Showing posts from March, 2021

Clear terminal with a shortcut

Hey welcome to my blog. There is a simple command to clear out the terminal.  Just hit this shortcut: CMD + k

Monitor mac from terminal | htop command in MAC

Usage: To analyse CPT usage, memory usage, taks running. htop command in Linux system is a command line utility that allows the user to interactively monitor the system’s vital resources or server’s processes in real time. htop is a newer program compared to top command, and it offers many improvements over top command. htop supports mouse operation, uses color in its output and gives visual indications about processor, memory and swap usage. htop also prints full command lines for processes and allows one to scroll both vertically and horizontally for processes and command lines respectively. Syntax: htop [-dChusv] Understand the columns: PID: ProcessId UserId: User through which process is running Priority: 0 to 40 NI: The nice value of the process, which affects its priority. (-19highest to 19lowest) VIRT: virtual memory being used by the process RES: How much physical RAM the process is using, measured in kilobytes. SHR: How much shared memory the process is using. S: The curre...

Learning Graphql | A query language for your API | Part1

What is Graphql GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. Rest is used to created the APIs, while Graphql sits in front of the API. Graphql can sit in front of an existing API as well.  You can still have a API underneath Graphql. Graphql is just a spec, what it can, it should, would do. Facebook created GraphQL-JS, which is an JS implementation of graphql spec in JS. It gives power to client, to request the data that they want. Not more, not less.  It's strongly types, like typescript.  Graphql is kind of SQL for your API. Since it's just a query language.  Rest vs graphql Rest is an interface for building api, graphql is a query language. They do similar things but d...