Ravi Sagar - Jira and Atlassian Tools Consultant. Author of "Mastering Jira 7" book. https://www.ravisagar.in/rss.xml en How LinkedIn scaled to 3 million issues #Atlassian webinar https://www.ravisagar.in/notes/how-linkedin-scaled-3-million-issues-atlassian-webinar <span>How LinkedIn scaled to 3 million issues #Atlassian webinar</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Mon, 12/10/2018 - 08:13</span> <ul class="links inline list-inline"><li class="statistics-counter">14 views</li></ul> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Atlassian is conducting this webinar where they will be talking about scaling. I this webinar they will talk about LinkedIn. </p> <p>Here is the link: <a href="https://www.atlassian.com/webinars/software/how-linkedin-scaled-to-3m-jira-issues-and-500m-members">https://www.atlassian.com/webinars/software/how-linkedin-scaled-to-3m-j…</a></p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/atlassian" hreflang="en">Atlassian</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> </div> <div class="empty-geofield"></div> Mon, 10 Dec 2018 08:13:31 +0000 ravisagar 744 at https://www.ravisagar.in Redoing my engineering after 20 years https://www.ravisagar.in/notes/redoing-my-engineering-after-20-years <span>Redoing my engineering after 20 years</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Sat, 11/10/2018 - 21:36</span> <ul class="links inline list-inline"><li class="statistics-counter">79 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-11/Ravi%20Sagar%20courses.jpg" width="960" height="540" alt="Ravi Sagar Courses" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Yes you read it correctly I am actually redoing my engineering again almost after 20 years. I am not really enrolling myself in a course or going back to university but I am actually relearning the things that I learned long long back again.</p> <p>I made a video explain what are my plans. You can watch that video if you want but I am anyways sharing my plan in this blog.</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/z4E7eBNH5oY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe><p> So my plan is simple and long term. I want to study engineering subjects again and while I am studying them I will also make a video about what I learned. Now this will give a good reason to learn them properly as I will be learning it with the intention to teach it.</p> <p>I started learning Algorithm Design and Analysis and really enjoying it. I also made a video on Asymptotic Analysis today, honestly I had some difficulty making that video because I was struggling to be technically correct and use the right terminology. 20 years is a long time but it didn't take me long to catch up.</p> <p>My intention is to continue making good simple videos and my main objective is not to make videos but to learn. These days it is so easy to get clarity on a topic. There are plenty of videos online and tons of resources. While I was doing engineering the internet connection was still 56 kbps and there was no youtube. I want to make videos mainly because I want to share them and I will be learning more carefully. Second I will get feedback from lot of people which is always good.</p> <p>So I hope my plan goes well, I want to take it easy and not worry too much about it. I just want to learn old subjects for the pure joy of learning and sharing. Simple.</p> <p>Apart from engineering subjects I will continue to make videos on Jira and Drupal plus anything that excites me really.</p> <p>Ok that is it for now. Have a nice day.</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/taxonomy/term/728" hreflang="en">Computer Science</a></div> <div class="field--item"><a href="/taxonomy/term/729" hreflang="en">Engineering</a></div> <div class="field--item"><a href="/category/topic/video" hreflang="en">video</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> </div> <div class="empty-geofield"></div> Sat, 10 Nov 2018 21:36:45 +0000 ravisagar 734 at https://www.ravisagar.in I am speaking at Atlassian User Group London on 1st Aug 2018 @londonaug https://www.ravisagar.in/notes/i-am-speaking-atlassian-user-group-london-1st-aug-2018-londonaug <span>I am speaking at Atlassian User Group London on 1st Aug 2018 @londonaug</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Wed, 07/25/2018 - 17:34</span> <ul class="links inline list-inline"><li class="statistics-counter">45 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-07/ravisagar_aug_london.jpg" width="1200" height="675" alt="Atlassian AUG London" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>I will present my experience in implementing two solutions to integrate a live chat support within JIRA Servce Desk.</p> <p>When you have products and services used by thousands of customers, you need a system in place to streamline the support process. For many users, they prefer to engage with you via live chat support. It’s direct and quick, giving them instant gratification for finding a solution to their problem. For those using Jira Service Desk as their ITSM solution, there hasn’t been a Jira live chat support solution contained within the Atlassian ecosystem – until now.</p> <p>Earlier this year I shared <a href="https://www.ravisagar.in/notes/do-you-want-have-live-chat-jiraservicedesk-and-slackhq-using-chatlio-jirioapp-apps">one solution</a> and during this session I will talk about one more :)</p> <p><strong>Date</strong><br /> 1st Aug 2018, 6:30 PM - 9:00 PM</p> <p><strong>Event details</strong></p> <p>RSVP here: <a href="https://aug.atlassian.com/events/details/atlassian-london-presents-london-aug-1st-august-goodman-masson">https://aug.atlassian.com/events/details/atlassian-london-presents-lond…</a></p> <p><strong>Venue</strong><br /><a href="https://goo.gl/maps/bWHkYA9nfjw">Goodman Masson, 120 Aldersgate Street, London, EC1A 4JQ</a></p> <p>There will be pizza and drink and of course we will go to the pub after the event ;)</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/category/topic/atlassian" hreflang="en">Atlassian</a></div> <div class="field--item"><a href="/category/topic/jira-service-desk" hreflang="en">JIRA Service Desk</a></div> <div class="field--item"><a href="/category/topic/public-speaking" hreflang="en">Public Speaking</a></div> <div class="field--item"><a href="/taxonomy/term/666" hreflang="en">Live Chat</a></div> </div> <div class="empty-geofield"></div> Wed, 25 Jul 2018 16:34:53 +0000 ravisagar 730 at https://www.ravisagar.in Is work life balance a myth? interesting article by @michaeldsimmons https://www.ravisagar.in/notes/work-life-balance-myth-interesting-article-michaeldsimmons <span>Is work life balance a myth? interesting article by @michaeldsimmons </span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Thu, 05/31/2018 - 19:00</span> <ul class="links inline list-inline"><li class="statistics-counter">31 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-05/Michael%20Simmons.png" width="2164" height="1198" alt="Michael Simmons" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>I stumbled across this amazing piece of article on medium that talks about work life balance, whether you can achieve lot of success in life without sacrificing on your personal life if something everyone wonders.</p> <p><a href="https://medium.com/the-mission/an-ambitious-persons-take-on-work-life-balance-i-almost-lost-hope-in-my-marriage-b6f0c0355c2">An Ambitious Person’s Brutally Honest Take On Work-Life Balance</a> talks about this topic with some personal references from the author Michael Simmons.</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/productivity" hreflang="en">Productivity</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/category/topic/entrepreneur" hreflang="en">Entrepreneur</a></div> </div> <div class="empty-geofield"></div> Thu, 31 May 2018 18:00:22 +0000 ravisagar 728 at https://www.ravisagar.in Moving to Drupal VM by @geerlingguy https://www.ravisagar.in/notes/moving-drupal-vm-geerlingguy <span>Moving to Drupal VM by @geerlingguy</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Thu, 05/10/2018 - 08:04</span> <ul class="links inline list-inline"><li class="statistics-counter">27 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-05/DrupalVM.png" width="1228" height="609" alt="Drupal VM" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>I have been using <a href="category/topic/vagrant">Vagrant</a> for a very long time now. I love it. It is perfectly to setup the environment and develop for Drupal, however recently I tried moving some of my sites to Drupal 8. I know I am late, very, very late but better late than never :) and I realised setting up the environment manually is a bigger pain, to be honest I am never comfortable setting up LAMP, I don't think I have ever configured Apache perfectly in one go. It always needs some R&amp;D to make it work with Drupal or may be I am not good in it. I don't know. It is a pain.</p> <p>Vagrant solved this problem for me, but I have been using Vagrant slightly differently. I was using it mainly as a vm with not much provisioning, which I guess is fine. I was happy with it. I use usually one vm for more than one sites.</p> <p>With Drupal 8 things are different. You need composer plus few other things to make things work. I was able to setup everything but it is still a pain. I want to focus more on developer than setting up environment and now I am planning to have just one vm per project and one more for staging.</p> <p>I knew about Drupal VM but never really used it for real projects but I cannot avoid it anymore.</p> <p>If you want to also start using Drupal VM go to this link: <a href="https://www.drupalvm.com/">https://www.drupalvm.com/</a></p> <p>All you need is Vagrant and VirtualBox installed on your system and setting up the environment just take few minutes. It is highly configurable and works just perfectly in one go.</p> <p>I hope it goes well for me. I need to upgrade one site from D7 to D8 and I will be using Drupal VM for that :)</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/drupal-8" hreflang="en">Drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/category/topic/vagrant" hreflang="en">Vagrant</a></div> <div class="field--item"><a href="/category/topic/virtualbox" hreflang="en">VirtualBox</a></div> </div> <div class="empty-geofield"></div> Thu, 10 May 2018 07:04:02 +0000 ravisagar 724 at https://www.ravisagar.in Should you learn Jira as a Student? https://www.ravisagar.in/notes/should-you-learn-jira-student <span>Should you learn Jira as a Student?</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Tue, 04/17/2018 - 21:30</span> <ul class="links inline list-inline"><li class="statistics-counter">23 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-04/%28Published%29%20Should%20you%20learn%20Jira%20as%20a%20student_.jpg" width="960" height="540" alt="Should you learn Jira" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Lot of students and fresh college graduates ask me this question whether they should learn Jira or not? In this video I tried to answer that question.</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/QoiRZ_eCwQc?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/jira" hreflang="en">Jira</a></div> <div class="field--item"><a href="/category/topic/video" hreflang="en">video</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/category/topic/atlassian" hreflang="en">Atlassian</a></div> <div class="field--item"><a href="/category/topic/jira-certification-exam" hreflang="en">JIRA Certification Exam</a></div> </div> <div class="empty-geofield"></div> Tue, 17 Apr 2018 20:30:41 +0000 ravisagar 709 at https://www.ravisagar.in Maintenance mode for Jira by @accxia https://www.ravisagar.in/notes/maintenance-mode-jira-accxia <span>Maintenance mode for Jira by @accxia</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Sun, 04/15/2018 - 20:14</span> <ul class="links inline list-inline"><li class="statistics-counter">48 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-04/%28Published%29%20Maintenance%20mode%20for%20Jira.jpg" width="960" height="540" alt="Maintenance mode for Jira" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Do you want to make sure that users cannot access your Jira instance when you are doing some maintenance? Well this can be done by changing the permissions but that can be cumbersome.</p> <p>I found about this new add-on called <a href="https://marketplace.atlassian.com/plugins/com.accxia.jira.plugins.maintenance.Maintenance/server/overview" target="_blank">Maintenance Mode for Jira</a></p> <iframe width="560" height="315" src="https://www.youtube.com/embed/bLbiS5htZOA?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe><p> I hope you like this video. Enjoy!</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/jira" hreflang="en">Jira</a></div> <div class="field--item"><a href="/taxonomy/term/723" hreflang="en">Add-on</a></div> <div class="field--item"><a href="/taxonomy/term/724" hreflang="en">App</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/category/topic/video" hreflang="en">video</a></div> <div class="field--item"><a href="/taxonomy/term/725" hreflang="en">Accxia</a></div> <div class="field--item"><a href="/category/topic/atlassian" hreflang="en">Atlassian</a></div> </div> <div class="empty-geofield"></div> Sun, 15 Apr 2018 19:14:16 +0000 ravisagar 707 at https://www.ravisagar.in Using Pantheon.io to learn Drupal 8 - @getpantheon and @drupal https://www.ravisagar.in/notes/using-pantheonio-learn-drupal-8-getpantheon-and-drupal <span>Using Pantheon.io to learn Drupal 8 - @getpantheon and @drupal</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Tue, 04/10/2018 - 06:13</span> <ul class="links inline list-inline"><li class="statistics-counter">24 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-04/%28Published%29%20Using%20Pantheon.io%20for%20learning%20Drupal%208.jpg" width="960" height="540" alt="Pantheon.io and Drupal 8" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Today I want to show you how you can quickly setup a Drupal 8 website on Pantheon.io for learning purpose. It is a great way to get started on Drupal without setting up any environment on your local system.</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/bk_PUcDKpQA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""></iframe></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/category/topic/drupal-8" hreflang="en">Drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/722" hreflang="en">Pantheon.io</a></div> <div class="field--item"><a href="/category/topic/video" hreflang="en">video</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> </div> <div class="empty-geofield"></div> Tue, 10 Apr 2018 05:13:03 +0000 ravisagar 705 at https://www.ravisagar.in Exposing shell over API is reminiscence of CGI and old college days https://www.ravisagar.in/notes/exposing-shell-over-api-reminiscence-cgi-and-old-college-days <span>Exposing shell over API is reminiscence of CGI and old college days</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Tue, 04/03/2018 - 22:40</span> <ul class="links inline list-inline"><li class="statistics-counter">49 views</li></ul> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/2018-04/IMG00385-20110326-1456.jpg" width="1024" height="768" alt="Ravi in college" typeof="foaf:Image" class="img-responsive" /> </div> <div class="field--item"> <img src="/sites/default/files/2018-04/IMG00371-20110326-1430.jpg" width="1024" height="768" alt="Ravi in college" typeof="foaf:Image" class="img-responsive" /> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>This morning I was going to Reading when I thought of exposing the shell script that I wrote yesterday to read the CSV file where I am storing my GPS location and sending it to my website. I though of this idea where I can simply query my database of flat files. I thought of creating a bash script where I can pass the date and time argument and it will return my GPS coordinates of that day by looking in the CSV files. I also thought of exposing this script using API.</p> <p>So when I was searching on the net for some libraries I am actually found one called <a href="">goexpose</a> that might do the job but I was interested in doing something very simple and quick. I also found <a href="http://techfeast-hiranya.blogspot.co.uk/2015/06/expose-any-shell-command-or-script-as.html">one link</a> where I found this code.</p> <div class="geshifilter"> <div class="cpp geshifilter-cpp" style="font-family:monospace;"> <ol><li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #666666;">// This tool exposes any binary (shell command/script) as an HTTP service.</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #666666;">// A remote client can trigger the execution of the command by sending</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #666666;">// a simple HTTP request. The output of the command execution is sent</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #666666;">// back to the client in plain text format.</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">package main</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">import <span style="color: #008000;">(</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"flag"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"fmt"</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"io/ioutil"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"log"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"net/http"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"os"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"os/exec"</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #FF0000;">"strings"</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">func main<span style="color: #008000;">(</span><span style="color: #008000;">)</span> <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> binary <span style="color: #008080;">:</span><span style="color: #000080;">=</span> flag.<span style="color: #007788;">String</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"b"</span>, <span style="color: #FF0000;">""</span>, <span style="color: #FF0000;">"Path to the executable binary"</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> port <span style="color: #008080;">:</span><span style="color: #000080;">=</span> flag.<span style="color: #007788;">Int</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"p"</span>, <span style="color: #0000dd;">8080</span>, <span style="color: #FF0000;">"HTTP port to listen on"</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> flag.<span style="color: #007788;">Parse</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #0000ff;">if</span> <span style="color: #000040;">*</span>binary <span style="color: #000080;">==</span> <span style="color: #FF0000;">""</span> <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  fmt.<span style="color: #007788;">Println</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"Path to binary not specified."</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  <span style="color: #0000ff;">return</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #008000;">}</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> l <span style="color: #008080;">:</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">log</span>.<span style="color: #007788;">New</span><span style="color: #008000;">(</span>os.<span style="color: #007788;">Stdout</span>, <span style="color: #FF0000;">""</span>, <span style="color: #0000dd;">log</span>.<span style="color: #007788;">Ldate</span><span style="color: #000040;">|</span><span style="color: #0000dd;">log</span>.<span style="color: #007788;">Ltime</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> http.<span style="color: #007788;">HandleFunc</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"/"</span>, func<span style="color: #008000;">(</span>w http.<span style="color: #007788;">ResponseWriter</span>, r <span style="color: #000040;">*</span>http.<span style="color: #007788;">Request</span><span style="color: #008000;">)</span> <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  var argString string</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  <span style="color: #0000ff;">if</span> r.<span style="color: #007788;">Body</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> nil <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   data, err <span style="color: #008080;">:</span><span style="color: #000080;">=</span> ioutil.<span style="color: #007788;">ReadAll</span><span style="color: #008000;">(</span>r.<span style="color: #007788;">Body</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   <span style="color: #0000ff;">if</span> err <span style="color: #000040;">!</span><span style="color: #000080;">=</span> nil <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">    l.<span style="color: #007788;">Print</span><span style="color: #008000;">(</span>err<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">    http.<span style="color: #007788;">Error</span><span style="color: #008000;">(</span>w, err.<span style="color: #007788;">Error</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span>, http.<span style="color: #007788;">StatusInternalServerError</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">    <span style="color: #0000ff;">return</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   <span style="color: #008000;">}</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   argString <span style="color: #000080;">=</span> string<span style="color: #008000;">(</span>data<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  <span style="color: #008000;">}</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  fields <span style="color: #008080;">:</span><span style="color: #000080;">=</span> strings.<span style="color: #007788;">Fields</span><span style="color: #008000;">(</span><span style="color: #000040;">*</span>binary<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  args <span style="color: #008080;">:</span><span style="color: #000080;">=</span> append<span style="color: #008000;">(</span>fields<span style="color: #008000;">[</span><span style="color: #0000dd;">1</span><span style="color: #008080;">:</span><span style="color: #008000;">]</span>, strings.<span style="color: #007788;">Fields</span><span style="color: #008000;">(</span>argString<span style="color: #008000;">)</span>...<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  l.<span style="color: #007788;">Printf</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"Command: [%s %s]"</span>, fields<span style="color: #008000;">[</span><span style="color: #0000dd;">0</span><span style="color: #008000;">]</span>, strings.<span style="color: #007788;">Join</span><span style="color: #008000;">(</span>args, <span style="color: #FF0000;">" "</span><span style="color: #008000;">)</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  output, err <span style="color: #008080;">:</span><span style="color: #000080;">=</span> exec.<span style="color: #007788;">Command</span><span style="color: #008000;">(</span>fields<span style="color: #008000;">[</span><span style="color: #0000dd;">0</span><span style="color: #008000;">]</span>, args...<span style="color: #008000;">)</span>.<span style="color: #007788;">Output</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  <span style="color: #0000ff;">if</span> err <span style="color: #000040;">!</span><span style="color: #000080;">=</span> nil <span style="color: #008000;">{</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   http.<span style="color: #007788;">Error</span><span style="color: #008000;">(</span>w, err.<span style="color: #007788;">Error</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span>, http.<span style="color: #007788;">StatusInternalServerError</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">   <span style="color: #0000ff;">return</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  <span style="color: #008000;">}</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  w.<span style="color: #007788;">Header</span><span style="color: #008000;">(</span><span style="color: #008000;">)</span>.<span style="color: #007788;">Set</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"Content-Type"</span>, <span style="color: #FF0000;">"text/plain"</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">  w.<span style="color: #007788;">Write</span><span style="color: #008000;">(</span>output<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> <span style="color: #008000;">}</span><span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> </div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> l.<span style="color: #007788;">Printf</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"Listening on port %d..."</span>, <span style="color: #000040;">*</span>port<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: bold; font-style: italic;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> l.<span style="color: #007788;">Printf</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"Exposed binary: %s"</span>, <span style="color: #000040;">*</span>binary<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"> http.<span style="color: #007788;">ListenAndServe</span><span style="color: #008000;">(</span>fmt.<span style="color: #007788;">Sprintf</span><span style="color: #008000;">(</span><span style="color: #FF0000;">"127.0.0.1:%d"</span>, <span style="color: #000040;">*</span>port<span style="color: #008000;">)</span>, nil<span style="color: #008000;">)</span></div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color: #008000;">}</span></div> </li> </ol></div> </div> <p>The code above actually works perfectly. To expose the "date" command as a web API. You can simply run the tool as follows:</p> <p>./bash2http -b date</p> <p>Check the link for more details.</p> <p>However I was not entirely convinced with the approach of this code. There is no security and that is why I will spend more time on goexpose code on github to understand how secure it is. It supports SSL which is assuring. Let us see if I can spend some more time this week. I really want to find a solution. Most likely I will try to make the above code slightly secure and reusable. I just don't understand Go that well yet. I wish if we can simply feed our brain with knowledge while we are sleeping.</p> <p>I also came to know that the approach of exposing shell using API method so that it can be invoked over the internet is exactly what CGI used to do. It reminded me of the days when we used to work on C++ during our college days. Internet was still quite new in late 1990s and create a web page using C++ was so much fun. All the memories of floppy disk filled with hundreds of CPP files that we used to compile with Alt+F9 and then run with Ctrl+F9 by smashing the keys on TVS gold keyboard. So many amazing memories of college.</p> <p>I made couple of projects with <a href="https://twitter.com/gchinar">Chinar</a> in college using graphics in C++ and mouse programming and working with interrupts. I wish if I get find the code again. It is a shame there was no Github back then. I am sure I must have the code somewhere in floppy disks but how will I read them?</p> <p>Pic 1:Me in my college.</p> <p>Pic 2: This is my class (Check the bag I still have the same bag here with my in London and I take it to work everyday).</p> <p>Going to work after ages tomorrow. I am actually missing "Mind the gap" voice. Excited!</p> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/taxonomy/term/695" hreflang="en">Bash</a></div> <div class="field--item"><a href="/taxonomy/term/721" hreflang="en">CGI</a></div> <div class="field--item"><a href="/taxonomy/term/649" hreflang="en">Go</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> </div> <div class="empty-geofield"></div> Tue, 03 Apr 2018 21:40:35 +0000 ravisagar 700 at https://www.ravisagar.in Displaying my live GPS location on the site and also my battery status https://www.ravisagar.in/blog/displaying-my-live-gps-location-site-and-also-my-battery-status <span>Displaying my live GPS location on the site and also my battery status</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>This Easter break was very fruitful for me. In fact I was quite satisfied with the work that I did in the last few days. In the past few weeks I am following IndieWeb principles and I implemented <a href="https://www.ravisagar.in/blog/implementing-posse-my-site">POSSE</a> as well. I was quite satisfied with the new approach on my blog where I started posting small updates using <a href="https://www.ravisagar.in/notes">notes</a>. However I also wanted to implement <a href="https://www.ravisagar.in/checkins">checkins</a> on the site and I shared the <a href="https://www.ravisagar.in/notes/implemented-gps-based-location-checkins-my-drupal-site-indieweb">approach</a> I took with my Drupal website and the modules I used to achieve it.</p> <p>However I still wanted this ability to display my current location on my site. I was actually inspired by <a href="http://aaronparecki.com">Aaron Parecki</a>. I wanted to do the same thing and I first thought of using his code which he open sourced but I wanted to do it myself and also I don't have an iPhone plus my site runs on Drupal and I was more comfortable implementing it myself.</p> <p><strong><br /><h3>Introducing my live GPS location</h3> <p></p></strong></p> <p>If you go to the <a href="https://www.ravisagar.in/status">status</a> page you will be able to check my last known location and the battery status coming directly from my phone.</p> <p><strong><br /><h3>How I did it?</h3> <p></p></strong></p> <p>I want to share the work that I did to achieve this. In case it is not clear or you need more information. Please <a href="https://www.ravisagar.in/contact">contact</a> me and I will be more than happy to share more details.</p> <p><strong>Step 1: Using GPSLogger app on Blackberry to track my location</strong></p> <p>Yes I love Blackberry and I use it in 2018 as well. It is great and don't ask me to change it. I use this android app running on my Blackberry Passport. This app captures the GPS location and creates a GPX and CSV file which I also send to my server using secure connection.</p> <p>To save battery of my Blackberry, which is anyways great as compared to Android phones but I still wanted to make it last longer, I did some settings in the app as follows.</p> <p>Distance filter: 50 meters (More is better for battery)<br /> Accuracy Filter: 100 meters (More is better for battery)<br /> Duration to match accuracy: 60 seconds (Less is better for battery)<br /> Absolute time to GPS fix: 30 seconds (Less is better for battery)<br /> Don't log if I'm not moving: On (Good for battery, uses accelerometer)</p> <p>Anything which is better for the battery is not good for the GPS. I can log more frequently and make GPS very very accurate but it will drain the phone battery quickly.</p> <p><strong>Step 2: Shell script to read the CSV file and make a REST call to my Drupal site</strong></p> <p>This is my favourite part in the whole process. Lot of Linux skills and it was good to brush up my bash skills after a long time. I made a script that can read the last line of the CSV file and then sending the Timestamp, Latitude, Longitude and the Battery status, there are other things like elevation also in the CSV but I don't care about that (unless I am hiking, in that case I will use Garmin).</p> <p>Then in the same shell script I am making a REST call to send these things to my site. I of course enabled the REST API modules that now come with the core and I also installed <a href="https://www.drupal.org/project/restui">REST UI</a>.</p> <p><strong>Step 3: Running the Shell script using Cron</strong></p> <p>I always get nervous when I use crontab. It is a pain to use it or may be I am not a good Linux Administrator. Well anyways after few hits and trials and way past my bedtime I was able to successfully run the shell script after every minute.</p> <p>So every minute the shell script will update the last known location from the CSV file to my website. Of course it also depends whether my location has be updated or not. When I am not moving the location is not sent. Pretty cool stuff.</p> <p><img src="https://www.ravisagar.in/sites/default/files/blog-images/RaviSagarLocation.jpg" /></p> <p><strong><br /><h3>What's next - Querying my location database using REST API</h3> <p></p></strong></p> <p>I do have lot of GPX files store somewhere but I realised using flat CSV files works fine for me but I still want this ability to query my location database. Aaron Parecki mentioned on his site about <a href="https://github.com/aaronpk/Compass">Compass</a> which he wrote using <a href="https://lumen.laravel.com/">Lumen framework</a>. I did try using it but was unable to set it up. I was able to get the Compass up and running but I was unable to login using my <a href="http://www.sagar.ravi.pro">Known</a> website. I also enable Indie Auth on this site but after few trials I gave up.</p> <p>I am now planning to write my own code to query the flat CSV files. In Compass Aaron mentioned that he can query his location database using API calls which is exactly what I wanted to do. I will definitely write code for this, still not sure which language to use. May be good old PHP? Or Go? Don't know. May be I need couple of days to do this.</p> <p>I hope this was useful and you can try something similar. To be honest I did this with the sole intention to learn something and I really had very, very good Easter break.</p> <p>Have a nice day!</p> </div> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Mon, 04/02/2018 - 20:20</span> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--items"> <div class="field--item"><a href="/taxonomy/term/719" hreflang="en">Lumen</a></div> <div class="field--item"><a href="/taxonomy/term/715" hreflang="en">Checkin</a></div> <div class="field--item"><a href="/taxonomy/term/718" hreflang="en">GPS</a></div> <div class="field--item"><a href="/taxonomy/term/656" hreflang="en">Indieweb</a></div> <div class="field--item"><a href="/category/topic/drupal" hreflang="en">Drupal</a></div> <div class="field--item"><a href="/taxonomy/term/720" hreflang="en">REST</a></div> <div class="field--item"><a href="/taxonomy/term/695" hreflang="en">Bash</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> </div> <div class="field field--name-field-featured-blog field--type-boolean field--label-hidden field--item">Off</div> <div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"> <div class="field--item"> <img src="/sites/default/files/blog-images/RaviSagarLocation.jpg" width="2556" height="2288" alt="Ravi Sagar Location" typeof="foaf:Image" class="img-responsive" /> </div> </div> <ul class="links inline list-inline"><li class="statistics-counter">68 views</li></ul><section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=698&amp;2=comment&amp;3=comment" token="xIb3kMFa3WR1eOtiKiOzIw7p5oUx0b9Ogyj7WEsgFXI"></drupal-render-placeholder> </section> Mon, 02 Apr 2018 19:20:28 +0000 ravisagar 698 at https://www.ravisagar.in