Ravi Sagar - JIRA and Atlassian Tools Consultant. Author of "Mastering JIRA 7" book. http://www.ravisagar.in/rss.xml en Moving to Drupal VM by @geerlingguy http://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">14 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 http://www.ravisagar.in Should you learn Jira as a Student? http://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">15 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 http://www.ravisagar.in Maintenance mode for Jira by @accxia http://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">32 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 http://www.ravisagar.in Using Pantheon.io to learn Drupal 8 - @getpantheon and @drupal http://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">8 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 http://www.ravisagar.in Exposing shell over API is reminiscence of CGI and old college days http://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">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-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 http://www.ravisagar.in Displaying my live GPS location on the site and also my battery status http://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="http://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="http://www.ravisagar.in/notes">notes</a>. However I also wanted to implement <a href="http://www.ravisagar.in/checkins">checkins</a> on the site and I shared the <a href="http://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="http://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="http://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="http://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">49 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 http://www.ravisagar.in Implemented GPS based location checkins on my Drupal site #IndieWeb http://www.ravisagar.in/notes/implemented-gps-based-location-checkins-my-drupal-site-indieweb <span>Implemented GPS based location checkins on my Drupal site #IndieWeb</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Sat, 03/31/2018 - 19:13</span> <ul class="links inline list-inline"><li class="statistics-counter">42 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/Drupal_Blackberry_Checkin.png" width="1440" height="1440" alt="Drupal Blackberry Checkin" 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 am obsessed with location tracking. I started using <a href="https://foursquare.com/ravisagar">Foursquare</a> more than 10 years ago on my Blackberry phone. I loved that app. It is still one of my favourite application. It was very popular for couple of years but then after the smart phone revolution (post Blackberry phase) I guess Foursquare lost its shine but they came back with their new service Swarm. I have not really restarted using Foursquare to the fullest yet however since the last few months I have been hooked to the IndieWeb principles.</p> <p>I am trying very hard to post everything on my website and syndicating it elsewhere - <a href="http://www.ravisagar.in/blog/implementing-posse-my-site">POSSE</a>. It is a good way to own your data and I don't see any reason why people should not follow IndieWeb principles.</p> <p>Coming to the point of my obsession with GPS tracking. I do track lot of my actual physical location with either Garmin or an app on my Blackberry that continuously uploads a GPX file to my server but I still need to make it more usable. I used to use Google Latitude but we all know what happened to that and these days I am working on storing my GPS location on a regular interval in the background, without me pressing any button and I really want to also retrieve that location. For instance if I want to know "Where was I 3 years ago on this day at 4:00 PM?", On IndieWeb website I did find some great insights shared by <a href="http://aaronparecki.com">Aaron Parecki</a> and I am yet to fully implement and achieve what he is doing. He has open sourced his work and I can set it up as well but still I am not sure about the approach that I will take.</p> <p>Anyways, so today what I did I implemented <a href="https://www.drupal.org/project/geocoder">Geocoder</a> and <a href="https://www.drupal.org/project/geofield">Geofield</a> modules in Drupal. Install and enable both the modules and follow the instructions below.</p> <p><strong>Step 1</strong> </p> <p>Create Geofield Field type called "Location" and add it in the Content Type of your choice. I added it in <a href="http://www.ravisagar.in/notes">notes</a></p> <p><strong>Step 2</strong></p> <p>The "Geocode method" should be set to "No geocoding".</p> <p><strong>Step 3</strong></p> <p>Go to "Manage for display" of your Content Type and set the Widget of Location field to "Geofield Map".<br /> Google Maps API Key: XXXXXXXXXXXXXXXX (Create your key and set it here)<br /> Google Places Autocomplete Service: enabled<br /> Map Library: Google Maps<br /> Map Type: roadmap<br /> Map Type Selector: enabled<br /> Map Dimensions - Width: 100%; Height: 450px;<br /> Zoom Levels - Start: 12; Focus: 16; Min: 1; Max: 22;<br /> HTML5 Geolocation button: enabled<br /> Click to find marker: enabled<br /> Click to place marker: disabled<br /> Geoaddress Field: - any -</p> <p>I have enable Google Places Autocomplete Service because when I create a new node apart from choosing the location on the map I would also like to manually enter the venue name. It sometimes makes it simple sometimes. Also HTML5 Geolocation button is enabled so that it can pick the coordinates when I create a node from my Blackberry (Yeah!) browser.</p> <p><strong>Step 4</strong></p> <p>Go to "Manage display" of your Content Type and set the Format of Location field to "Geofield Google Map". You can modify various setting for the map as per your liking. I just changed the Start Zoom to 16.</p> <p>And you are literally done but wait there is more. Yes few more sexy configurations to make this checkin thing little more fancy.</p> <p><strong>Step 5</strong></p> <p>Create one Address Field Type called "Address (field_address)" and set the "Geocode method" to "Reverse Geocode from a Geofield type existing field" and then under the "Reverse Geocode from an existing field" drop down select the "Location (field_location) [geofield]"</p> <p>On the same page under the "Geocoder plugin(s)" select "GoogleMaps".</p> <p>Using this Address field is optional but I also wanted to store the Venue's Company, Street address, Post town and Postal code because these fields are managed by just one "Address (field_address)" field. These fields are automatically populated based on the coordinates that you are setting in the "Location (field_location) [geofield]". Pretty neat. Though I had some issues sometimes when this Address field was not fully updated but the node was anyways saved with the location and that is what I needed.</p> <p><strong>Step 6</strong></p> <p>Create a view to display all the checkins with the map of course. I created a <a href="http://www.ravisagar.in/checkins">/checkins</a> page view on this site. Since I am using my Notes Content Type so I just used the following "Filter Criteria".</p> <p>Content: Location (not empty)</p> <p>In the "Fields" section I added the "Content: Location" with "Formatter" set to "Geofield Google Map". Add more fields if you want.</p> <p>This post is actually a note but I have written so much here, well that is the idea. I wanted to share this concept because if you want to also use similar technique of owning your checkins then this method can be very useful. To be honest I am not absolutely 100% sure how far I will take this but so far based on my 2 days of work I think I am satisfied. The next step would be to post checkins to my <a href="https://foursquare.com/ravisagar">Foursquare</a> whenever I add a node with location, vice versa can also be useful. This is what I did on my <a href="http://www.sagar.ravi.pro">known site</a> which I <a href="http://www.ravisagar.in/blog/setting-hugo-gohugoio-static-website-and-continuously-deploying-it-netlify">launched</a> just few days back.</p> <p>Amazing stuff, really happy with my holidays, doing what I love. I am so glad I starting spending more and more time with my first love again ;)</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="/taxonomy/term/715" hreflang="en">Checkin</a></div> <div class="field--item"><a href="/taxonomy/term/642" hreflang="en">POSSE</a></div> <div class="field--item"><a href="/taxonomy/term/716" hreflang="en">Google Maps</a></div> <div class="field--item"><a href="/taxonomy/term/717" hreflang="en">Foursquare</a></div> <div class="field--item"><a href="/taxonomy/term/718" hreflang="en">GPS</a></div> <div class="field--item"><a href="/category/topic/drupal" hreflang="en">Drupal</a></div> <div class="field--item"><a href="/taxonomy/term/656" hreflang="en">Indieweb</a></div> <div class="field--item"><a href="/taxonomy/term/692" hreflang="en">Known</a></div> </div> <div class="field field--name-field-location field--type-geofield field--label-above"> <div class="field--label">Location</div> <div class="field__items"> <div class="field--item"><div id="geofield-map-entity-notes-691-field-location" class="geofield-google-map" style="min-width: 200px; width: 100%; min-height: 200px; height: 450px"></div> </div> </div> </div> <div class="field field--name-field-address field--type-address field--label-above"> <div class="field--label">Address</div> <div class="field__items"> <div class="field--item"><p class="address" translate="no"><span class="address-line1">Windsor Lane</span><br> <span class="locality">Burnham</span><br> <span class="postal-code">SL1 7HN</span><br> <span class="country">United Kingdom</span></p></div> <div class="field--item"><p class="address" translate="no"><span class="address-line1">Lower Britwell Road</span><br> <span class="locality">Slough</span><br> <span class="postal-code">SL2 2NH</span><br> <span class="country">United Kingdom</span></p></div> </div> </div> Sat, 31 Mar 2018 18:13:47 +0000 ravisagar 691 at http://www.ravisagar.in Setting up Hugo @GoHugoIO for static website and Continuously Deploying it on @Netlify http://www.ravisagar.in/blog/setting-hugo-gohugoio-static-website-and-continuously-deploying-it-netlify <span>Setting up Hugo @GoHugoIO for static website and Continuously Deploying it on @Netlify</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Just before the start of the weekend I planned to work on <a href="http://www.ravisagar.in/notes/my-weekend-plan-trying-circleci-cicd-and-known-cms">Known CMS and Circle CI</a> but things turned out slightly differently or I should say a lot. I ended up setting up a Hugo website and used Netlify to continuously deploy it on <a href="https://hugo.ravi.pro">https://hugo.ravi.pro</a> which is thew new subdomain that I setup.</p> <p><strong><br /><h3>What is Hugo?</h3> <p></p></strong></p> <p>It is framework for building website using text files. Similar to Jekyll but the interesting thing is that it is written in <a href="http://www.ravisagar.in/notes/just-made-video-golang-and-uploaded-it-youtube">Go</a> and that is what intrigued me to explore it further. I made a posted the video on my <a href="https://www.youtube.com/user/ravisagar1">youtube channel</a> where I shared about Go language and my intention to learn it. In the past few weeks I was quite busy with other work and I couldn't think of a project where I can use Go and Hugo was the perfect project to learn Go.</p> <p><img src="http://www.ravisagar.in/sites/default/files/blog-images/Hugo.png" /></p> <p>Funny thing is that setting up a site in Hugo takes literally 10 mins.</p> <p><strong>Install Hugo</strong></p> <p><span class="geshifilter"><code class="html4strict geshifilter-html4strict">brew install hugo</code></span></p> <p>Yes that's it on mac, of course you need to have homebrew installed already, but for more information check their documentation for <a href="https://gohugo.io/getting-started/installing/">installing</a> Hugo.</p> <p>On windows if you are using Chocolatey you can type in the following command.<br /><span class="geshifilter"><code class="html4strict geshifilter-html4strict">choco install hugo -confirm</code></span></p> <p><strong>Check Hugo install</strong></p> <p><span class="geshifilter"><code class="html4strict geshifilter-html4strict">hugo help</code></span></p> <p>It will give you help description and if this command work then it mean hugo is installed.</p> <p><strong>Create a new site with Hugo</strong></p> <p><span class="geshifilter"><code class="html4strict geshifilter-html4strict">hugo new site site_name</code></span></p> <p>This command will create a folder called site_name and it will contain the code for your site.</p> <p><strong>Install a theme</strong></p> <p>You actually need to install a theme for Hugo to work and render your webpages.</p> <div class="geshifilter"> <div class="html4strict geshifilter-html4strict" style="font-family:monospace;"> <ol><li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">cd site_name;</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">git init;</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">git submodule add <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"https://github.com/digitalcraftsman/hugo-icarus-theme"</span>&gt;</span>https://github.com/digitalcraftsman/hugo-icarus-theme<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> hugo-icarus-theme</div> </li> </ol></div> </div> <p>It will initiate a git repository in your site_name folder. Download the theme in your site_name/themes/ folder</p> <p><strong>Copy your theme's example site</strong></p> <div class="geshifilter"> <div class="html4strict geshifilter-html4strict" style="font-family:monospace;"> <ol><li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">cd site_name</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">cp -r themes/hugo-icarus-theme/exampleSite/* .</div> </li> </ol></div> </div> <p>This command will copy the exampleSite folder to the root of your website project that contains the list of files required for a site to work properly as per the theme. </p> <p><strong>Modify the config.toml file</strong><br /> The config.toml file that comes with the icarus theme already contains lot of stuff. Most of the things are self explanatory however just modify the following things for sure.</p> <div class="geshifilter"> <div class="html4strict geshifilter-html4strict" style="font-family:monospace;"> <ol><li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">baseurl = "<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">"https://hugo.ravi.pro/"</span></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: #009900;">#<span style="color: #ff0000;">"&gt;</span></span>https://hugo.ravi.pro/"</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">#<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> themesDir = "../.."  </div> </li> </ol></div> </div> <p>Basically change the baseurl to the actual url where you want to host the site and comment the themesDir. Usually the themesdir needs to be pointed to the name of the folder of the theme which you want to use but in case of icarus I read their documentation on github and they mentioned to comment this line.</p> <p><strong>Write your first post</strong><br /><span class="geshifilter"><code class="html4strict geshifilter-html4strict">hugo new post/hello-world.md</code></span></p> <p>This command will create a file under your site_name/content/post folder named hello-world.md</p> <p>Just modify this file with your content.</p> <p><strong>Run your site</strong></p> <p><span class="geshifilter"><code class="html4strict geshifilter-html4strict">hugo server -D</code></span></p> <p>This will build your site and will enable you to take a look at your site at <a href="http://localhost:1313/">http://localhost:1313/</a></p> <p><strong>Generate HTML</strong></p> <p><span class="geshifilter"><code class="html4strict geshifilter-html4strict">hugo</code></span></p> <p>Yes just by typing in hugo will create a folder named public and it will contain the HTML files for your site that will be based on the content you just created above in the hello-world.md site.</p> <p>That is it. You have a new fancy site. Depending upon the theme you are using the site will of course have different design but the point here is to use text files to create content.</p> <p>Very nice.</p> <p><strong><br /><h3>Hosting and Continuous Delivery</h3> <p></p></strong><br /> One of my domain <a href="https://www.ravi.pro">https://www.ravi.pro</a> is already linked to my <a href="https://github.com/sparxsys">Github</a> account and thought of hosting it there itself, but after researching online I came to know about Netlify which is really amazing.</p> <p><img src="http://www.ravisagar.in/sites/default/files/blog-images/netlify.png" /></p> <p>It offers more features that Github pages and has the option to deploy your site as well.</p> <p>They have a generous free option where you can create an account and link your Github. Just specify which repository you want netlify to monitor. Whenever you commit your hugo site changes to your github account, netlify will read it and deploy your site. It will also give your site a sub-domain. However you have the option to use your custom domain as well which is amazing. I don't know why they are doing it for free. It is so good.</p> <p>I setup <a href="https://hugo.ravi.pro">https://hugo.ravi.pro</a> for this site. The site is live right now go take a look.</p> <p>One thing that you need to take care is the right hugo version in the Build environment variables.</p> <p><strong>Go to netlify Settings | Build &amp; deploy | Continuous Deployment</strong></p> <p>Under the "Build environment variables" create a new variable called HUGO_VERSION</p> <p>key: HUGO_VERSION<br /> Value: 0.25</p> <p>While configuring your Github repository where you have your Hugo website, make sure the following settings are done.</p> <div class="geshifilter"> <div class="html4strict geshifilter-html4strict" style="font-family:monospace;"> <ol><li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">Build command: hugo</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">Publish directory: public</div> </li> <li style="font-family: monospace; font-weight: normal;"> <div style="font-family: monospace; font-weight: normal; font-style: normal">Production branch: master</div> </li> </ol></div> </div> <p>I hope this blog was useful.</p> <p><img src="http://www.ravisagar.in/sites/default/files/blog-images/hugo.ravi_.pro_.png" /></p> <p>Netlify also offers SSL/TLS certificate. Just enable it in the settings and boom you have nice fancy https in your domain name.</p> <p>They have many features even in their free plan. Go ahead and take a look at their services.</p> </div> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Mon, 03/26/2018 - 15:28</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/709" hreflang="en">Hugo</a></div> <div class="field--item"><a href="/taxonomy/term/710" hreflang="en">Netlify</a></div> <div class="field--item"><a href="/category/topic/github" hreflang="en">Github</a></div> <div class="field--item"><a href="/taxonomy/term/711" hreflang="en">Continuous Deployment</a></div> <div class="field--item"><a href="/taxonomy/term/637" hreflang="en">Devops</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 class="field--item"><a href="/taxonomy/term/638" hreflang="en">Bamboo</a></div> <div class="field--item"><a href="/taxonomy/term/639" hreflang="en">Jenkins</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/Hugo.png" width="1590" height="1200" alt="Hugo" typeof="foaf:Image" class="img-responsive" /> </div> <div class="field--item"> <img src="/sites/default/files/blog-images/netlify.png" width="2422" height="1186" alt="Netlify" typeof="foaf:Image" class="img-responsive" /> </div> <div class="field--item"> <img src="/sites/default/files/blog-images/hugo.ravi_.pro_.png" width="2478" height="1360" alt="Hugo Ravi Sagar Netlify" typeof="foaf:Image" class="img-responsive" /> </div> </div> <ul class="links inline list-inline"><li class="statistics-counter">182 views</li></ul><section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=674&amp;2=comment&amp;3=comment" token="sbqDKC2EKIWFcHbgbkTT8sivPfTt26cAL9SXzWu9gQY"></drupal-render-placeholder> </section> Mon, 26 Mar 2018 14:28:52 +0000 ravisagar 674 at http://www.ravisagar.in My weekend plan - Trying CircleCI for CI/CD and Known CMS http://www.ravisagar.in/notes/my-weekend-plan-trying-circleci-cicd-and-known-cms <span>My weekend plan - Trying CircleCI for CI/CD and Known CMS</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Fri, 03/23/2018 - 18:54</span> <ul class="links inline list-inline"><li class="statistics-counter">21 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-03/CircleCI.png" width="2238" height="1240" alt="Circleci" typeof="foaf:Image" class="img-responsive" /> </div> <div class="field--item"> <img src="/sites/default/files/2018-03/KnownCMS.png" width="2248" height="1176" alt="KnownCMS" 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>There was a phase in my life when I used to do some side projects quite regularly. It really gave me satisfaction to build something. When I was kid I used to learn how to solder and make small electrical projects. When I bought my first computer those electrical projects turned into digital projects and I still miss playing with resistors, transistors and capacitors but you can't do everything at the same time in life. May be I will go back to electronics later in my life but till then I have to expand my knowledge in digital space.</p> <p>This week I have 2 projects in mind. Little ambitious but possible certainly. I want to try <a href="https://withknown.com/">Known CMS</a> which follows IndieWeb principles and hopefully inline with my <a href="http://www.ravisagar.in/blog/implementing-posse-my-site">POSSE plan. Most likely I will setup a subdomain on ravisagar.in or ravi.pro but not sure where. Let us see.</a></p> <p>The other thing which I want to try this weekend is the <a href="https://circleci.com/">Circleci</a>. Earlier this week I went to the <a href="http://www.ravisagar.in/notes/devops-summit-21st-march-2018-moments-ctgsummit">DevOps summit</a> and I attended one wonderful talk "Don't build your platform on sand" by "<a href="https://twitter.com/auberryberry">Aubrey Stearn</a>, Interim Head of DevOps, Arcadia Group". It was really inspiring and Circleci was mentioned in the talk so I am really interested in evaluating it. I will try to understand how it is different from Bamboo and Jenkins.</p> <p>Looking forward to the weekend.</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/708" hreflang="en">CircleCI</a></div> <div class="field--item"><a href="/taxonomy/term/692" hreflang="en">Known</a></div> <div class="field--item"><a href="/taxonomy/term/656" hreflang="en">Indieweb</a></div> <div class="field--item"><a href="/category/topic/my-life" hreflang="en">my life</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/taxonomy/term/638" hreflang="en">Bamboo</a></div> <div class="field--item"><a href="/taxonomy/term/639" hreflang="en">Jenkins</a></div> <div class="field--item"><a href="/taxonomy/term/637" hreflang="en">Devops</a></div> </div> <div class="empty-geofield"></div> Fri, 23 Mar 2018 18:54:14 +0000 ravisagar 672 at http://www.ravisagar.in [Few spots left] I am doing a Webinar on #DevOps using #Atlassian toolset on 28th March 2018, 3 PM GMT http://www.ravisagar.in/notes/few-spots-left-i-am-doing-webinar-devops-using-atlassian-toolset-28th-march-2018-3-pm-gmt <span>[Few spots left] I am doing a Webinar on #DevOps using #Atlassian toolset on 28th March 2018, 3 PM GMT</span> <span><span lang="" about="/users/ravisagar" typeof="schema:Person" property="schema:name" datatype="">ravisagar</span></span> <span>Wed, 03/21/2018 - 21:36</span> <ul class="links inline list-inline"><li class="statistics-counter">81 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-03/RaviSagar_DevOps_Webinar.jpg" width="2988" height="4121" alt="Ravi Sagar DevOps Webinar" 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 am doing a webinar where I will be showcasing how to use Atlassian tools for ALM lifecyle and implementing DevOps pipeline. There are still spots left to sign up but it is filling up soon. If you are always wondered how the full ALM works with Atlassian tools but always wondered how, this is the opportunity to learn.</p> <p>Please click on the link below to sign up for this free webinar.</p> <h3><a style="background:#330000;color:#ffffff;padding:5px" href="https://register.gotowebinar.com/register/4338835999685800961?source=RaviSagar.in" target="_blank">Register here</a></h3> <p>Earlier today I went to the #DevOps Summit and it had some amazing talks. I did a live tweeting from the event. If you missed it please check the details of the event <a href="http://www.ravisagar.in/notes/devops-summit-21st-march-2018-moments-ctgsummit">here</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="/taxonomy/term/637" hreflang="en">Devops</a></div> <div class="field--item"><a href="/category/topic/atlassian" hreflang="en">Atlassian</a></div> <div class="field--item"><a href="/taxonomy/term/704" hreflang="en">ALM</a></div> <div class="field--item"><a href="/taxonomy/term/705" hreflang="en">Webinar</a></div> <div class="field--item"><a href="/taxonomy/term/706" hreflang="en">Event</a></div> <div class="field--item"><a href="/category/topic/jira" hreflang="en">Jira</a></div> <div class="field--item"><a href="/taxonomy/term/638" hreflang="en">Bamboo</a></div> <div class="field--item"><a href="/category/topic/bitbucket" hreflang="en">bitbucket</a></div> <div class="field--item"><a href="/taxonomy/term/653" hreflang="en">Share</a></div> <div class="field--item"><a href="/taxonomy/term/707" hreflang="en">Valiantys</a></div> <div class="field--item"><a href="/taxonomy/term/657" hreflang="en">Atlassian Consultant London</a></div> </div> <div class="empty-geofield"></div> Wed, 21 Mar 2018 21:36:18 +0000 ravisagar 671 at http://www.ravisagar.in