# Hello

I'm Logesh Paul, a self-motivated and self-learned Frontend Developer and UX Designer

With 17+ years of strong hands-on experience in web development & design, I have the ability to drive a project from an ideation phase to delivery.

Currently, I'm leading the Frontend Development(UI) & UX team at Sycamore Informatics.

**Summary**

* Solid experience with web technologies like HTML, CSS, Javascript/ES6, React, Angular, Rails, PHP, etc.,
* Experience in managing implementation challenges in the area of software architecture, design, integration, infrastructure, and scale.
* Experience in the implementation of enterprise-wide packages as well as custom applications.
* Keeping usability in mind challenge requirements and suggest better alternatives for solving business problems.
* Solid knowledge of software development life cycle including agile methods and the ability to adjust for what works best.
* Work closely with Users, Stakeholders, Design, Development, QA, Project Management, and other teams for timely delivery.
* I always explore new ways to write better code & Have a good eye for design.

> Good design is as little as possible. Less, but better" - Dieter Rams

Aside from a passion for design and coding: I love to travel, play badminton, listen to music, and never stop learning. I'm from Keela Ambur a calm village surrounded by paddy fields close to the Western Ghats. Now, I'm living in Bangalore, India.

Reach out to me Twitter - @logeshpaul


# About

This is my personal wiki I try to write things and structure them so that I can use them for my reference, and maybe everyone can benefit from reading them or even referencing them. This is based on the concept of the Digital Garden / Second Brain.

Each folder has a topic and under it, you will see related topics.

I will be updating this wiki quite often as I use it myself as both an account of things I know as well as things I want to know and everything in between.

### A gardening guide for your mind

This is what a gardening guide for your mind would look like:

