Posts

Simple Meditation

Set small goals, such as meditating for two minutes every morning. When that feels OK, up the time to 5, 10 or 20 minutes. 1) Find a comfortable seat - where you can sit up tall, either crosslegged on the floor or in a chair. Close your eyes or soften the gaze so you are not focusing on anything in particular. Place the hands with the palms down on the tops of the thighs. 2) Take a moment to notice the sensation of sitting - become aware of the ground or chair beneath you, and the parts of your body in contact with them. Now bring your focus to your hands, noticing the weight of them on the thighs, and the feel of the fabric of your clothes.  3) Now begin to notice how your breath feels in your body as you inhale and exhale. Make no effort to change the breath, simply let your natural breath flow in and out. 4) Aim to stay focussed on these sensations of the breath, but when you notice the mind wandering, acknowledge the thought, then come back to the breath again.  5) When yo...

The excerpts I love from the book "The Power of Now"!

I love the Buddha's simple definition of enlightenment as "the end of suffering". The good news is that you can free yourself from your mind. The very thing that gives you pleasure today will give you pain tomorrow, or it will leave you, so its absence will give you pain. Where there is anger, there is always pain underneath. The more you are focused on time - past and future - the more you miss the Now, the most precious thing there is. When you remember the past, you reactivate a memory trace - and you do so now. The future is an imagined Now, a projection of the mind. When the future comes, it comes as the Now. The reason why some people love to engage in dangerous activities, is that it forces them into the Now - that intensely alive state that is free of time, free of problems, free of thinking. Make it your practice to withdraw attention from past and future whenever they are not needed. Be present as the watcher of your mind - of your thoughts and emotions as well ...

The excerpts I love from the book The Monk who sold his Ferrari!

Investing in yourself is the best investment you will ever make. It will not only improve your life, it will improve the lives of all those around you. We might not be able to control the weather or the traffic or the moods of all those around us. But, we most certainly can control our attitude towards these events. Your I can is more important than your I.Q. No matter what happens to you in your life, you alone have the capacity to choose your response to it. By controlling the thoughts that you think and the way you respond to the events of your life, you begin to control your destiny. The boundaries of your life are merely creating of the self. The quality of one's life comes down to the richness of one's thoughts. If you want to live a more peaceful, meaningful life, you must think more peaceful meaningful thoughts. The secret of happiness is simple: find out what you truly love to do and the direct all of your energy towards doing it . Most people live within the confines...

2020 Goals

- EMI free life - 2/3 (inter)national trips - Friendship with books (reading / listening 10 or more books) - Improve my chess rating by 25% on chess.com - Increase my investment / saving rate from 25% to 30+% (ideally 35%) - Physical fitness (continue running at least 5 hrs per week, 4-5 full marathons, 50km long run / cycling) - Mental fitness (continue the idea of keeping myself stress free from the things which I can't control, anger management by not getting irritated on stupid things) I believe, sharing my 2020 goals, will help me achieving those faster as I feel people inspire me in some form like best wishes, social commitment, emotional support, better defining / refining the goals, adding more interesting stuff in wish list, by reminding me about my targets and in so many other ways..! Happy New Year 2020!! Keep on improving / progressing every day / week / month and year..

Custom MySQL Database to Drupal 8 Migration

Image
There are thousands of websites which are using MySQL as database. If we need to migrate data from Websites, which are using MySQL database, to Drupal 8 then we can use this blog post as starting point. We have a sample MySQL Database 'mysql_custom_db' which contains two tables, users and pages. The data in 'users' table looks like below,   The data in 'pages' table looks like below, As all the fields in 'users' table, from source database, will map to User entity in Drupal 8 site so we don't need make any changes there. But as we are migrating 'pages' table data to 'Basic Page' content type in Drupal 8 site, so we need to create required fields in 'Basic Page' content type. We have created the fields in 'Basic Page' content type and it looks like below, In our migration, field mapping between source site (pages) and destination site (Basic Page' content type) is like below, city...

JSON-D8 Migration: By Using Available and Custom Process Plugins

Image
In our XML to Drupal 8 bog post series, we have seen that how can we do the XML to D8 migration by just using YML file , extend the capabilities of the migration by using available Process plugins and finally extended the capabilities of the migration by using Custom Process plugins. As the JSON to Drupal 8 migration is quite similar to XML migration so we will do the complete JSON to Drupal 8 migration in this Blog post. As we are migrating from JSON so we have created a sample JSON file which looks like below, Our migration configuration entity (YML) file under config/install defines Source (JSON file and fields in it), Destination (Drupal entity) and Field mappings (Process plugins). It looks like below, The only change between XML and JSON migration is "data_parser_plugin" as shown below,   Data parser plugin is part of Migrate Plus module. It means we don't need to write custom code for most of the cases while migrating from XML or JSON t...

XML-D8 Migration: Extending the migration capabilities by using CUSTOM Process plugin

Image
In our last blog post, XML-D8 Migration: Extending the migration capabilities by using available Process plugins , we have extended the migration capabilities by using already available process plugins. In this blog post, we will extend the capabilities of that migration by writing custom Process plugins. In this blog post, we will map the content to different content types based on the 'site url' field in XML. There are no changes in XML file and we are using the same XML file which was used in earlier blog posts. To use the custom plugin, we need to specify the plugin name in our .yml file under config/install, so we have made that one change which looks below, Basically we are telling the migration API that for 'type' field use 'content_type_plugin' and 'site_url' XML field will be used as source. Next we have created the custom process plugin in src/Plugin/migrate/process/ContentTypePlugin.php . This custom process plugin uses 's...

XML-D8 Migration: Extending the migration capabilities by using available Process plugins

Image
In our last blog post, XML-D8 Migration: Very basic migration by just using YML file , we have done very basic XML to Drupal 8 migration. In this blog post, we will extend the capabilities of that migration by using available Process plugins . To add-on, we have added new fields like city, state, site url, site name, keywords, creation date to the XML file and now it looks like below, We will be migrating city and state fields into place field in D8 by using concat process plugin . Site name and site url fields will be migrated to URL field in D8. Creation date field will be migrated to content creation date field in D8 using callback process plugin . Keywords field will be migrated to tags taxonomy field referenced in content type. For tags migration, we will be using explode process plugin and concept of pipeline . We have added the new fields in page content type on D8 site and it looks like below, Next we have added the mapping of these new fields in config/install/...