* **Seeds.** Seed your garden with quality content and cultivate your curiosity. Plant seeds in your mind garden by taking smart personal notes (taking raw notes is useless). These don't need to be written in a publishable form.
* **Trees.** Grow your knowledge by forming new branches and connecting the dots. Write short structured notes articulating specific ideas and publish them in your digital garden. One note in your digital garden = one idea. (what you're currently reading is such a note) Do not keep orphan notes. Thread your thoughts.
* **Fruits.** Produce new work. These are more substantial — essays, videos, maybe a book at some point. The kind of work researchers and creatives may hope will help them live beyond their expiration date.

Networked thinking can happen at many levels. A digital garden is a scalable way to transform seeds of information into original work and to go from collector to creator.


# Productivity


# My Ultimate Self Guide - For Better Living

Published on: 2017-10-23

Everyone has their way of living

This is the guide I use to improve myself consistently. I learned this from many different sources(articles, books, word of mouth, etc.,) so If I haven't mentioned your name/source let me know in the comments, and I will give credit for the same.

#### Morning's

"Each good morning we are born again, what we do today is what matters most" — Buddha

* Become an early riser. It's hard at the start, but if you do anything for 30 days a new habit is created.
* If you have the gift of waking up automatically you are gifted, Others(the majority) don't keep their alarm in a reachable area/bed
  * Avoid Snooze/Negotiating with your pillow, As soon as the alarm goes, wake up and change the environment to get yourself up easily.
  * Do some activities immediately (Wash your face, Brush, Etc.,)
* Do exercise in the morning to feel happy, be more productive & create a healthy lifestyle.
  * At least a few minutes is good enough to boost Endorphins (1 minute is enough for new starters - check [Kaizen Technique](https://www.youtube.com/watch?v=9DbvSl_C_kY))
* There are hundreds of articles explaining the benefits of doing exercise in the morning. So I leave it there

Waking up early and developing a routine can transform you into a very intelligent, organized, and successful person within a relatively short period of time (approx. 1–10 years). Just imagine this in your mind (2Hrs every day for 10 years)

"Lose an hour in the morning, and you will be all day hunting for it" — Richard Whately

#### First Things First

"Good is the enemy of great." — Jim Collins

It's easy to start the day with something that seems good/easy but isn't all that important. Watch the below video where Stephen Covey explains the importance of putting "first things, first."

{% embed url="<https://www.youtube.com/watch?ab_channel=EmileDeWilde&v=VyL93MlR_I0>" %}

* Read uplifting content to motivate, and inspire you for the day (max 10 mins)
* Do the #1 priority task in the morning. Never let easy/small task fill in your day
* Learn how to Prioritize your tasks
  * Read Books: [Eat that Frog](https://www.goodreads.com/book/show/95887.Eat_That_Frog_), [Manage the time of your life](https://www.goodreads.com/book/show/25481380-managing-the-time-of-your-life)

### Notes on Self-Development

Self-improvement isn’t a destination. You’re never done

* Create Goals (Daily, Weekly, Monthly, Yearly)
  * Avoid Unrealistic goals: Do not overcommit and get disappointed if you don't achieve them.
  * Create reasonable and achievable goals to get your Endorphins level up. One step at a time!
* Maintain goal(Daily, Weekly, Monthly, Yearly) streaks to make yourself consistent
  * Use an App like [Today](https://itunes.apple.com/us/app/today-habit-tracker/id1055295863?mt=8) to set time-based reminders and track streaks
* Give 10x the value of what you say you will
  * It's not about the price, it's the value that matters.
  * "Quality is not an act, it is a habit." — Aristotle
* Use the Kaizen Technique to create habits
  * "Little strokes fell great oaks." —  Benjamin Franklin
  * Do something useful every day just for 1 minute (very little time and easily do-able) and over time it will become your habit
* Wherever You Are, Make Sure You’re There, Most people are never present
  * Google Search: In flow, Deep work, Focus.
* The world looks for the best always; not the average person
  * Read Book: [The Dip](https://www.goodreads.com/book/show/324748.The_Dip) A Little Book That Teaches You When to Quit (and When to Stick)
  * If you don't quit on bad/time-consuming tasks you are not going to succeed on that righteous goal in your todo list
  * So quit on unwanted things and spend time on useful things and be the best
* Be consistent
  * The difference between Amateur and Professional is; that the latter is consistent no matter what.
  * If you’re not that good now, consistency will make you better.
* Embrace multiple learning techniques and never quit learning
  * "Anyone who stops learning is old, whether at twenty or eighty." — Henry Ford
  * By consistent learning - You make new connections in your brain, Open yourself to a new world of experience

#### Keep Your Energy Up

* Two keen things to be limitless - Body, Mind
  * Body: Cardio(run), Strength(gym), Flexibility(yoga, sports)
  * Mind: Meditation, Brain Exercise
* Eat healthily, Drink 3-4 litres of water every day
* Stop looking for quick methods to make your body fit as it's not going to last, instead gradually adopt to a healthy life (Approx 1-4 Years)

#### Things to do before you go to sleep

The success of your morning begins the night before.

* Having 7Hrs of good sleep is very important to wake up fresh and recharge your brain. Not having enough sleep ruins the next day, so avoid it at any cost.
* Take a few minutes every night to mentally prepare yourself for the next day. Make sure you write down your #1 priority task for tomorrow
* Turn off WIFI/Mobile data
* Keep your mobile/alarm far away from bed (To wake yourself up with one alarm)
* Read a physical book, Avoid e-devices(kindle/tablet/mobiles)
* Think about the tasks & goals you need to accomplish tomorrow and go to sleep
  * "Never go to sleep without a request to your subconscious." — Thomas Edison
  * Your subconscious mind works when you sleep (Book: [The Power of Your Subconscious Mind](https://www.goodreads.com/book/show/68984.The_Power_of_Your_Subconscious_Mind), Google search to find out more)

When you wake up the next morning, you’ll be primed for success. The only thing you need to do is immediately get out of bed.

"Successful mornings don't happen by chance. They happen by choice. Neither does a successful life." — Benjamin P. Hardy


# Finding your Passion, Purpose of Life

Published on: 2019-07-18

We keep hearing these words "Find your passion" from people, from different media sources, and even from famous quotes like the one below

> Choose a job that you love, and you will never have to work a day in your life — Confucius

How to find your passion/purpose in life? is one of the most difficult question, but there is a Japanese concept called "ikigai" which can be of help.

All you have to do is answer 4 questions.

* What you love.
* What you are good at.
* What the world needs.
* What you get paid for.

It's hard to answer the above questions too, but try to put up a list of items under each section and choose the one which best fits you or start working towards it.

If you have list ready,

* The first level of intersection gives you the basic elements(**Passion, Profession, Mission, Vocation**).
* The second level intersections give you feelings.

{% img center /images/posts/ikigai.jpg %}

Let's say for example "**What you love?:** is helping others" & "**What the world needs?:** is to end hunger"; If you do that you will feel "Delight and fullness, but no wealth".

You can't live without wealth, so it's really important to settle in the middle to attain fulfillment/purpose in life. In Japanese terms, you will attain your "ikigai" aka "a reason for being" if you settle in the sweet spot on the middle.

I appreciate your time & good luck finding your ikigai.


# Great Techniques To Self Mastery

Published on: 2018-06-30

I finished reading a book named ["A Monk Who Sold His Ferrari"](https://www.goodreads.com/book/show/43877.The_Monk_Who_Sold_His_Ferrari) by Robin S. Sharma, It was a great self-help book I ever read after [Eat that frog](https://www.goodreads.com/book/show/95887.Eat_That_Frog_?ac=1\&from_search=true). This post highlights the key elements covered in the book

Follow below 7 techniques to self-mastery your destiny(Nirvana). Life is all about choices, One's destiny unfolds according to the choices one makes

#### Master your mind

Mind comes first and foremost important aspect to any self-improvement. Nourish your mind with positive thoughts and keep your mind healthy. When you form the habit of searching for the positive in every circumstance, your life will move to its highest dimensions. This is one of the greatest of all the natural laws. Remember, either you control your mind or it controls you

> Imagination is more important than knowledge - Einstein

#### Follow your purpose

Once you have a clear mindset define goals, without goals you will just drift. So write your goals read it every day. The human mind is the world's largest filtering device. When used properly it filters out what you perceive as unimportant and gives you only the information you are looking for at that time. When you decide to start concentrating your mind on your life's main aims your mind starts to filter out the unimportant and focus only on the important.

> I am an artist at living — my work of art is my life. - Suzuki

#### Practice Kaizen

[Kaizen](https://www.youtube.com/watch?v=9DbvSl_C_kY) is a Japanese technique to constantly improve oneself. Keep improving yourself and never stop learning. You do not have the time to improve yourself, whether this mean improving your mind or nourishing your spirit, is much like saying you do not have time to stop for gas because you are too busy driving. Self-mastery is the DNA of life mastery.

> Good people strengthen themselves ceaselessly — Confucius

#### Live with Discipline

Willpower is like a muscle, the more you use the stronger it becomes. Don't fall for time wasting / non-important work / bad habits. Wage war against the weaker thoughts that have crept into the palace of your mind. They will see that they are unwanted and leave like unwelcome visitors. Stick with good habits and live a great disciplined life.

> Discipline is the bridge between goals and accomplishment — Jim Rohn

#### Respect your time

Time is non-renewable resource, once lost is lost forever. So utilize time wisely. Great leaders/legends seek learning over entertainment. Have some entertainment don't let it eat the most valuable resource (time). Those who use time wisely from an early age are rewarded with rich, productive and satisfying lives. Those who never been exposed to the principle that 'time mastery is life mastery' will never realize their enormous human potential. Time is the great leveler.

> Well arranged time is the surest mark of a well-arranged mind. — Sir Isaac Pitman

#### Selflessly serve others

The quality of your life ultimately comes down to the quality of your contribution. To cultivate the sacredness of each day, live to give. By elevating the lives of others, your life reaches it's highest dimensions. Practice daily act of kindness.

> The sole meaning of life is to serve humanity — Leo Tolstoy

#### Embrace the present

Happiness is a journey, not a destination. Practice gratitude and be thankful for what you have. Enjoy the tiny little beauty around you and live in the "now" moment to the fullest.

> When I admire the wonder of a sunset or the beauty of the moon, my soul expands in worship of the creator — Mahatma Gandhi

Small victories lead to large victories, Tiny, incremental changes, and improvements such as those I have suggested will create positive habits. Positive habits will create results. And results will inspire you towards greater personal change. Begin to live each day as if it was your last. Starting today, learn more, laugh more and do what you truly love to do. Do not be denied your destiny.

"You sow a thought, you reap an action. Reap an action, you sow a habit. Sow a habit, you reap a character. Sow a character, you reap your destiny."


# Better Yields Best

Published on: 2018-03-26

In this short post, I will cover how powerful habit is and how it can help you achieve your goal.

Habit is a “second natural” thing we can create by consistently doing it for 60 days, even Robin Sharma mentions it in one of his videos.

What is second natural, well when you do an activity for more than 60 days your body and mind register it so well that you should be able to do that activity with ease & much better every next time you do it. An example would be if you program/code on a computer for more than a year, you don’t have to look at the keyboard for typing; it becomes your second natural way to know where the “A” key is with help of muscle memory.

This applies to all professions, if you do a certain activity over and over again you will do it faster, better, & efficient, that it will become your second natural thing.

Now let’s see how can this help you become successful,

1. Set a goal
2. Create a list of activities to achieve your goal
3. Do that activity for 60 days so that it will become a habit

And that helps you achieve your goal in a faster and consistent phase.

You’re not going to get great at anything in a month  —  that’s not the way the world works. But you 100% can get better at anything in a month.

Do it “better” every time it will yield the “best”.

**Bonus Tip:** Create a habit tracker and check-in every day once you achieve it, this will get you motivated to do it every day.

Looking for a minimal habit tracker?

* Tweet this article / Share it on Facebook
* Send your email ID in direct message
* I will share you the sheet which I'm using (screenshot shown below)


# Who is Driving? You (or) Your Mind

Published on: 2019-02-05

If you cut loose and do whatever your brain ask to do then you don't have self-control, less willpower & derived by the misery of brain comfort.

You can counter attack your brain and say I'm in control of what you should do and what you should evolve and get efficient with it. By doing this you get back into that driver seat. Will power is the same as muscles: It gets better if you use it, depletes if you don't work out; same as muscles.

Subconscious patterns degrade/elevate based on repetition, You can create a "new normal" by repeatedly doing some activities for a period of 90 days. If you want to include workout as part of your "new normal", Go for a walk for the next 90 days and it will become your habit.

This is why I'm not going to make any new year resolutions going forward and experiment with 90 days sprint from now on. I will anyways be setting yearly goals, it's just that I will set targeted immediate goals for 90 days and review before the year ends. If things work well one can have 4(90 days) sprints in a year. That means 4 solid habits can be built in a year using this sprint method.

Have you tried 90 days sprint before? If yes, then share your experience on the comment section. Thanks for reading!


# Goals

**Four pillars method for goals** (Came up with this on 2022)

Create goals based on the these 4 categories and track on yearly, monthly and weekly basis.

* Health
* Social / Personal
* Finance
* Career

### SMART Goal Technique

* Specific – The more narrowly defined your goal, the better you will know the steps to achieve it
* Measurable – If your goal is measurable and has a money value, you can track your progress against it.
* Achievable – It is always better to make sure that you can reasonably attain your goal. If it’s not achievable, it will always be out of reach
* Realistic – You should have confidence that you can realistically achieve your goal with all the resources available to you.
* Time-bound – without a time value, a goal becomes open ended, and you could lose the motivation to achieve it


# My Workdesk (Sep 2024)

Updated on Sep 2024

{% embed url="<https://youtube.com/shorts/Dj9evRH3tFE?si=OK_FdDTjWOt0Kgtb>" %}

Table - Custom-made from a local furniture store

Monitor

* Monitor Stand -[ AmazonBasics Dual Monitor Stand - Modular Arm Mount, Aluminum](https://www.amazon.in/gp/product/B079YSGQKW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\&psc=1)
* 27 inch Monitor (4k)  - [Dell S2722QC 27-inch 4K](https://www.amazon.in/Dell-S2722QC-Response-Integrated-Speakers/dp/B09DTDRJWP/ref=sr_1_3?crid=2BYOAONQ2OI7I\&dib=eyJ2IjoiMSJ9.Vub8TSfI7hGdNmytB-c2zEvm9MkU1ADMbHk8wu4k6fRUSU9Iq0Qd0W5nffj2jFEzubND7OQsWbF8le0GEgh3ixtsukw50sTpnuLXxIhEb2fNvTEXvkrXkk6VxfcJQqlCemiAAlp3byw3DSgCQqACwSLyLckVKlnYhOmOdtFzvhpUQGRL9q3ApBh-k-z-7B5harCOi-sgHDumDLW3fNfkhHkwuCePNVqrh_onI_Cf9wE.zREbBVqdsP66J7XkKmYVlor8Db1MEvlu2cIo8qTVpDk\&dib_tag=se\&keywords=dell%2B4k%2Bmonitor%2B27%2Binch\&nsdOptOutParam=true\&qid=1727851220\&sprefix=dell%2B4k%2B%2Caps%2C235\&sr=8-3\&th=1)
* 24 inch Monitor - [Dell 24'' 1920 x 1200](https://www.amazon.in/gp/product/B00NZTKOQI/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\&psc=1)

Microphone - [Blue Yeti USB Microphone](https://www.amazon.in/Blue-Recording-Streaming-Condenser-Adjustable/dp/B08F82B7LJ/ref=sr_1_4?crid=2RPU6AKS3PMTB\&dib=eyJ2IjoiMSJ9.MUoOjyxxZZMlWfmdYIycGS-AK65-pew4a856RjOKWWP3xbBamsCVz8YZ2S7IhJbzjcMMrEk7TsHspJ1kZ4M9bX4UhyGvDkaAUvVAW_GXi7VODqkTy0Qq6lmrXzQwQIzgLRU-abzvol24FWu45RQba00P3WOMbaK5Q8iIFsHFpxLiLfi9ggOoZSPb_ct6yBk_MLO1StFraVyWV2WJBF9UJ9MDXTMxXzgDMMwRdIg8xrCrz5OP7mJR_j133CwtGAi5QJ7gdlwVy1l_fH1g-4szVOiEzyiDOtI5Fe4GRyfOmHk.LVdzxUwaWX89U0ZRTk4toEUSWzTlO16YSKYxX_4JYQw\&dib_tag=se\&keywords=blue+microphone\&nsdOptOutParam=true\&qid=1727851401\&s=computers\&sprefix=blue+microphone%2Ccomputers%2C213\&sr=1-4)

Headphone - [Bose QuietComfort wireless noise-cancelling headphones](https://www.amazon.in/Bose-QuietComfort-Cancelling-Headphones-Bluetooth/dp/B0CCZ26B5V/ref=sr_1_3?crid=3N5L9GFYH8EDD\&dib=eyJ2IjoiMSJ9.pCIyXyl6jitR9GPiizoNP4ZB7iR8pqUoid67yqM6YzUxprPWEY_-2SHy_-g4CvPjgyLqzDT4b6PsdkzqZ2skXcwsRBmfQL5liDc1eNSnYlzC4isGq-t9gmks3qSoTTRf0Yy6f2et6Njidg9Du7e4_9mCPwDRdb0G5VED-mx4Q90KANoZAqUEbmdx8gHEtUP7tVFgtTKbdm67X5ywSF9LQWNJKjo3sLt6ChecCWX5-8o.KO36oAfBFOzC5m7x175lqULcEKUDHYR8bLjK8gaVVv0\&dib_tag=se\&keywords=bose%2Bqc35\&nsdOptOutParam=true\&qid=1727851464\&sprefix=bose%2Bqc35%2Bii%2Bcase%2Caps%2C202\&sr=8-3\&th=1)

Headphone stand - [Ikea Steel Tabletop](https://www.amazon.in/Ikea-Steel-Headset-Tablet-Stand/dp/B07P2MXHBM/ref=sr_1_3?crid=IQJIJ0AZH2WD\&dib=eyJ2IjoiMSJ9.FSWtJU4KeVmis7taLdvh5Nvy9PYFDR54TLzSepgaU-milea95NDIax2AbVRKMSrieGgM6_GDX2iJBlUAyTkkmyRyvaUpsmSSCNT-2NCiGwfq6rJGvgU94x-Ytqzyu2QgjS-Kn8oGtPHRjh6kkESm7oTSwG3Erd-11w07krwhgcRo7ILufkXltIuELuV4iVLgqigBs7BeFAengi_0jeqm3BHaV2hU7FtMWVqWzumlItw.Vj4eiexof4hERm1QT1f_Aiv-lB3cqzvubzger84rqSE\&dib_tag=se\&keywords=ikea+headphone+stand\&nsdOptOutParam=true\&qid=1727851876\&sprefix=ikea+headph%2Caps%2C214\&sr=8-3)

Lamp - [Ikea LED Lamp](https://www.amazon.in/Ikea-TERTIAL-Work-lamp-Dark/dp/B07T4P2RQ3/ref=sr_1_5?crid=23BBRRH8SR53D\&dib=eyJ2IjoiMSJ9.4VfnUlB-Xo-MPL558Pa5OtBYtFT3k1HdU1G9DQTYi_J0RXRmVLwvoZfp7kdhX8kdgCvL1FLQvk9NnPLZf_BfLoWCDWFjkq7A78m4TIeC_E2NwcfsOKPEJ_trF7fGF32OgfMsAwC-nxqrjRPM2gRR7A3hMyF3T5TXg6bZPP4HxaKWZDmnmN2kCaQwUjrItozdUtKPbUw8NLk0k09eIliONOH7lMrObBEYEHZuzsz8-l_XKAhk7FE54EU0t_yxPtszhM7X6fKCR9DuADr1tcf7PyxEqGqjsvrI4V17e15xdYo.4q3s4ueJxrrd72l03uOp-pYQK5X3LTSesnnMdbdNy_o\&dib_tag=se\&keywords=ikea+lamp\&nsdOptOutParam=true\&qid=1727851558\&sprefix=ikea+lamp%2Caps%2C219\&sr=8-5)

Keyboard - [Apple Magic Keyboard (Black](https://www.apple.com/shop/product/MMMR3LL/A/magic-keyboard-with-touch-id-and-numeric-keypad-for-mac-models-with-apple-silicon-us-english-black-keys?fnode=0e8e82e8d5727d430729e6300ba1dbd620a0d89da3fc30607d798663e78fd50d146955de343375fbfe593b745c1204927791eb595050164fc4b9334581b2febadd471dce0e063daa28845ff47be727a32c0b2517d1a1c43286b6b2ea5c4a758c))

Mouse - [Logitech MX Master 2s](https://www.amazon.in/gp/product/B071YZJ1G1/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\&th=1)

Standing Table - [Wooden wall-mounted folding study table](https://www.amazon.in/gp/product/B0CP59RBVV/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8\&th=1)

Mackbook Pro M2

iPad Air (5th generation)

Samsung Speaker

&#x20;


# SublimeText Plugins  —  I Use

Published on: 2014-07-07

My favorite, timesaving & productive plugins

I know Sublime Text from the very beginning when they release it’s first public beta version. The best parts of sublime text is the performance, light weight, minimal layout, last and the best one is the ‘plugins’ — which saves a lot of time and helps use the IDE very effectively to boost the productivity

This article I’m sharing the plugins which I use everyday. You can have a look at the plugin repo here [here](https://packagecontrol.io/)

#### 1. [Package Control](https://packagecontrol.io/packages/Package%20Control)

I don’t know why sublime text app doesn’t comes with this as it’s a necessary feature to install plugins. I mostly use Package control for couple of things

a) To install plugins, all you need to type is “cmd + shift+ p” then “install” to load the repository. Once the repository is loaded you can start typing the plugin name, Hit the return/Enter key; when u find your plugin to install. You can check the installation progress on the status bar in the bottom.

b) To highlight syntax of CSS for SCSS files. Open the file you want to highlight the syntax, type “shift + cmd + p” and type “css” to highlight the opened file

#### 2. [Emmet](https://packagecontrol.io/packages/Emmet)

Emmet (previously known as Zen Coding) is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow.

In simple words, its just a shorthand for HTML & CSS which saves you from writing more coding. The [cheatsheet](http://docs.emmet.io/cheat-sheet/) show how your shorthand codes will be complied. If you use Emmet, I bet you will never go back.

#### 3. [Browser Refresh](https://packagecontrol.io/packages/Browser%20Refresh)

Save the file you are working on and refresh your browser with one keystroke. Very handy plugin, which does the browser refresh in a clever way.

No need for live reload, no need of any configuration in your project. After editing your code in the editor just press “cmd + shift + r” Browser Refresh will save the current file and refresh the last active tab in the browser for you.

#### 4. [Git Gutter](https://packagecontrol.io/packages/GitGutter)

A plugin to see git diff in your gutter. If you don’t have this plugin you would have doing in the terminal.

GitGutter is very useful to identify the piece of code you have written after the last commit right inside the editor.

#### 5. [Bracket Highlighter](https://packagecontrol.io/packages/BracketHighlighter)

Bracket Highlighter matches a variety of brackets such as: `[], (), {}, <tag></tag>,` and even custom brackets. It will show the visual hint of where your bracket is ending.

This helps a lot in debugging the code by highlighting the scope.

***

I use some other common plugins like [JSLint](https://packagecontrol.io/packages/JSLint), [SublimeLinter](https://packagecontrol.io/packages/SublimeLinter), [SodaDarkTheme](https://packagecontrol.io/packages/Theme%20-%20Soda), [Dracula Color Schema](https://packagecontrol.io/packages/Dracula%20Color%20Scheme), etc,. but I just want to write the most useful top 5 plugins from my preference.

[Tweet me](https://twitter.com/logeshpaul) your favorite SublimeText Plugin


# Code


# Bash

### General

* `pwd` - shows the current directory path
* `ls` - lists the files in the current path
* `touch <filename.extension>` - creates a new file in the current path
* `cd <path>` - checkout to the path

#### Terminal command - Navigate

* `ctrl` + `a` - to move the cursor to the beginning of the line
* `ctrl` + `e` - to move the cursor to the end of the line

#### Terminal command - Delete

* `ctrl` + `w` - to delete the last word
* `ctrl` + `u` - to delete all the way back to the start of the line
* `ctrl` + `k` - to delete to the end of the line

#### Permission

* `sudo chgrp -R admin /usr/local` - set write permission for admin for certain dir
* `sudo chown -R $(whoami) /usr/local` - makes `/usr/local` writeable for the user

#### Port

Find port usage

```sh
 ps -ef | grep puma
```

Kill all processes running on a port

```sh
lsof -ti:9000 | xargs kill 
```

where 9000 is the port number here

#### Advanced

* `ctrl` + `r` - Search through the command history (after pressing, type to search, press ctrl-r repeatedly to cycle through more matches, press Enter to execute the found command, or hit the right arrow to put the result in the current line to allow editing)

**Open VSCode from the terminal**

<figure><img src="/files/YLIEdJBJMYDGuyS6rC4g" alt=""><figcaption></figcaption></figure>

```sh
code .
```


# Regex

#### Matching a specific string

```js
let regex;
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
```

#### Wildcards

```js
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
```

#### Shorthand character classes

```js
regex = /\d/; // matches any digit
regex = /\D/; // matches any non-digit
regex = /\w/; // matches any word character (a-z, A-Z, 0-9, _)
regex = /\W/; // matches any non-word character
regex = /\s/; // matches any white space character (\r (carriage return),\n (new line), \t (tab), \f (form feed))
regex = /\S/; // matches any non-white space character
```

#### Specific characters

```js
regex = /[aeiou]/; // matches any character in square brackets
regex = /[ck]atherine/; // matches catherine or katherine
regex = /[^aeiou]/; // matches anything except the characters in square brackets
```

#### Character ranges

```js
regex = /[a-z]/; // matches all lowercase letters
regex = /[A-Z]/; // matches all uppercase letters
regex = /[e-l]/; // matches lowercase letters e to l (inclusive)
regex = /[F-P]/; // matches all uppercase letters F to P (inclusive)
regex = /[0-9]/; // matches all digits
regex = /[5-9]/; // matches any digit from 5 to 9 (inclusive)
regex = /[a-zA-Z]/; // matches all lowercase and uppercase letters
regex = /[^a-zA-Z]/; // matches non-letters
```

#### Matching repetitions using quantifiers

```js
regex = /(hello){4}/; // matches "hellohellohellohello"
regex = /hello{3}/; // matches "hellooo" and "helloooo" but not "helloo"
regex = /\d{3}/; // matches 3 digits ("312", "122", "111", "12312321" but not "12")
regex = /\d{3,7}/; // matches digits that occur between 3 and 7 times (inclusive)
regex = /\d{3,}/; // matches digits that occur at least 3 times
```

#### Matching repetitions using star and plus

```js
regex = /ab*c/; // matches zero or more repetitions of "b" (matches "abc", "abbbbc", "ac")
regex = /ab+c/; // matches one or more repetitions of "b" (matches "abc", "abbbbc", but not "ac")
```

#### Matching beginning and end items

```js
regex = /^[A-Z]\w*/; // matches "H", "Hello", but not "hey"
regex = /\w*s\$/; // matches "cats", "dogs", "avocados", but not "javascript"
```

#### Matching word boundaries

```js
// positions of word boundaries:
// 1. before the first character in string (if first character is a word character)
// 2. after the last character in the string, if the last character is a word character
// 3. between two characters in string, where one is a word character and the other isn't */
regex = /\bmeow\b/; // matches "hey meow lol", "hey:meow:lol", but not "heymeow lol"
```

#### Groups

```js
regex = /it is (ice )?cold outside/; // matches "it is ice cold outside" and "it is cold outside"
regex = /it is (?:ice )?cold outside/; // same as above except it is a non-capturing group
regex = /do (cats) like taco \1/; // matches "do cats like taco cats"
regex = /do (cats) like (taco)\? do \2 \1 like you\?/; // matches "do cats like taco? do taco cats like you?"
```

#### Branch reset group (available in Perl, PHP, R, Delphi)

```
regex = /(?|(cat)|(dog))\1/; // matches "catcat" and "dogdog"

/* alternative matching */
regex = /i like (tacos|boba|guacamole)\./; // matches "i like tacos.", "i like boba.", and "i like guacamole."

/* forward reference (available in Perl, PHP, Java, Ruby, etc... */
// regex = /(\2train|(choo))+/; // matches "choo", "choochoo", "chootrain", choochootrain", but not "train"
```

#### Lookaheads

```js
regex = /z(?=a)/; // positive lookahead... matches the "z" before the "a" in pizza" but not the first "z"
regex = /z(?!a)/; // negative lookahead... matches the first "z" but not the "z" before the "a"
```

### Lookbehinds

```js
regex = /(?<=[aeiou])\w/; // positive lookbehind... matches any word character that is preceded by a vowel
regex = /(?<![aeiou])\w/; // negative lookbehind... matches any word character that is not preceded by a vowel
```

### Functions I find useful

```js
regex.test("hello"); // returns true if found a match, false otherwise
regex.execute("hello"); // returns result array, null otherwise
"football".replace(/foot/, "basket"); // replaces matches with second argument
```


# Capybara

#### Capybara Actions

```ruby
# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
click_link_or_button 'Save'

# Text (area) field
fill_in 'Name', with: 'Content'

# Checkbox
check 'Content'
uncheck 'Content'

# Radio button
choose 'Content'

# Select option from select tag
select 'Option', from: 'Label'

# File input
attach_file Rails.root.join('spec/fixture/some_file.png')
```

#### Capybara Finders

```ruby
page.all(:xpath, '//a')

page.first(:xpath, '//a')
ruby
page.find('//textarea[@id="additional_newline"]')

page.find(:xpath, "//input[@id='form_pets_dog']")['checked']
# => true

page.find(:css, '#with_focus_event').trigger(:focus)

page.find(:css,'.wrapper').hover

page.find_field("test_field").value
# => 'blah'

page.find_by_id('red').tag_name
# => 'a'

# finds invisible elements when false
page.find_by_id("hidden_via_ancestor", visible: false)

page.find_button('What an Awesome')[:value]
# => 'awesome'

page.find_link('abo').text
# => 'labore'

page.find_link('other')[:href]
# => '/some_uri'
```

**Note:** `find` will wait for an element to appear on the page, as explained in the Ajax section. If the element does not appear it will raise an error.

**Note:** In XPath the expression `//` means something very specific, and it might not be what you think. Contrary to common belief, `//` means "anywhere in the document" not "anywhere in the current context".

#### Capybara Scoped Finder `within`

```ruby
within(search_form) do
  fill_in 'Name', with: 'iOS 7'
  click_button 'Search'
end

def search_form
  '.search_form'
end

within_fieldset("villain_fieldset") do
  # ...
end

within_table("some_table") do
  # ...
end

# Execute the given block within the given iframe using given frame name or index.
#
within_frame('some_frame') do
end

save_page

# You need to install launchy gem.
save_and_open_page
```

#### Capybara Common

```ruby
visit("http://google.com")

page.current_url

# Execute the given script, not returning a result. This is useful for scripts that return
# complex objects, such as jQuery statements. +execute_script+ should be used over
# +evaluate_script+ whenever possible.
#
page.execute_script("$('#change').text('Funky Doodle')")

# Evaluate the given JavaScript and return the result. Be careful when using this with
# scripts that return complex objects, such as jQuery statements. +execute_script+ might
# be a better alternative.
#
page.evaluate_script("1+3")
# => 4

using_wait_time 6 do
  # ... Changed Capybara.default_wait_time in this block scope.
end
```

#### Capybara Matchers

```ruby
expect(page).to have_content("Some Content")
expect(page).to have_no_content("Some Content")

# True if there is a anchor tag with text matching regex
expect(page).to have_xpath("//a")
expect(page).to have_xpath("//a",:href => "google.com")
expect(page).to have_xpath("//a[@href => 'google.com']")
expect(page).to have_xpath("//a[contains(.,'some string')]")
expect(page).to have_xpath("//p//a", :text => /re[dab]i/i, :count => 1)

 # can take both xpath and css as input and can take arguments similar to both have_css and have_xpath
 expect(page).to have_selector(:xpath, "//p/h1")
 expect(page).to have_selector(:css, "p a#post_edit_path")

 expect(page).to have_css("input#post_title")
 expect(page).to have_css("input#post_title", :value => "Capybara cheatsheet")

 # True if there are 3 input tags in response
 expect(page).to have_css("input", :count => 3)

 # True if there or fewer or equal to 3 input tags
 expect(page).to have_css("input", :maximum => 3)

 # True if there are minimum of 3 input tags
 expect(page).to have_css("input", :minimum => 3)

 # True if there 1 to 3 input tags
 expect(page).to have_css("input", :between => 1..3)

 # True if there is a anchor tag with text hello
 expect(page).to have_css("p a", :text => "hello")
 expect(page).to have_css("p a", :text => /[hH]ello(.+)/i)

# For making capybara to take css as default selector
Capybara.default_selector = :css

# checks for the presence of the input tag
expect(page).to have_selector("input")

# checks for input tag with value
expect(page).to have_selector("input", :value =>"Post Title")

expect(page).to have_no_selector("input")

# For making capybara to take css as default selector
Capybara.default_selector = :xpath
# checks for the presence of the input tag
expect(page).to have_selector("//input")

# checks for input tag with value
expect(page).to have_selector("//input", :value =>"Post Title")

# checks for presence of a input field named FirstName in a form
expect(page).to have_field("FirstName")

expect(page).to have_field("FirstName", :value => "Rambo")
expect(page).to have_field("FirstName", :with => "Rambo")

expect(page).to have_link("Foo")
expect(page).to have_link("Foo", :href=>"googl.com")
expect(page).to have_no_link("Foo", :href=>"google.com")
```


# Chrome

#### Enable developer tools

* `Command (⌘)` + `Option` + `i` - Mac
* `Ctrl` + `Alt` + `i` - Windows

#### Toggle the developer dock between the bottom & right

* `Command (⌘)` + `Shift` + `d` - Mac
* `Ctrl` + `Shift` + `d` - Windows

#### Toggle the Javascript console when the developer tool is open

* `esc` - Mac & Windows

#### Tabs

* `Command (⌘)` + `Shift` + `[` - Navigate to the left tab
* `Command (⌘)` + `Shift` + `]` - Navigate to the right tab
* `Ctrl` + `Tab` - Navigate from the next tab
* `Ctrl` + `Shift` + `Tab` - Navigate from the previous tab
* `Ctrl` + `w` - Close tab
* `Command (⌘)` + `Shift` + `t` - Undo close tab


# CSS

### Table of Contents

* [Selectors](#selectors)
* [Clearfix](#clearfix)
* [Font](#font)
* [Font Antialiasing / Smoothing](#font-antialiasing-smoothing)
* [Background](#background)
* [Custom Selectbox](#custom-selectbox)
* [CSS Selection](#css-selection)
* [Placeholder Styling](#placeholder-styling)
* [Truncate String with Ellipsis](#truncate-string-with-ellipsis)
* [Default list styling](#default-list-styling)
* [Use `:not()` to Apply/Unapply Borders on Navigation](#use-not-to-apply-unapply-borders-on-navigation)
* [IE Browser-Specific Conditions](#ie-browser-specific-conditions)

#### Selectors

```css
[attr="value"]       /*  =   exact */
[class~="box"]       /*  ~=  has word */
[class|="icon"]      /*  |=  exact, or prefix (eg, value-) */
[href$=".doc"]       /*  $=  ends in */
[class*="-is-"]      /*  *=  contains */

h3 + p               /*  +   adjacent sibling */
article ~ footer     /*  ~   far sibling */
.container > .box    /*  >   direct child */

:target (h2#foo:target)
:disabled

:nth-child
:nth-child(3n)
:nth-child(3n+2)
:nth-child(-n+4)
:nth-last-child(...)

:first-of-type
:last-of-type
:nth-of-type
:only-of-type   - only child of its parent thats like that

:only-child
```

#### Clearfix

```css
.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}
*html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
```

#### Font

```css
font: italic 400    14px     / 1.5       sans-serif;
/*    ^      ^      ^        ^           ^
      style  weight size*    line-height family
                    required             required */
```

#### Font Antialiasing / Smoothing

```css
* {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Support - Firefox 25+ on OSX, Webkits (Chrome, Safari, etc) */
```

Ref - [Link](http://maxvoltar.com/archive/-webkit-font-smoothing)

#### Background

```css
/* Shorthand */
background: #ff0  url(bg.jpg) left top      / 100px auto no-repeat fixed;
background: #abc  url(bg.png) center center / cover      repeat-x  local;
/*          ^     ^           ^             ^            ^         ^
            color image       position      size         repeat    attachment */

/* Multiple backgrounds */
background:
  linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
  url('background.jpg') center center / cover,
  #333;

/* Other properties */
background-clip: border-box | padding-box | content-box [, ...]*; /* IE9+ */
background-repeat: no-repeat | repeat-x | repeat-y;
background-attachment: scroll | fixed | local;
background: url(x), url(y); /* multiple (IE9+) */
```

#### Custom Selectbox

Note: only works with webkit browsers, others will give you fallback.

```css
select {
  -webkit-appearance: button;
  -webkit-border-radius: 2px;
  -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-padding-end: 20px;
  -webkit-padding-start: 2px;
  -webkit-user-select: none;
  background-image: url(../images/select-arrow.png),
  -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
  background-position: center right;
  background-repeat: no-repeat;
  border: 1px solid #AAA;
  color: #555;
  font-size: inherit;
  margin: 0;
  overflow: hidden;
  padding-top: 2px;
  padding-bottom: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
```

#### CSS Selection

```css
::selection {
  background-color: yellow;
}
::-moz-selection {
  background-color: yellow;
}
```

#### Placeholder Styling

```css
/* chrome, safari */
::-webkit-input-placeholder {
  color:#CCC;
  font-style:italic;
}

/* mozilla */
input:-moz-placeholder,
textarea:-moz-placeholder {
  color:#CCC;
  font-style:italic;
}

/* ie (faux placeholder) */
input.placeholder-text,
textarea.placeholder-text  {
  color:#CCC;
  font-style:italic;
}
```

#### Truncate String with Ellipsis

All the following are required, so the text must be in a single straight line that overflows a box where that overflow is hidden.

```css
.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
```

More techniques [here](https://software.intel.com/en-us/html5/hub/blogs/ellipse-my-text/), including multi-line ellipsis.

#### Default list styling

```css
ul {
  margin:0 0 1.5em 0;
}
ul {
  list-style-type:disc;
  margin-left:1.3em;
}
ol {
  list-style-type:decimal;
  margin-left:2em;
}
ol li {
  list-style-type:decimal;
  display:list-item;
}
ul li {
  list-style-type:disc;
}
ul ul li {
  list-style-type:circle;
}
ul ul ul li {
  list-style-type:square;
}
ol ol li {
  list-style-type:lower-alpha;
}
ol ol ol li {
  list-style-type:lower-roman;
}
dl {
  margin:0 0 1.5em 0;
}
dl dt {
  font-weight:bold;
}
dd {
  margin-left:1.5em;
}
```

#### Use `:not()` to Apply/Unapply Borders on Navigation

Instead of putting on the border...

```css
/* add border */
.nav li {
  border-right: 1px solid #666;
}
```

...and then taking it off the last element...

```css
/* remove border */
.nav li:last-child {
  border-right: none;
}
```

...use the `:not()` pseudo-class to only apply to the elements you want:

```css
.nav li:not(:last-child) {
  border-right: 1px solid #666;
}
```

Sure, you can use `.nav li + li` or even `.nav li:first-child ~ li`, but with `:not()` the intent is very clear and the CSS selector defines the border the way a human would describe it.

#### IE Browser Specific Conditions

The following table describes the operators that can be used to create conditional expressions.

| Item | Example                   | Comment                                                                                                                                           |
| ---- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| !    | \[if !IE]                 | The NOT operator. This is placed immediately in front of the feature, operator, or subexpressionto reverse the Boolean meaning of the expression. |
| lt   | \[if lt IE 5.5]           | The less-than operator. Returns true if the first argument is less than the second argument.                                                      |
| lte  | \[if lte IE 6]            | The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument.                                 |
| gt   | \[if gt IE 5]             | The greater-than operator. Returns true if the first argument is greater than the second argument.                                                |
| gte  | \[if gte IE 7]            | The greater-than or equal operator. Returns true if the first argument is greater than or equal to the second argument.                           |
| ( )  | \[if !(IE 7)]             | Subexpression operators. Used in conjunction with boolean operators to create more complex expressions.                                           |
| &    | \[if (gt IE 5)&(lt IE 7)] | The AND operator. Returns true if all subexpressions evaluate to true                                                                             |
|      |                           | css\[if (IE 6)                                                                                                                                    |


# Git

### Table of Contents

* [Getting Started](#getting-started)
* [Global User Configuration](#global-user-configuration)
* [Create New Git Project](#create-new-git-project)
* [Add files to Existing Repo](#add-files-to-existing-repo)
* [Generate SSH](#generate-ssh)
* [Stash](#stash)
* [Branch](#branch)
* [Merge & Rebasing](#merge-and-rebasing)
* [Commit](#commit)
* [Tags](#tag)
* [Amend last remote commit](#amend-last-remote-commit)
* [Multiple github accounts](#multiple-github-accounts)
* [Remote](#remote)
  * Adding a remote
  * View remote
  * Removing remote
* [Avoid git push requires username, password every time](#avoid-git-push-requires-username-password-everytime)
* [Move git files with commits from old to new repo](#move-git-files-with-commits-from-the-old-to-the-new-repo)

#### Getting Started

```sh
# initialize git in the path
  git init

# clone a existing repo
  git clone git@github.com:<github-username>/<repository-name>.git
```

#### Global User Configuration

```bash
# global config
  git config --global user.name <github-username>
  git config --global user.email <your_email_id@domain.com>
  git config --global color.ui true
```

#### Create New Git Project

Before going to terminal, create new repository in github website & note down the `<repository-name>`

```bash
# steps
  mkdir <new-git-project>
  cd <new-git-project>
  git init
  touch README
  git add README
  git commit -m "first commit message"
  git remote add origin git@github.com:<github-username>/<repository-name>.git
  git push origin master
```

#### Add files to Existing Repo

Navigate to your file location on terminal and add remote

```bash
cd <existing-git-repo>
git remote add origin git@github.com:<github-username>/<repository-name>.git
```

#### Generate SSH

```bash
# generating SSH
  cd `./ssh`
  ssh-keygen -t rsa -C "your_email_id@domain.com"

# copying SSH Key
  pbcopy < ~/.ssh/id_rsa.pub
```

#### Stash

Stashing is the term git uses for saving your changes before taking pull.

```bash
# save / stash your changes
  git stash save "<stash-name>"

# list of stashed changes
  git stash list

# retrieve / put back stashed changes
  git stash apply stash@{index} # where index is the position of stash shown in stash list

# delete stashed/saved changes
  git stash drop "<stash-name>"
```

Note: `<stash-name>` is needed if you work on multiple saves otherwise you can skip and type `git stash` to save and `git stash apply` or `git stash pop` to retrieve.

#### Branch

```bash
# create a new branch
  git checkout -b <branch-name>
  git push origin <branch-name> --set-upstream

# show branches
  git branch

# show local & remote branches
  git branch -a

# get a remote branch
  git fetch origin
  git checkout --track origin/<branch-name>

# merge branch
  git merge <branch-name>

# list merged branches
  git branch -a --merged

# delete local remote-tracking branches
  git remote prune origin

# delete local branch
  git branch -D <branch-name>

# delete remote branch
  git branch -r -d <branch-name>

# delete local & remote branch
  git push origin --delete <branch-name>
```

#### Merge & Rebasing

Branches are good for developing features to your software, the below steps walk you through creating, rebasing and merging.

Creation

```bash
# from master branch create your feature branch
  git checkout -b <feature-branch>

# checkout/navigate to your branch
  git checkout <feature-branch>

# make changes, commit and push
  git add -A
  git commit -m "new feature updates"
  git push origin <feature-branch>
```

Rebasing — Rebase to make sure we sync our feature branch with master

```bash
# navigate/checkout to master
  git checkout master

# pull to get latest code update
  git pull origin master

# navigate back & rebase
  git checkout <feature-branch>
  git rebase master

# incase of conflict, make changes and just add (don't commit)
  git add -A
  git rebase --continue

# once the rebase is completed, do force push
  git push origin <feature-branch> --force-with-lease
```

Squash — all you branch commits to one commit with meaningful message

```bash
# Method 1
  git reset origin/<branch-you-branched-from> # usually `git reset origin/master`
  git add --all
  git commit -m "new feature / bug detail"
  git push origin <branch-name> --force-with-lease

# Method 2
  git checkout master
  git merge --squash <feature-branch> # at this point everything is merged, not committed
  git add -A
  git commit -m "Feature"
  git push origin master
```

Merge your branch to master

```bash
# checkout/navigate to master branch
  git checkout master

# merge your code to master. PS. using this will auto-close PR
  git merge <feature-branch>
  git push origin master

# delete your branch
  git branch -D <feature-branch>
```

#### Commit

```bash
# delete last remote commit
  git reset --hard HEAD~1
  git push origin HEAD --force-with-lease

# delete local commits
  git reset --hard HEAD~1

# rollback latest remote commit
  git reset --hard HEAD^

# rollback to a specific commit
  git reset --hard <commit-sha>

# amend last commit message
  git commit --amend --author="<github-username>"

# amend last commit message
  git commit --amend -m "New commit message"
```

#### Tag

```bash
# create a new tag
  git tag -a v1.0.0 -m "my version 1.0.0"

# show tag details
  git show <tagname>

# push tag to remote
  git push origin <tagname>

# list tags
  git tag
  git tag -l "v1.8*" # show all tags starting with 1.8

# delete tag
  git tag -d <tagname> #local
  git push origin --delete <tagname> #remote
```

#### Amend last remote commit

```bash
git reset --soft HEAD^ # Reset branch head to previous commit.
git stash # Stash the last commit.
git push -f origin <branch-name> # Force push to remote. The remote now doesn't have the last commit.
git stash pop # Pop your stash.
git commit -a # Commit cleanly.
git push origin <branch-name> # Push to remote.
```

#### Multiple github accounts

```bash
# add new account for company
  ssh-keygen -t rsa -C "company_email_id@domain.com"
  ~/.ssh/id_rsa_company

# create config
  touch ~/.ssh/config
  vim config

# Config file content should have
  # default account
  Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

  # company account
  Host github-COMPANY
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_company

# Do it on github website - add ssh keys to github account

# add origin for projects
  git remote add origin git@github-COMPANY:<github-username>/<repository-name>.git
```

Reference — [Nettuts](http://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574), [Arnaudrinquin](http://arnaudrinquin.github.io/worflow/2014/03/11/fast-github-account-switch/)

#### Remote

**Adding a remote**

To add a new remote, navigate to project path in terminal.

The `git remote add` command takes two arguments:

* A remote name, for example, `origin`
* A remote URL, for example, `https://github.com/user/repo.git`

```bash
# Set a new remote
git remote add origin https://github.com/user/repo.git

# Push to repo
git push -u origin master
```

**View remote**

```bash
git remote -v
# returns existing remote
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)
```

**Remove remote**

```bash
git remote remove origin
# or
git remote rm origin
```

#### Avoid git push requires username, password everytime

A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking the ssh button left to the URL field and updating the URL of your origin remote like this:

```bash
git remote set-url origin git@github.com:username/repo.git
```

#### Move git files with commits from the old to the new repo

Navigate to the old repo path eg. `cd /works/old-repo/`

```sh
# remove old remote
  git remote rm origin

# make sure remote is empty
  git remote -v

# add new repo remote
  git remote add origin git@github.com:<github-username>/<new-repo-name>.git

# push your changes to new repo with commits
  git push -u origin --all

# add origin for projects
  git remote add origin git@github-COMPANY:<github-username>/<repository-name>.git
```


# Mac

### Table of Contents

* [Finder](#finder)
* [Capturing Screenshot](#capturing-screenshot)
* [Separators for the Mac OSX Dock](#separators-for-the-mac-osx-dock)
* [Show/Hide hidden files in your mac](#show-hide-hidden-files-in-your-mac)
* [Make a file hidden on your mac](#make-a-file-hidden-on-your-mac)

#### Finder

* Show/Hide dock - `Command (⌘)` + `Option` + `d`
* Change folder view - `Command (⌘)` + `1`, use 2,3,4,5
* Focus Spotlight Search - `Command (⌘)` + `space`

#### Capturing Screenshot

* Capture full screen `Command (⌘)` + `Shift` + `3`
* Capture specific app window `Command (⌘)` + `Shift` + `4` then `space`
* Capture specific region `Command (⌘)` + `Shift` + `4`
* Capture specific regions and then copy them to the clipboard `Ctrl (^)` + `Command (⌘)` + `Shift` + `4` (PS. It doesn't save the screenshot on the desktop, it just stays in your clipboard)

#### Separators for the Mac OSX Dock

In examining the strings inside the Dock binary in Leopard, I found a way to add real separators to the dock, instead of adding dummy applications with empty or decorative icons

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Run the following commands from the Terminal.

```
defaults write com.apple.dock persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }'
killall Dock
```

copy and paste the code in the terminal as many times as to add new space/separators 3. You can now drag the empty spaces to where you want them, or right-click on them and select "Remove from Dock" if you no longer need them.

#### Show/Hide hidden files in your mac

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Copy/Paste the following commands into the Terminal window

   ```
   defaults write com.apple.finder AppleShowAllFiles TRUE
   killall Finder
   ```
3. If you want to Hide the hidden files set it to `FALSE`

   ```
   defaults write com.apple.finder AppleShowAllFiles FALSE
   killall Finder
   ```

#### Make a file hidden on your mac

1. Open terminal hit `Command (⌘)` + `space` & type terminal and hit return.
2. Copy/Paste the following commands into the Terminal window

   ```
   chflags hidden /path/to/file-or-folder
   ```
3. In case if you want to unhide the file

   ```
   chflags nohidden /path/to/file-or-folder
   ```


# Atom

#### Brackets

* `Control` + `m` - go to the matching bracket
* `Control` + `Command (⌘)` + `m` - select inside brackets

#### Quick Navigation

* `Command (⌘)` + `p` - search in the project folder and helps open the file
* `Command (⌘)` + `b` - Search in open files and helps focus

#### Tags

* `Option` + `Command (⌘)` + `.` - close HTML tag


# Ruby

The command `which -a ruby` will show you where Ruby is installed.

```sh
which -a ruby
```

### Save user and modify

```sh
u = User.find_by(email: "<EMAIL>")

# Then run commands like below
# u.access_locked = false
# u.access_locked?
```

### DB Dump Steps

```sh
# Create DB via PgAdmin App
pg_restore --port 5432 --username logeshpaul --dbname mdr_staging --no-password --verbose /Users/logeshpaul/Downloads/
.env file DATABASE_NAME_DEVELOPMENT=mdr_staging
./bin/dev

# Alternate Method shared by Lordson
psql DB_NAME < sce_dump.sql
```

### Time

```ruby
# current time
Time.now # 2009-06-24 12:39:54 +0900

# Return Time string with certain format - dd-Mon-yyyy HH:MM am/pm
"%d-%b-%Y %-l:%M%P" # 27-Jan-2016 7:19am
"%d/%m/%Y %-l:%M%P" # 27/01/2016 7:19am
```

More about Time API - [Link](https://ruby-doc.org/core-2.2.3/Time.html)

### Changing the format of Date & Time

```ruby
<%= Time.now.strftime("%m/%d/%Y") %>
<%= DateTime.now.strftime("%m/%d/%Y") %>

<%= DateTime.now.strftime("%e-%b-%Y %m:%M %p %Z") %>
# outputs - 12-Feb-2016 07:05 PM IST
```

In case you want a custom format use [Strftime](https://www.foragoodstrftime.com/)

### **Populate projects and studies in sce**

```ruby
rake sycamore:dashboard:seed[1,1,50,50,50]
```

### **Enable / Disable Form, Codelist, etc**

```ruby
rake app:admin:features:enable["Pharma","new_vrep"]
rake app:admin:features:enable["Pharma","new_standard"]
```

### **Enable / Disabled Editor**

```ruby
rails c
a = Organization.last
a.ff_react_editor = true
a.save
```

### **Clear local DB (Like prime for SCE)**

```ruby
rake db:setup db:test:prepare
```

### **Create fixtures in MDR**

```ruby
rails c
StandardFixtures.create
```

### **Run Specs**

```ruby
Run all tests - bundle exec rake spec SPEC_OPTS="--format documentation"
```

### **Run server in production environment**

```ruby
rails s -p 9000 -e production
```

### **Assets**

```ruby
rake assets:clean
rake assets:precompile
rake -T
```

### **Jobs**

```ruby
rake jobs:work
```

### **Rake DB Drop & Prime**

```ruby
rake db:drop db:create db:schema:load
rake db:dev:prime
```

### **PKPD**

```ruby
rake db:drop db:create db:schema:load
engines/pkpd/bin/simulate_deploy.sh
rake db:setup
```

### **Help**

```ruby
rake -T | grep prime
```

### **Rails Console**

```ruby
rails c
```

### **Content tag contact**

```ruby
content_tag :li, class: css_class do
  link_to(text, path, name: name) +
  link_to('', "javascipt:void(0)", class: "CLASSNAME")
end
```

### **Selenium Driver**

Selenium Driver Config steps to test the feature/CSS styles layouts/JS features in action in Chrome browser: (This are just to see whats going in your spec)

**Note: Please do not commit these configs**

1. Add these to your application `Gemfile` within Test group:

```ruby
gem "selenium-webdriver"
gem "chromedriver-helper"
```

2. Run `bundle install` in terminal.
3. In `spec/rails_helper.rb` Comment out line 54 `Capybara.javascript_driver = :webkit`
4. Add below code in `spec/rails_helper.rb` line 53:

```ruby
Capybara.register_driver :selenium_chrome do |app|
	Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

Capybara.javascript_driver = :selenium_chrome
```

5. Run your individual feature spec and see them running in a new Chrome browser.

### **Adding Route**

```ruby
resources :tools do
	collection do
		get :run_now
	end
end

<%= link_to t(".add_new_metadata_source"), run_now_study_tools_path(**@**study), remote: true, class: "”=%>
```

### Checking available routes

```ruby
# All
rake routes
# Search routes
rake routes | grep <routename>
```

### **Misc**

```ruby
rake tmp:clear
rails new projectname
bundle exec rails g controller home
```


# Slack

#### Navigation

* Quick Navigate - `Command (⌘)` + `k`
* Navigate to Direct Message - `Command (⌘)` + `Shift` + `k`

#### Reply

* Mention - `@` followed by username
* React to the last message - `Command (⌘)` + `Shift` + `\`

For more shortcuts press `Command (⌘)` + `/` in slack app


# Husky

Issue while running git operation

```sh
Can't find Husky, skipping pre-commit hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook
```

Solution

```sh
rm -rf .git/hooks/
npm i -D husky
```


# Zsh

Oh-My-Zsh is an open-source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes, and a few things that make you shout...

[Link](http://ohmyz.sh/)

#### Git

* `ga` = `git add`
* `gaa` = `git add --all`
* `gb` = `git branch`
* `gcmsg` = `git commit -m`
* `gcam` = `git commit -a -m`
* `gco` = `git checkout`
* `gcb` = `git checkout -b`
* `gcm` = `git checkout master`
* `gcp` = `git cherry-pick`
* `gd` = `git diff`
* `gf` = `git fetch`
* `gl` = `git pull`
* `gp` = `git push`
* `ggl` = `git pull origin <branch-name>`
* `ggp` = `git push origin <branch-name>`
* `gm` = `git merge`
* `grb` = `git rebase`
* `grbm` = `git rebase master`
* `gst` = `git status`

#### Bower

* `bi` = `bower install`
* `bl` = `bower list`
* `bs` = `bower search`


# Javascript

*JavaScript* was initially created to “make web pages alive”.

The programs in this language are called *scripts*. They can be written right in a web page’s HTML and run automatically as the page loads.

Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run.

## **Utilities**

In single line of code! No more! - \[<https://1loc.dev/]\\(https://1loc.dev/]\\(https://1loc.dev/)>

Compatibility table - \[<https://kangax.github.io/compat-table/es6/]]\\(https://kangax.github.io/compat-table/es6/>])

Run a local web server to run JS modules

```js
# Step 1: Install http-server package 
npm install http-server -g 

# Navigate to the directory 
$ cd /opt/sites/blog 

# Launch HTTP server 
$ http-server 

# Launch HTTP server on port 4000 
$ http-server -p 4000
```

### Concepts

* [Higher Order Function](https://dev.to/atapas/higher-order-functionshof-in-javascript-explain-like-im-five-402f)
  * Composability: function inside a function - that is called functional programming to take the advantage of reusability, less code, etc.,
  * JS high-order function: .map(), .filter(), .reduce(), .find()
  * Higher order functions is not same as callback. Pass as an argument to higher-order function.
* [Debounce](/wiki/code/what-is-debounce)


# Best Practices

## Programming Notes

* In software engineering there are two things you are trying to get right:
  * Software Validation - Did we build the right thing?
  * Software Verification - Did we build the thing right?
* Software simplicity is a prerequisite to reliability.
* A small, simple API is usually also a hallmark of a well-understood problem.


# What is debounce?

## **What is debounce?**

The term **debounce** comes from electronics. When you’re pressing a button, let’s say on your TV remote, the signal travels to the microchip of the remote so quickly that before you manage to release the button, it bounces, and the microchip registers your “click” multiple times.

<figure><img src="/files/UIMDvXPSyaHHXBnK9sh9" alt=""><figcaption></figcaption></figure>

To mitigate this, once a signal from the button is received, the microchip stops processing signals from the button for a few microseconds while it’s physically impossible for you to press it again.

[Codepen](https://codepen.io/ondrabus/pen/WNGaVZN?editors=1111)

```bash
function debounce(func, timeout = 300){
  let timer;
  return (...args) => {
    clearTimeout(timer);
    timer = setTimeout(() => { func.apply(this, args); }, timeout);
  };
}
function saveInput(){
  console.log('Saving data');
}
const processChange = debounce(() => saveInput());
```

```bash
function debounce(func, timeINMS) {
  let timeout;

  return function () {
    clearTimeout(timeout);
    timeout = setTimeout(func, timeINMS);
  };
}

let debouncedHello = debounce(() => console.log("say hello", Date.now()), 800);
```


# Rbenv

rbenv is a version manager tool for the Ruby programming language on Unix-like systems. It is useful for switching between multiple Ruby versions on the same machine and for ensuring that each project

Install via Homebrew

```sh
brew install rbenv ruby-build
```

View list of versions installed

```sh
rbenv versions
```

Set specific version

```sh
rbenv local <version-number> # eg. rbenv local 2.7.2
```

Uninstall version

```sh
rbenv uninstall <version-number> # eg. rbenv uninstall 2.7.2
```

Add the below code to `~/.zshrc` to take Ruby using rbenv

```sh
eval "$(rbenv init - zsh)"
```


# Brew

Run a diagnostic to list all the packages you've installed with Homebrew. You should see Ruby and its dependencies.

```sh
brew list
```

You can uninstall Ruby from Homebrew with `brew uninstall --force ruby`

The `brew autoremove` command will remove unused dependencies.

**Postgres - Start / Stop**

```sh
brew services start postgresql@14
brew services stop postgresql@14
```


# RVM

Uninstall RVM

```shell
rvm implode

# or

rm -rf ~/.rvm

```

And don’t forget to remove the script calls in the following files:

* `~/.bashrc`
* `~/.bash_profile`
* `~/.profile`

And maybe others depending on whatever shell you’re using.


# Design


# Why do we need a design system?

Published on: 2020-05-14

#### Why do we need a design system?

Design is more important than ever. Companies fighting on a hyper competitive global software market can rely only on experience as a key differentiator. Scaling design through hiring, without putting standards in place, is a myth. With every new hire, new ideas for color palettes, typography and patterns appear in the product, growing the inconsistency and increasing the maintenance cost. Every new hire increases the design entropy. There’s only one way to stop the growth of the chaos. Committing to running a design system process. Gradual growth of a design system, equals gradual decline of inconsistency and gradual increase of the speed of software development. Design scales. But it scales only with a design system.

#### Inventory

* **Pattern Inventory:** Eg. Button, Dropdown, Modal, etc.,
  * Take screenshots of design patterns
* **Color Inventory:** A typical source of design inconsistency is the set of colors used across the product portfolio
  * Get the total list of colors used in the application, check variables, inline, etc.,
* **Typography Inventory:** Lack of consistent typographic scale used across the project makes the information architecture convoluted and hard to understand for users.
  * Get the complete list of text styles used in the app (from h1 till small text), check mixins in css preprocessors too.
* **Icons Inventory:** Icons provide the necessary context for user experience and speed up the recognition of key actions in most of the interfaces. Inconsistent usage of icons can lead to extreme confusion of users and increase the maintenance cost
  * Check different libraries, formats, and collect the list.
* **Space Inventory:** Add to your inventory different kinds of grids used across the products and perhaps also dive deep into paddings in the containers to understand any inconsistencies
  * Add different spatial units, grid system, etc.,

#### Get the support of the organization

* Present the key inconsistencies from every category
* Focus on numbers and the influence on the speed of the pro- cess (62 shades of gray, 16 types of buttons, 5 icon libraries etc.)
* Explain why these inconsistencies are detrimental to the experience of users or are negatively affecting the software development process (team)
* Explain that building a design system is an ongoing process and you’d like to build a small team to manage this process Emphasise that building a design system will help the company deliver better experience to the market faster (stack-holders)
* Get a clear yes from both team and stack-holders

#### Multidisciplinary Design Systems Team

You can build the inventory on your own, but you need a team to run the design system as an ongoing process.

* List all the skills needed to successfully fix inconsistencies listed in the inventory & Find people with the necessary skills
* Check the realistic time allocation
* Clarify the roles on the team and the decision making process
* Decide the length of the sprint
* Decide when the team will meet for planning and post-sprint meetings

#### Make Key Decisions and Establish Key Rules and Principles

* Decide whether you’re building the system from scratch or treating one of the products as the foundation of the system.
* Decide whether you’re going to build using existing technologies or introduce a new technology.
* Decide how you’re going to distribute the system
* Decide what are the KPIs of the system
* Formulate your design principles
  * Higher consistency of interactions
  * Better craftsmanship?
  * Faster implementation?
  * More accessible UIs?

#### Build the Color Palette

* Use the color inventory to identify the primary/base colors
* Decide on the naming convention
* Test how the new palette affects the interface
* Check the contrast between colors in new UI. Make sure you comply with WCAG guidelines

#### Build the Typographic Scale

* Build a consistent typescale
  * Font size, font weight, line height
* Test the new typeface and showcase to team

#### Build icons library

* Decide which icons from the interface inventory should become part of the system
* Finalize the icons library to be used in a design system and add it to design system documentation

Products constantly evolve and so should patterns in the design system. Don’t aim at finalizing all the patterns in a single sprint or even a series of sprints. Take them one by one and make sure they are implemented by product teams so you can gradually correct all the inconsistencies and increase the speed of product development.

**Credits:** I haven't wrote the content for this post, it's copied from the book "The Actionable Guide to Starting Your Design System: The 100-Point Checklist" by Marcin Trender. I have skipped some sections Marcin has created and keeping this here in my website for future updates as my knowledge grows & serve as a reference.


# Health


# Facts about getting fit

1. You can't out-exercise a bad diet. It's more effective to avoid eating 100 calories than it is to burn it.
2. A pound of muscle burns 4-7 extra calories a day. Wanna burn fat in your sleep? Build muscle.
3. If you want to build muscle you need to learn progressive overload.
4. Don't rely on cardio to burn fat. Do it because it makes your brain & mood better. Cardio is like Intraday, Building muscle is like long-term investing to burn calories.
5. You don't need to have a six-pack. Just get your body to a level where you can be confident & prevent disease.
6. What you eat has an effect on your mental health. Food affects your mood.
7. Eating healthy is a ratio, not an event. Get 90% of your calories from nutrient-dense foods & 10% from fun sources.
8. Eat .8 to 1g of protein per lb of body weight to build & maintain muscle.
9. Volumize your meals with vegetables & water makes you feel fuller.
10. A diet is meant to be a lifestyle. Choose a diet that best fits how you live life.
11. Your focus should not be to lose weight as fast as possible. It should be to lose it in a sustainable way.
12. It's not about losing weight. It's about losing body fat & building muscle.
13. If you're gaining weight you're in a calorie surplus. If you're losing it's because you're in a deficit.
14. All diets that help you lose weight are because they make you eat fewer calories.
15. How you eat is as important as what you eat. Eat slowly & mindfully.
16. Weigh & measure yourself frequently, track your workouts & track your food. What you measure is what you manage.
17. Warm up with dynamic stretches & bodyweight exercises to boost performance.
18. Don't eat until you're stuffed. Eat until you're not hungry anymore.
19. Make light weights feel heavy. This keeps your form tight & your joints healthy.
20. Sleep is the lead domino for recovery, energy & appetite control. Make it a priority.
21. As you get in shape you must change your identity. Don't set a goal. Become the goal.


# TDS and its Role in Drinking Water

"Water is the most critical resource issue of our lifetime and our children’s lifetime. The health of our waters is the principal measure of how we live on the land." – Luna Leopold

The mineral water we drink today is not as pure as we would want it to be. Riddled with impurities, contaminants, and chemicals, a glass of water can prove to be harmful if not appropriately purified. When it comes to understanding water and its components, you must understand TDS.

**What is TDS**

TDS stands for Total Dissolved Solids and refers to the total concentration of dissolved substances in drinking water. TDS comprises inorganic salts and a small amount of organic matter as well. Inorganic salts are made up of positively charged cations (calcium, magnesium, potassium, and sodium) and negatively charged anions (carbonates, nitrates, bicarbonates, chlorides, and sulfates). The TDS level is how much of the total dissolved solids are present in the water.

**Importance of TDS in Drinking Water**

TDS in drinking water originates from places like natural sources, sewage, urban run-offs, industrial wastewater, chemicals in the water treatment process, chemical fertilizers used in the garden, and plumbing. Water is a universal solvent and easily picks up impurities and can absorb and dissolve these particles quickly. Although elevated levels of TDS in drinking water are not a health hazard, it does lend the water a bitter, salty, or brackish taste. Calcium and magnesium, two minerals commonly found in TDS, can also cause water hardness, scale formation, and staining.

**What are Different TDS levels?**

The TDS level helps indicate whether the drinking water is fit for consumption, requires filtration, or is highly contaminated. Parts per million (PPM) is the measurement used for measuring TDS level in the water.

TDS Level Chart for Drinking Water. TDS in Water (measured in PPM)

* 50-150: Excellent for drinking
* 150-250: Good
* 250-300: Fair
* 300-500: Poor, not good for drinking
* Above 1200: Unacceptable

**Why Should You Measure TDs Levels** Naturally, mineral water has no smell or taste. A change in the TDS level changes the texture and taste, making the water unfit for consumption. Some of the reasons why you should measure the TDS level of your drinking water are:

* Taste (high TDS level can make the water salty and/or bitter).
* Health Concerns (water with high TDS level will not have a drastic impact on your health but the high level of lead or copper can make you fall sick).
* Cooking (TDS level above 1000 PPM can change the way the food tastes).

**FAQs:**

* What is the best TDS level for drinking water? Ans: Generally, the TDS level between 50-150 is considered the most suitable and acceptable.
* Is Low TDS level bad or harmful to health Ans: If the TDS level is about 1000 PPM, it is unsafe and unfit for human consumption.
* What TDS level Bisleri maintains in water? Ans: Bisleri water maintains a TDS level of 120 PPM, making it safe to drink.

**TDS Meter you can Purchase**

* [Konvio Neer](https://www.amazon.in/gp/product/B08HSN58RK/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8\&psc=1)


# Gut

* Gut microbiome - ecosystem which break down food, product important nutrients, regulate immune system and fight against harmful germs
* Env, Antobiotics, C-section
* Diet - Pay attention to what we eat can change the diversity
* Dietary fiber - fruits, veg, nuts, legumes, whole grains is the best fuel for gut bacteria
* When bacteria break down fiber it produces short chain fatty acids that nourish the gut barrier, improve immune function, prevent inflammation which reduces the risk of cancer.
* More fiber you ingest the more fiber-digesting bacteria colonize your gut.
* Fast food increases inflammation, decrease in butyrate. Low fiber means less fuel for the gut bacteria. Starving to die off. This creates less bacteria and hungry bacteria even feed on mucus lining.
* Fruits, Veg, Tea, Coffee, Red wine, Dark chocolate increased bacterial diversity. These foods contains Polyphenols - naturally occurring antioxidant compounds.
* Minimally process, less cooked is more beneficial.
* Probiotics - Fermented foods - Lactobacillus, Bifidobacteria. Yogurt, Curd, etc.

*References:*

* [Gut Health](https://in.pinterest.com/mprince5/gut-health/)
* [Gut Warning Signs](https://avocadu.com/unhealthy-gut-warning-signs/)

**Simple explanation**

* Calorie in < Calorie Out = Weight loss
* More exercise, Eat less = Weight loss


# Mind


# Behaviour

* [Diderot effect](https://en.wikipedia.org/wiki/Diderot_effect) - end up upgrading your entire living room just because you upgraded your TV
* [Hedonic treadmill](https://en.wikipedia.org/wiki/Hedonic_treadmill) - When we achieve something and feel happy, we quickly adapt, and lose that happiness — we then try to achieve something else, and the cycle repeats, creating hedonic treadmill.


# Evolving Brain

* The brain is actually plastic or moldable. This means that the brain physically changes throughout the course of our lives, not just in childhood.
* What molds our brain? Experience.
* Experience actually change the physical shape of the brain even in old ages.
* When we undergo an experience, our brain cells - called neurons become active / fire.
* The way in which particular circuits in the brain are activated determines the nature of our mental activity. When neurons fire together they grow new connections between them. Overtime, the connections that result from firing leads to "rewiring" in the brain.


# The Law of Wasted Effort

Do you know that lions only succeed in a quarter of their hunting attempts — which means they fail in 75% of their attempts and succeeds in only 25% of them.

Despite this small percentage shared by most predators, they don't despair in their pursuit and hunting attempts.

The main reason for this is not because of hunger as some might think but it is the understanding of the “Law of Wasted Efforts” that have been instinctively built into animals, a law in which nature is governed.

Half of the eggs of fishes are eaten... half of the baby bears die before puberty... most of the world's rains fall in oceans... and most of the seeds of trees are eaten by birds.

Scientists have found that animals, trees, and other forces of nature are more receptive to the law of "wasted efforts".

Only humans think that the lack of success in a few attempts is failure... but the truth is that: we only fail when we "stop trying".

Success is not to have a life free of pitfalls and falls... but success is to walk over your mistakes and go beyond every stage where your efforts were wasted looking forward to the next stage.

If there is a word that summarizes this world, it will simply be: continue all over again.

Be Inspired!


# Personal


# Vision and Values

## Core Values

I believe in being **honest** in my words and actions, showing **compassion** for all people and creatures, expressing **gratitude** for life's blessings, demonstrating **courage** in the face of adversity, and accepting **responsibility** for my choices. These values guide me as I strive to make a positive impact in the world and live fulfilling lives.

### Be Compassionate

Treat everyone I encounter with compassion, seeing the humanity behind their problems and experiences.

### Be Mindful

Hell yes or no

### Listen First

Never judge, listen before you talk.


# Learning From My First Startup

Published on: 2018-04-29

I always had these sparking thought in my mind about starting something new to serve the users right after I gained 2 years of experience in software industry, I discussed many times with my friends to come up with something to start own and run a business.

Ideas like "Project Management Software - like basecamp 😉", "TechyTees - E-commerce to sell tech printed tees", "Curated best products only e-commerce website", "A Todo App", "Automate House - Refill groceries, clean house, laundry all in one", "Employment School - that teaches what's needed for work than random theories", just to mention a few.

Some of the ideas seem vague now; where I stand with 10 years of experience, but that's okay I'm improving and learning in my own phase.

Note that I used the word idea because I only discussed with few people and it didn't fly. The first startup/side project I worked along with my friends & was able to successfully launch a workable product to market was [TaxOn](https://www.producthunt.com/products/taxon#taxon), without there support this would have been just another idea. So big thanks to Uthira Moorthy, Saravana, Adithya, Deepak, Anuj & Thiyagu who worked really hard to get the product out.

It wasn't well received as I thought it would be, So I'm writing this post to track my understanding & learning about it.

#### Failure Reasons (In my opinion)

* We haven't done proper user research & market fit validation.
* User will only use the app if they want to see the tax calculation (which happens only 2-3 time in a year).
* The bot which we introduced to keep the user retention isn't helpful as many people are not interested to learn about tax saving, finance planning, etc,
* We haven't considered post-release marketing, post-release development to give regular updates. I didn't have the money/time to — market, keep the team working, polishing the product to customer needs.
* Our revenue factor/business model to create "tax saving services" is not that intuitive.

#### Things to consider before startup (Again, In my opinion)

* **Think big, Start small:** Your idea should scale, if your idea can benefit only a few users then it's not enough. So imagine your business can benefit big user base but validate that with a minimum viable product (MVP).
* **Validate idea from random users:** Your idea will seem so fascinating to you & and to your close friends. So don't validate your idea with close friends/relatives; they will say it's awesome anyway. Do proper user research — a) choose your end user b) prepare a list of questions to ask your end user c) go talk to them and collect feedback about the problem your idea solves d) analyze the feedback received and see if people are really interested.
* **Build product for today:** Don't think more futuristic, There are many startups which build awesome IOT products but customers are not really ready to use it today. Create something which users can use today.
* **Solid execution Plan:** There is no such thing as overnight success, success takes years. Be prepared to afford a solid working team for your idea (Starting stages are experimental, you never know which will work)
* **First 20 users:** Try to create a minimal viable product & try to acquire first 20 users(again friends/relatives doesn't really count here). Work with them to get feedback and acquire the next set and keep going. Continue solving user problems and you grow big eventually.
* **Fail Fast:** If you think your idea isn't good enough and not working as expected, don't hold it on your back. Use your time & energy wisely. Shutdown your unsuccessful project.

I hope this might give some insights to you & I wish you all the best for "idea → startup → successful product".

Thanks for reading and share it with your friends.


# Finance


# 5 Finance Advices From The Ancient Richest City Of The World

Published on: 2018-09-02

I heard from many of my readers that my last post **Great Techniques to Self Mastery** which is a summary of what I read on a [book](https://www.goodreads.com/book/show/43877.The_Monk_Who_Sold_His_Ferrari) really helped them gain some insights in 5 minutes rather than reading the whole book(Although I recommend reading the whole book to experience it)

That brings me to writing this post, a quick summary of what I learned from [The Richest Man In Babylon](https://www.goodreads.com/book/show/1052.The_Richest_Man_in_Babylon)

The book fun to read walks you through the old city of Babylon & its stories of greatest men's, yet thought-provoking. Gives you a different perspective of money and how to use them.

Quick fact about Babylon: There where the first civilization to have a Written Language, Engineers, Astronomers, Finance experts, etc., Babylon is an outstanding example of man's ability to achieve great objectives, using whatever means are at his disposal. Babylon got only two resources "Fertile Soil" & "River Water". Not even stones to build walls, Yet it proved to be the richest city in the ancient world.

#### 5 Finance Advices From The Ancient Richest City Of The World:

1. **Save 10% of your income** — be content to keep this portion.
2. **Avoid unnecessary expenses** — What each of us calls our "necessary expense" will always grow to equal our income unless we protest to the contrary.
3. **Improve your skills to increase your income** — Dedicate time for learning & improve your craft. The man who seeks to learn more of his craft shall be richly rewarded.
4. **Choose your investment wisely** — A small return and a safe one is far more desirable than risk. Don't take advice from inexperienced people. The man who invests in business or purpose with which he is not familiar fails mostly.
5. **Put the money to work** — A man's wealth is not in the purse he carries. A fat purse quickly empties if there be no golden stream to refill it.

> I wish an income that will keep flowing into my purse whether I sit upon the wall or travel to far lands.


# Interim Dividend

A dividend that is announced before a company files its annual financial statements is called an interim dividend.

These are announced in between the year - due to reasons like higher quarterly profits, better than expected growth, etc.

On the other hand, a dividend that is announced at the end of a year is called a final dividend.


# Cash Reserve Ratio

Commercial banks have to mandatorily keep a certain minimum amount of deposits as reserves with RBI.

The percentage of cash that is to be kept this way is called the cash reserve ratio.

This money can’t be used for lending or for investment. Nor do the banks receive any interest on this amount. The cash is kept only to make sure that there is money available to banks to deal with any emergencies.


# Dematerialisation

Dematerialisation is the process of converting your physical shares into digital form.

In the pre-digitalisation period, shares were issued in the form of certificates. However, there is a risk of the certificates getting lost, torn or stolen.

After technological achievements, stocks started getting stored in Demat accounts which allow the investor to escape all the hassles mentioned above.

If any investor still has physical shares and wishes to convert them into digital shares, they can do by filling out a dematerialisation request form which is available with depository participants.


