<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title></title>
    <description>Dreaming for fawesome life</description>
    <link>http://sandipbgt.com/</link>
    <atom:link href="http://sandipbgt.com/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Sat, 08 May 2021 10:28:27 +0545</pubDate>
    <lastBuildDate>Sat, 08 May 2021 10:28:27 +0545</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>How To Scrape A Website That Requires Login With Golang?</title>
        <description>&lt;p&gt;If you have been following my blog, you know, how much I love &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Python&lt;/code&gt;. It has been my goto language for scraping related works. I use Python and Django both at office life and personal life. I can do so much with little code and in so much less time. But recently, there has been a buzz for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Go&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Golang&lt;/code&gt; [as someone says] which made me to look into it. As a way to practice my knowledge and understanding of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Go&lt;/code&gt;, I thought to write a program to scrape a website that requires login. I usually start my learning of any language from scraping [if possible] because it interests me so much.&lt;/p&gt;

&lt;p&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Go&lt;/code&gt; however, scrapping wasn’t very straight forward as I expected so I decided to write a tutorial for it.&lt;/p&gt;

&lt;p&gt;In this tutorial, we will write a Go program to scrape a list of projects from our &lt;a href=&quot;https://gitlab.org&quot;&gt;Gitlab&lt;/a&gt; account.&lt;/p&gt;

&lt;p&gt;The source code for this tutorial can be found on my &lt;a href=&quot;https://github.com/sandipbgt/golang-scraper-example&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First visit the following page &lt;a href=&quot;https://gitlab.com/users/sign_in&quot;&gt;https://gitlab.com/users/sign_in&lt;/a&gt; . You will see the page as below.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-23-scraping-tutorial-with-golang/1.png&quot; alt=&quot;Gitlab signin page&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are logged in, perform logout first.&lt;/p&gt;

&lt;p&gt;Now in order to login to the site, we need to extract some information from the site and build a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url.Values&lt;/code&gt; struct which is required while posting to a form in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Go&lt;/code&gt;.
Right click on the “Username or email” field and select “inspect element”. We will use the value of the name attribute for this input which is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user[login]&lt;/code&gt;. This will be the key in the struct and our username/email will be the value. This may be different depending on the site.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-23-scraping-tutorial-with-golang/2.png&quot; alt=&quot;Gitlab signin page username field&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Right click on the “Password” field and select “inspect element”. The value of the name attribute for this input is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user[password]&lt;/code&gt;. This will be the key in the struct and our password will be the value. Again, this may be different depending on the site.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-23-scraping-tutorial-with-golang/3.png&quot; alt=&quot;Gitlab signin page password field&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Another name attribute required is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;authenticity_token&lt;/code&gt;. Most of the sites will have this as a hidden input tag. We will use this as key in the struct and its value as well.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-23-scraping-tutorial-with-golang/4.png&quot; alt=&quot;Gitlab signin page authenticity token&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The above instructions differs depending upon the site. While this login form is simple, some sites might require special parameters that we should use for the login step.&lt;/p&gt;

&lt;p&gt;Now let’s write some &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Go&lt;/code&gt; code.
Create a project in our Go workspace:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$GOPATH&lt;/span&gt;/src/github.com/&amp;lt;your github username&amp;gt;/golang-scraper-example&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We will be using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;goquery&lt;/code&gt; library so install it by typing:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go get github.com/PuerkitoBio/goquery&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Next, create a file named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main.go&lt;/code&gt; inside that directory, containing the following Go code.&lt;/p&gt;

&lt;p&gt;Create a package &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; and import the required library.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;package main

import &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;fmt&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;io/ioutil&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;log&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;net/http&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;net/http/cookiejar&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;net/url&quot;&lt;/span&gt;
	&lt;span class=&quot;s2&quot;&gt;&quot;strings&quot;&lt;/span&gt;

	&lt;span class=&quot;s2&quot;&gt;&quot;github.com/PuerkitoBio/goquery&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Create a global constant &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;baseURL&lt;/code&gt; to store base url of the website and variables &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;username&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;password&lt;/code&gt; to store gitlab username and password respectively.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;const &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
	baseURL &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;https://gitlab.com&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

var &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
	username &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;your gitlab username&quot;&lt;/span&gt;
	password &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;your gitlab password&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Create struct &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App&lt;/code&gt; to store our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http.Client&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AuthenticityToken&lt;/code&gt; to store &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;authenticity_token&lt;/code&gt; value and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Project&lt;/code&gt; to store the list of repositories scraped from gitlab account.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;type &lt;/span&gt;App struct &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	Client &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;http.Client
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;type &lt;/span&gt;AuthenticityToken struct &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	Token string
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;type &lt;/span&gt;Project struct &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	Name string
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Create a receiver function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;getToken()&lt;/code&gt;. This function will scrape the value of hidden input &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;authenticity_token&lt;/code&gt; from gitlab signin page. Without this field, we won’t be able to login. Here, first we are doing a get request to the login page and then passing the response body to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;goquery&lt;/code&gt; to get a struct document of type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Document&lt;/code&gt;. It represents an HTML document to be manipulated. On this document, we can make selections to get the token using jQuery like syntax. We are storing the value of the token in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AuthenticityToken&lt;/code&gt; struct and returning it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;func &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;app &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;App&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; getToken&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; AuthenticityToken &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	loginURL :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; baseURL + &lt;span class=&quot;s2&quot;&gt;&quot;/users/sign_in&quot;&lt;/span&gt;
	client :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; app.Client

	response, err :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; client.Get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;loginURL&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatalln&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Error fetching response. &quot;&lt;/span&gt;, err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	defer response.Body.Close&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;

	document, err :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; goquery.NewDocumentFromReader&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;response.Body&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatal&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Error loading HTTP response body. &quot;&lt;/span&gt;, err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	token, _ :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; document.Find&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;input[name='authenticity_token']&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.Attr&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

	authenticityToken :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; AuthenticityToken&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		Token: token,
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return &lt;/span&gt;authenticityToken
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Create another receiver function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;login()&lt;/code&gt;. This function will login to the website using the credentials &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;username&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;password&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;authenticity_token&lt;/code&gt;. We are doing a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PostForm&lt;/code&gt; request in order to login. The value of authenticity_token is received from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;getToken&lt;/code&gt; function.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;func &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;app &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;App&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; login&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	client :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; app.Client

	authenticityToken :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; app.getToken&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;

	loginURL :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; baseURL + &lt;span class=&quot;s2&quot;&gt;&quot;/users/sign_in&quot;&lt;/span&gt;

	data :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; url.Values&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;s2&quot;&gt;&quot;authenticity_token&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;authenticityToken.Token&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
		&lt;span class=&quot;s2&quot;&gt;&quot;user[login]&quot;&lt;/span&gt;:        &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;username&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
		&lt;span class=&quot;s2&quot;&gt;&quot;user[password]&quot;&lt;/span&gt;:     &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;password&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	response, err :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; client.PostForm&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;loginURL, data&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatalln&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	defer response.Body.Close&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;

	_, err &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; ioutil.ReadAll&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;response.Body&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatalln&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Next create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;getProjects&lt;/code&gt; function. This function will return array of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Project&lt;/code&gt; structs. It will scrape list of projects from dashboard page and build a struct array.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;func &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;app &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;App&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; getProjects&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;Project &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	projectsURL :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; baseURL + &lt;span class=&quot;s2&quot;&gt;&quot;/dashboard/projects&quot;&lt;/span&gt;
	client :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; app.Client

	response, err :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; client.Get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;projectsURL&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatalln&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Error fetching response. &quot;&lt;/span&gt;, err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	defer response.Body.Close&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;

	document, err :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; goquery.NewDocumentFromReader&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;response.Body&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;err &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; nil &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		log.Fatal&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Error loading HTTP response body. &quot;&lt;/span&gt;, err&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	var projects &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;Project

	document.Find&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.project-name&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.Each&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;func&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i int, s &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;goquery.Selection&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		name :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; strings.TrimSpace&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s.Text&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt;
		project :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; Project&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
			Name: name,
		&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

		projects &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; append&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;projects, project&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return &lt;/span&gt;projects
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Finally, our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main()&lt;/code&gt; function will utilize all the above functions. First, we are creating a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cookiejar&lt;/code&gt; to store cookies required while logging into the website. Next we are creating instance of our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App&lt;/code&gt; struct and passing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http.Client&lt;/code&gt; with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cookiejar&lt;/code&gt;. Then we are calling &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;app.login()&lt;/code&gt; which will do the login and then we are calling &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;app.getProjects()&lt;/code&gt; which will scrape list of projects and store in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;projects&lt;/code&gt; variable and at the end we are looping through the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;projects&lt;/code&gt; array and printing our project name to the console.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;func main&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	jar, _ :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; cookiejar.New&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;nil&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

	app :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; App&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		Client: &amp;amp;http.Client&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;Jar: jar&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

	app.login&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
	projects :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; app.getProjects&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;index, project :&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; range projects &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
		fmt.Printf&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;%d: %s&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;, index+1, project.Name&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To run the program, type from inside your project directory and it should print list of projects from your gitlab account.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go run main.go&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The source code for this tutorial can be found on my &lt;a href=&quot;https://github.com/sandipbgt/golang-scraper-example&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Thu, 23 Aug 2018 00:10:00 +0545</pubDate>
        <link>http://sandipbgt.com/2018/08/23/scraping-tutorial-with-golang/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2018/08/23/scraping-tutorial-with-golang/</guid>
        
        
      </item>
    
      <item>
        <title>React Native Github API Example From Beginner To Advance</title>
        <description>&lt;p&gt;For anyone who is learning &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;React Native&lt;/code&gt;, the starting point is &lt;a href=&quot;https://facebook.github.io/react-native/docs/tutorial.html&quot;&gt;the official tutorial&lt;/a&gt;. You must have gone through it and now have a better idea 
of what React Native is all about.&lt;/p&gt;

&lt;p&gt;You have no idea about where to go from here, though.&lt;/p&gt;

&lt;p&gt;If you do a Google search, you will get lots of tutorials and blogs on seemingly any topic relating to React Native. But they also use lots of fancy words that you might not understand if you are just starting out or some might be too easy for you depending upon your level of experience. What most of these tutorials lack is the targeted audience. A beginner who is just starting to learn might get lost if you start talking about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;React Navigation&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Redux&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Axios&lt;/code&gt;. What he expect is using the default set of libraries provided by react native to build something that can help him gain experience.&lt;/p&gt;

&lt;p&gt;So, in this tutorial, we will build a project from scratch from the perspective of a person with little knowledge of React Native. We will progress step by step and gradually add more features to our app with the intention of learning by doing.&lt;/p&gt;

&lt;p&gt;The project we will be building is named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GithubAPIExampleRN&lt;/code&gt;. This project will help you learn all the basics of React Native from beginner to advance level. This app allows you to type a Github username and list all his repos. In other to make our task easy we will use Github API. The API is public and doesn’t need authentication.&lt;/p&gt;

&lt;p&gt;So assuming you have followed basic tutorial of React Native from official site, let’s start.&lt;/p&gt;

&lt;p&gt;We will build a very basic version of this app first and slowly we will update it and make it advance.&lt;/p&gt;

&lt;p&gt;Create a new project by typing the below commands in terminal&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;react-native init GithubAPIExampleRN&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-06-react-native-github-api-example-from-beginner-to-advance/1.png&quot; alt=&quot;Creating new react native project&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now lets go inside our project directory and start the project&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;GithubAPIExampleRN
react-native run-android&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-06-react-native-github-api-example-from-beginner-to-advance/2.png&quot; alt=&quot;Running react native project&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If everything is working properly, let’s get our hands dirty.&lt;/p&gt;

&lt;p&gt;Open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App.js&lt;/code&gt; inside our project directory and replace all the code with the following. Don’t worry, I will explain each and everything as we progress.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;import React, &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;Component&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; from &lt;span class=&quot;s1&quot;&gt;'react'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
import &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  StyleSheet,
  Text,
  View,
  TextInput,
  Dimensions,
  TouchableOpacity,
  Alert,
  ScrollView
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; from &lt;span class=&quot;s1&quot;&gt;'react-native'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

const screenWidth &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; Dimensions.get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'window'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.width&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;default class App extends Component &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  render&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
      &amp;lt;View &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.container&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;
        &amp;lt;Text &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.label&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;GitHub Username&amp;lt;/Text&amp;gt;
        &amp;lt;TextInput
          &lt;span class=&quot;nv&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Enter your github username&quot;&lt;/span&gt;
          &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.input&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        /&amp;gt;
        &amp;lt;TouchableOpacity
          &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.button&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;nv&quot;&gt;activeOpacity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;0.8&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
          &amp;lt;Text &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.buttonText&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;VIEW&amp;lt;/Text&amp;gt;
        &amp;lt;/TouchableOpacity&amp;gt;
      &amp;lt;/View&amp;gt;
    &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

const styles &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; StyleSheet.create&lt;span class=&quot;o&quot;&gt;({&lt;/span&gt;
  container: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    flex: 1,
    padding: 10,
    backgroundColor: &lt;span class=&quot;s1&quot;&gt;'#FFFFFF'&lt;/span&gt;,
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
  label: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    fontSize: 16,
    marginBottom: 6,
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
  input: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    width: screenWidth - 20,
    height: 38,
    padding: 4,
    fontSize: 16,
    borderColor: &lt;span class=&quot;s1&quot;&gt;'#3a3a3a'&lt;/span&gt;,
    borderWidth: 1,
    borderRadius: 8,
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
  button: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    height: 45,
    flexDirection: &lt;span class=&quot;s1&quot;&gt;'row'&lt;/span&gt;,
    backgroundColor:&lt;span class=&quot;s1&quot;&gt;'#263238'&lt;/span&gt;,
    borderColor: &lt;span class=&quot;s1&quot;&gt;'#263238'&lt;/span&gt;,
    borderWidth: 1,
    borderRadius: 8,
    marginBottom: 10,
    marginTop: 10,
    alignSelf: &lt;span class=&quot;s1&quot;&gt;'stretch'&lt;/span&gt;,
    justifyContent: &lt;span class=&quot;s1&quot;&gt;'center'&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
  buttonText: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    color: &lt;span class=&quot;s1&quot;&gt;'#FFFFFF'&lt;/span&gt;,
    fontSize: 18,
    alignSelf: &lt;span class=&quot;s1&quot;&gt;'center'&lt;/span&gt;,
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Let’s go through the code step-by-step:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;First we imported required modules and some extra modules which we will use later in our code.&lt;/li&gt;
  &lt;li&gt;Second we defined the component that represents the UI.&lt;/li&gt;
  &lt;li&gt;Third we created a style object that controls the component’s layout and appearance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main part to consider is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;render()&lt;/code&gt; function inside the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App&lt;/code&gt; class. Here we are returning a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;View&lt;/code&gt; component which contains three child components.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt; component is used to display text. Here, we are using it to display label for our form.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TextInput&lt;/code&gt; component is used to get input from user. In our app, we need to allow user to fetch repos by entering Github username. So, we have used this component.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TouchableOpacity&lt;/code&gt; component is used to create a button to submit the form. Inside, there is another &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt; component which is used to display the label for the button.&lt;/p&gt;

&lt;p&gt;We have applied styles to all our component using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;style&lt;/code&gt; property of the respective component to get a nice looking UI.&lt;/p&gt;

&lt;p&gt;Save your changes to &lt;strong&gt;App.js&lt;/strong&gt; and return to the emulator. Double tap &lt;strong&gt;R&lt;/strong&gt; on your keyboard, and you’ll see your app starting to take shape:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-06-react-native-github-api-example-from-beginner-to-advance/3.png&quot; alt=&quot;App Preview&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can skip having to refresh the app by enabling live reload feature. Press &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cmd+M&lt;/code&gt; fr MAC or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl+M&lt;/code&gt; for Windows/Linux in the emulator, then select &lt;strong&gt;Enable Live Reload:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-06-react-native-github-api-example-from-beginner-to-advance/4.png&quot; alt=&quot;Enable live reload&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So far, we have completed the UI of our app. Now, let’s add functionality to it so that it can be useful.&lt;/p&gt;

&lt;p&gt;First add state object inside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App&lt;/code&gt; component before &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;render()&lt;/code&gt; function and add some default properties to it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;state &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  username: &lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt;,
  repos: &lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;,
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add new function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleChange&lt;/code&gt; after state object. This function is used to sync the value of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;username&lt;/code&gt; property of state object with the value entered in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TextInput&lt;/code&gt; component.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;_handleChange &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;evt&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  this.setState&lt;span class=&quot;o&quot;&gt;({&lt;/span&gt;
    username: evt.nativeEvent.text
  &lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onChange&lt;/code&gt; property to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TextInput&lt;/code&gt; component. This property allows us to link our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleChange&lt;/code&gt; function to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onChange&lt;/code&gt; event of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TextInput&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&amp;lt;TextInput
  &lt;span class=&quot;nv&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Enter your github username&quot;&lt;/span&gt;
  &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.input&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nv&quot;&gt;onChange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;this._handleChange&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
/&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add new function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_getUserRepos&lt;/code&gt; after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleChange&lt;/code&gt; function. This function will call the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Github&lt;/code&gt; API and get the list of repos for a given user in json format.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;_getUserRepos &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;username&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  username &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; username.toLowerCase&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;.trim&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  const url &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;https://api.github.com/users/&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;/repos&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return &lt;/span&gt;fetch&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.then&lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;res&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; res.json&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add new function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleSubmit&lt;/code&gt; after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_getUserRepos&lt;/code&gt;. This function is used to handle the button. When the user clicks on &lt;strong&gt;VIEW&lt;/strong&gt; button, this function will call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_getUserRepos&lt;/code&gt; function and when response is received, it will update our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;state&lt;/code&gt; object.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;_handleSubmit &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  this._getUserRepos&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;this.state.username&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    .then&lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;res&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      this.setState&lt;span class=&quot;o&quot;&gt;({&lt;/span&gt;repos: res&lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onPress&lt;/code&gt; property to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TouchableOpacity&lt;/code&gt; component. This property allows us to link our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleSubmit&lt;/code&gt; function to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onPress&lt;/code&gt; event of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TouchableOpacity&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&amp;lt;TouchableOpacity
  &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.button&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nv&quot;&gt;activeOpacity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;0.8&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nv&quot;&gt;onPress&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;this._handleSubmit&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;
  &amp;lt;Text &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.buttonText&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;VIEW&amp;lt;/Text&amp;gt;
&amp;lt;/TouchableOpacity&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;So far everything is in place but if you type your github username and click on &lt;strong&gt;VIEW&lt;/strong&gt; button, nothing will happen. We don’t have any way to display the response received from Github API.&lt;/p&gt;

&lt;p&gt;Add new function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_renderRepos&lt;/code&gt; after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_handleSubmit&lt;/code&gt; function. This function is responsible for rendering repos list. We are using a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ScrollView&lt;/code&gt; component and inside it, we are looping through the repos state and displaying the repo name in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;View&lt;/code&gt; component.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;_renderRepos &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
    &amp;lt;ScrollView&amp;gt;
      &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        this.state.repos.map&lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;repo, i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
            &amp;lt;View &lt;span class=&quot;nv&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;
              &amp;lt;Text&amp;gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;, &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;JSON.stringify&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;repo.full_name&lt;span class=&quot;o&quot;&gt;)}&lt;/span&gt;&amp;lt;/Text&amp;gt;
            &amp;lt;/View&amp;gt;
          &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &amp;lt;/ScrollView&amp;gt;
  &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{ this._renderRepos() }&lt;/code&gt; after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TouchableOpactity&lt;/code&gt; button component in render function of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App&lt;/code&gt; component. Here’s the updated code.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;render&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
    &amp;lt;View &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.container&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;
      &amp;lt;Text &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.label&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;GitHub Username&amp;lt;/Text&amp;gt;
      &amp;lt;TextInput
        &lt;span class=&quot;nv&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Enter your github username&quot;&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.input&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;onChange&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;this._handleChange&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;this.state.username&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      /&amp;gt;
      &amp;lt;TouchableOpacity
        &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.button&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;activeOpacity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;0.8&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;onPress&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;this._handleSubmit&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;
        &amp;lt;Text &lt;span class=&quot;nv&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;={&lt;/span&gt;styles.buttonText&lt;span class=&quot;o&quot;&gt;}&amp;gt;&lt;/span&gt;VIEW&amp;lt;/Text&amp;gt;
      &amp;lt;/TouchableOpacity&amp;gt;
      
      &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; this._renderRepos&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &amp;lt;/View&amp;gt;
  &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now, type your Github username in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Github Username&lt;/code&gt; field and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VIEW&lt;/code&gt; button. Your github repos will be listed below the button and since, we have used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ScrollView&lt;/code&gt; component you can also scroll the list if the list is longer.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-06-react-native-github-api-example-from-beginner-to-advance/5.png&quot; alt=&quot;Final app preview&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This concludes our basic app. In next post, we will use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FlatList&lt;/code&gt; component for better performance.&lt;/p&gt;

&lt;p&gt;Congratulations on completing this React Native tutorial! You can find the complete project &lt;a href=&quot;https://github.com/sandipbgt/GithubAPIExampleRN&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sat, 11 Aug 2018 11:30:00 +0545</pubDate>
        <link>http://sandipbgt.com/2018/08/11/react-native-github-api-example-from-beginner-to-advance/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2018/08/11/react-native-github-api-example-from-beginner-to-advance/</guid>
        
        
      </item>
    
      <item>
        <title>And After A Long Time The Boy Came Back Again</title>
        <description>&lt;p&gt;Its been so long, I haven’t written any blog post here since 2016. I did write some posts in August 2016 but due to some tight schedule back then, I was not able to continue. However, a lot had happened since then. One of the major event was, I along with Anup Neupane, Shankar Bhattarai, Mohan Tabdar and Tilak Parajuli co-founded a new startup called Zeftware Solutions on July 6, 2016 (official registration date) and most of my time spent working there. We took a small flat near New DSP Office, Biratnagar-01, Nepal and hired interns for frontend development with HTML, CSS and Javascript &amp;amp; backend in Ruby on Rails. We were able to set a culture to hire interns for the first time in Biratnagar. Since beginning, we had made a mindest that we would give them so much then they would ever expect. Most importantly, we want them to feel us. Analyzing now, I think, we were successfull in our goal. Below is the photo of founders of Zeftware Solutions.&lt;/p&gt;

&lt;p&gt;Note: Tilak Parajuli sir is missing in this photo since he joined us in 2017.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-05-and-after-a-long-time-the-boy-came-back-again/IMG_8421.JPG&quot; alt=&quot;Founders of Zeftware Solutions&quot; /&gt;&lt;/p&gt;

&lt;p&gt;They all were college students studying CSIT and most of them had little to no knowledge. So training them was difficult but not impossible.
I taught them all the things from scratch. First, I made them comfortable in Ubuntu because as a developer, without Ubuntu, its really difficult to continue development related works. All of them switched to Ubuntu and made it as their primary OS. Then they learned HTML, CSS, Javascript, and Ruby on Rails. Most of my time in office was spent with them sharing different things. I was able to collect so many memories and experiences.&lt;/p&gt;

&lt;p&gt;During that time, we also launched some of our products like namylo to solve the problem of location in Nepal. It allows you to give username to any location and rather than remembering gps co-ordinates, you can refer to your location using that unique username. The frontend was built using AngularJS, backend using Django REST API, database using PostgreSQL and mobile application using Android.&lt;/p&gt;

&lt;p&gt;Similary another product we launched was NoticePanda to solve the problem of sending notifications to students and teachers in schools/colleges. The stack used was HTML, CSS, Javascript and Django for web part and Android for mobile part. Educational institutational were given login details and from their dashboard they can easily send push notifications to students for free.&lt;/p&gt;

&lt;p&gt;But both of these products were discontinued when we launced our flagship product called zefed. It is a first SAAS based school college ERP in Nepal. We applied the concept of multitenancy using PostgreSQL and Django. Its still in use today. Most of the schools and colleges in Biratnagar are using this product. Initially we strugugled finding paid clients. Nobody believe upon us and let alone our product. Most of them were afraid to use web based software. Some even doubted on us regarding privacy. Some used the trail version but didn’t purchased. Some people told, price is very high and many reasons to not use our software and to not support us. But we were determined. We updated and tried so many strategies and looking now, so many things are changed. The situation now is favoring us. We have now earned so much reputation in our area and getting so many positive feedback. We were also awarded ICT Startup Award 2017, Nepal. We were the first company outside Kathmandu valley to won this prestigious award. Because of our achievement, many other people working in the field of IT in our hometown were inspired to start their own company. We motivated a lot of students, teachers, parents regarding importance of IT. We changed their mindset regarding web based applications and cleared all those confusion regarding offline desktop based web based software.&lt;/p&gt;

&lt;p&gt;While building these products, I got to learn so many things like Python, Django, Java, Android, Postgres, etc. Though I knew Python at that time already but doing small part time projects and doing real world projects are two different things. I got to learn new concepts including multitenancy, wildcard domain handling, software deployment and much other small things.&lt;/p&gt;

&lt;p&gt;As a bonus to interns, I taught them Python and Django because initially they joined us to learn ROR as it was our major language at that time but we switched to Django as most of our projects were done in Django. So. in other to get contribution from them, they were also taught Django.
The first batch completed their internship in 2017 and another batch joined us the same time. The experience with first batch was really amazing. I was able to learn so many things from them by sharing my knowledge with them. All of them were friendly, co-operative and hard-working. Below are some photos with first batch of interns during the presentation of their project.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-05-and-after-a-long-time-the-boy-came-back-again/IMG_8416.JPG&quot; alt=&quot;First batch interns&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-05-and-after-a-long-time-the-boy-came-back-again/IMG_8420.JPG&quot; alt=&quot;First batch interns with founders&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://sandipbgt.com/img/posts/2018-08-05-and-after-a-long-time-the-boy-came-back-again/IMG_8413.JPG&quot; alt=&quot;First batch interns with founders and outsiders&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In second batch, we made some changes and divided them into 3 groups. We made a group for Python &amp;amp; Django, Java &amp;amp; Android and web designing. Time has gone so fast that in 2, 3 months they are also about to complete their internship.&lt;/p&gt;

&lt;p&gt;As a whole, I collected lots of experiences in 2016 and 2017 and hoping to get more in 2018. From now forward, I will try to keep my blog updated with all things happening in my life. There are still some of things to share with you guys that I experienced in 2017 and I will be sharing them in upcoming days.&lt;/p&gt;
</description>
        <pubDate>Sun, 05 Aug 2018 08:40:00 +0545</pubDate>
        <link>http://sandipbgt.com/2018/08/05/and-after-a-long-time-the-boy-came-back-again/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2018/08/05/and-after-a-long-time-the-boy-came-back-again/</guid>
        
        
      </item>
    
      <item>
        <title>How To Display Network Speed On Unity Panel In Ubuntu?</title>
        <description>&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Indicator Netspeed&lt;/code&gt; displays the total current network traffic on the Unity Panel. It also shows current download and upload speed
as individual values.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8747/28734167682_0e40b15fe1_o_d.png&quot; alt=&quot;https://farm9.staticflickr.com/8747/28734167682_0e40b15fe1_o_d.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;installing-indicator-netspeed&quot;&gt;Installing Indicator Netspeed&lt;/h2&gt;
&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Indicator Netspeed&lt;/code&gt; can be installed by adding the PPA from webupd8.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository ppa:nilarimogard/webupd8
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;indicator-netspeed&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can also download the deb package from &lt;a href=&quot;http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/i/indicator-netspeed/&quot;&gt;here&lt;/a&gt; and 
install it manually.&lt;/p&gt;

&lt;p&gt;After the installation completes, you have to log out and log in again in other for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Indicator Netspeed&lt;/code&gt; to work.&lt;/p&gt;

&lt;p&gt;After &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Indicator Netspeed&lt;/code&gt; starts for first time, you have to specify the network interace from indicator menu because it does not detect
currently used network interface and by default it selects wlan0.&lt;/p&gt;
</description>
        <pubDate>Mon, 08 Aug 2016 08:39:00 +0545</pubDate>
        <link>http://sandipbgt.com/2016/08/08/display-network-speed-on-unity-panel-ubuntu/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2016/08/08/display-network-speed-on-unity-panel-ubuntu/</guid>
        
        
      </item>
    
      <item>
        <title>How To Disable Error Reporting In Ubuntu 16.04?</title>
        <description>&lt;p&gt;Sometimes while using Ubuntu, you may get some error popups that asks you to report problems. These errors are really very annoying.
In other to disable these error reporting, you can do either of the two things.&lt;/p&gt;

&lt;h3 id=&quot;stopping-the-error-reporting-temporarily&quot;&gt;Stopping the error reporting temporarily&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Open terminal by typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Alt&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;T&lt;/code&gt; and run the following command.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;service apport stop&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8563/28542913480_0db5227b0b_z_d.jpg&quot; alt=&quot;https://farm9.staticflickr.com/8563/28542913480_0db5227b0b_z_d.jpg&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;stopping-the-error-reporting-permanently&quot;&gt;Stopping the error reporting permanently&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Open terminal by typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Alt&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;T&lt;/code&gt; and run the following command.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;gedit /etc/default/apport&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8746/28542915700_8b8b739e79_o_d.png&quot; alt=&quot;https://farm9.staticflickr.com/8746/28542915700_8b8b739e79_o_d.png&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;After the file opens, change the value of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enabled=1&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enabled=0&lt;/code&gt; and save it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8059/28827061535_d6604ab8db_o_d.png&quot; alt=&quot;https://farm9.staticflickr.com/8059/28827061535_d6604ab8db_o_d.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That’s it. From now on, you won’t get those annoying error reporting popups.&lt;/p&gt;
</description>
        <pubDate>Sun, 07 Aug 2016 21:06:00 +0545</pubDate>
        <link>http://sandipbgt.com/2016/08/07/disable-error-reporting-ubuntu-1604/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2016/08/07/disable-error-reporting-ubuntu-1604/</guid>
        
        
      </item>
    
      <item>
        <title>How To Install Sublime Text In Ubuntu 16.04</title>
        <description>&lt;p&gt;&lt;strong&gt;Sublime Text&lt;/strong&gt; is a lightweight, multi-platform text editor. It has lots of cool features which you will love once you start using it. It is available for Ubuntu, Windows and Mac OS X. Sublime Text has a proprietary licence, but the application can also be used for free, without needing to do reverse engineer hacking. Those who want to support the developer’s work can buy Sublime Text for $70.&lt;/p&gt;

&lt;h2 id=&quot;features-of-sublime-text&quot;&gt;Features of Sublime Text&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Editing files side by side i.e you can have multiple views in same window&lt;/li&gt;
  &lt;li&gt;Cross platform&lt;/li&gt;
  &lt;li&gt;Functionality to find and replace with regular expressions&lt;/li&gt;
  &lt;li&gt;Batch edit with multiple selections&lt;/li&gt;
  &lt;li&gt;Rename variables quickly using multiple selections&lt;/li&gt;
  &lt;li&gt;The command palette give fast access to functionality&lt;/li&gt;
  &lt;li&gt;Using goto anything, you can quickly navigate between files&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;installing-sublime-text&quot;&gt;Installing Sublime Text&lt;/h2&gt;
&lt;p&gt;There are two versions of Sublime Text currently available to install. You can install any one version.&lt;/p&gt;

&lt;h3 id=&quot;installing-sublime-text-2&quot;&gt;Installing Sublime Text 2&lt;/h3&gt;
&lt;p&gt;Open terminal and type the below commands to install Sublime Text 2&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository ppa:webupd8team/sublime-text-2
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;sublime-text&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;to-remove-sublime-text-2&quot;&gt;To remove Sublime Text 2&lt;/h3&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get remove sublime-text&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;installing-sublime-text-3&quot;&gt;Installing Sublime Text 3&lt;/h3&gt;
&lt;p&gt;Open terminal and type the below commands to install Sublime Text 3&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository ppa:webupd8team/sublime-text-3
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;sublime-text-installer&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;to-remove-sublime-text-3&quot;&gt;To remove Sublime Text 3&lt;/h3&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get remove sublime-text-installer&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;After the installation completes, open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dash&lt;/code&gt; and type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Sublime Text&lt;/code&gt; and click on it to start the Sublime Text editor.&lt;/p&gt;

&lt;h2 id=&quot;some-screenshots&quot;&gt;Some screenshots&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8837/28636985731_62d389152a_b_d.jpg&quot; alt=&quot;https://farm9.staticflickr.com/8837/28636985731_62d389152a_b_d.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8617/28682245556_7cb831db4a_b_d.jpg&quot; alt=&quot;https://farm9.staticflickr.com/8617/28682245556_7cb831db4a_b_d.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm9.staticflickr.com/8637/28682247796_c60ab8c364_b_d.jpg&quot; alt=&quot;https://farm9.staticflickr.com/8637/28682247796_c60ab8c364_b_d.jpg&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 02 Aug 2016 11:53:00 +0545</pubDate>
        <link>http://sandipbgt.com/2016/08/02/how-to-install-sublime-text-in-ubuntu-1604/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2016/08/02/how-to-install-sublime-text-in-ubuntu-1604/</guid>
        
        
      </item>
    
      <item>
        <title>How To Receive Daily Horoscope On Your Mobile For Free Using Zapier, Twilio and Astrosage</title>
        <description>&lt;p&gt;Have you ever wondered of receiving daily horoscope on your mobile for free? If yes, then follow this simple guide to setup your mobile to receive daily horoscope.&lt;/p&gt;

&lt;p&gt;We will be using &lt;a href=&quot;https://zapier.com&quot;&gt;Zapier&lt;/a&gt; to automate the task, &lt;a href=&quot;http://twilio.com&quot;&gt;Twilio&lt;/a&gt; to send free SMS and &lt;a href=&quot;https://astrosage-api.herokuapp.com/&quot;&gt;Astrosage API&lt;/a&gt; for horsocope api.&lt;/p&gt;

&lt;p&gt;So, let’s get started.&lt;/p&gt;

&lt;h2 id=&quot;setting-up-twilio&quot;&gt;Setting up Twilio&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;First, signup for a Twilio trial account at &lt;a href=&quot;https://www.twilio.com/try-twilio&quot;&gt;https://www.twilio.com/try-twilio&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Visit &lt;a href=&quot;https://www.twilio.com/user/account/phone-numbers/getting-started&quot;&gt;https://www.twilio.com/user/account/phone-numbers/getting-started&lt;/a&gt; and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Get your first Twilio phone number&lt;/code&gt; button to get a phone number from Twilio.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm1.staticflickr.com/584/23675858242_43681a849c_b_d.jpg&quot; alt=&quot;Step 1&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;After the modal window appears, click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Choose this Number&lt;/code&gt; and copy this phone number as we will need this later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm1.staticflickr.com/717/23702017431_fec8e98739_b_d.jpg&quot; alt=&quot;Step 2&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;While you are on this page, click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Show API Credentials&lt;/code&gt; and copy your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ACCOUNT SID&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AUTH TOKEN&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Visit &lt;a href=&quot;https://www.twilio.com/user/account/phone-numbers/verified&quot;&gt;https://www.twilio.com/user/account/phone-numbers/verified&lt;/a&gt; and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Verify a number&lt;/code&gt; button to verify the phone number to which you want to receive horoscope.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5826/23156172814_e7892a313b_b_d.jpg&quot; alt=&quot;Step 3&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Visit &lt;a href=&quot;https://www.twilio.com/user/account/settings/international/sms&quot;&gt;https://www.twilio.com/user/account/settings/international/sms&lt;/a&gt; and tick the country to which your phone number belongs to enable &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Geographic Permissions&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;setting-up-zapier&quot;&gt;Setting up Zapier&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Signup for a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Zapier&lt;/code&gt; account at &lt;a href=&quot;https://zapier.com/sign-up/&quot;&gt;https://zapier.com/sign-up/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Make a New Zap&lt;/code&gt; button&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5707/23784336105_45a1bac42c_b_d.jpg&quot; alt=&quot;Step 4&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Choose a Trigger app&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Schedule by Zapier&lt;/code&gt; from the list.&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Choose a Trigger&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Every Day&lt;/code&gt; from the list.&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Choose an Action app&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Webhooks by Zapier&lt;/code&gt; from the list.&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Choose a Action&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;POST&lt;/code&gt; from the list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5719/23157524843_aca9bccd28_b_d.jpg&quot; alt=&quot;Step 5&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Continue&lt;/code&gt; button until you reach &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Step 4 Filter Schedule By trigger&lt;/code&gt; sreen.&lt;/li&gt;
  &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Time of Day&lt;/code&gt; select the time you want to receive daily horoscope and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Continue&lt;/code&gt; button.&lt;/li&gt;
  &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Match up  Schedule by Zapier Day to  Webhooks by Zapier POST&lt;/code&gt; screen, enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://astrosage-api.herokuapp.com/api/horoscope/{your-horoscope}/daily&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;URL&lt;/code&gt; field replacing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;your-horoscope&lt;/code&gt; with your own horoscope.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;json&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Payload Type&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Data&lt;/code&gt; screen, click on plus button three times to add three more text boxes.&lt;/li&gt;
  &lt;li&gt;Enter the details as shown in the screenshot below replacing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;auth_token&lt;/code&gt; with your Twilio Auth Token, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;account_sid&lt;/code&gt; with your Twilio Account SID, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;to_phone&lt;/code&gt; with phone number to which you want to receive horoscope and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;from_phone&lt;/code&gt; with the phone number you got from Twilio.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5661/23758223596_5f49609c47_b_d.jpg&quot; alt=&quot;Step 6&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Continue&lt;/code&gt; button to go &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Test this ZAP&lt;/code&gt; screen.&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Test Schedule by Zapier trigger&lt;/code&gt; to check the trigger and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Continue&lt;/code&gt; button.&lt;/li&gt;
  &lt;li&gt;in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Name and turn this Zap on&lt;/code&gt; screen, enter the name for your zap and click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Turn Zap on&lt;/code&gt; button to turn on your zap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Congratulation, you have successfully setup your phone numer to receive daily horoscope for free everyday.&lt;/p&gt;

&lt;p&gt;If you find it complex to setup, you can order my &lt;a href=&quot;https://www.fiverr.com/sandipbgt/send-you-horoscope-on-your-phone-as-sms&quot;&gt;Fiverr Gig&lt;/a&gt; and I would set it up for you or you can also contact me via email.&lt;/p&gt;
</description>
        <pubDate>Wed, 16 Dec 2015 14:23:00 +0545</pubDate>
        <link>http://sandipbgt.com/2015/12/16/how-to-receive-daily-horoscope-on-your-mobile-for-free-using-zapier-twilio-astrosage/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2015/12/16/how-to-receive-daily-horoscope-on-your-mobile-for-free-using-zapier-twilio-astrosage/</guid>
        
        
      </item>
    
      <item>
        <title>TwiPodcast, A Web App that Helps You Listen Podcast On Your Phone Without Internet</title>
        <description>&lt;p&gt;I am happy to release my new open source project &lt;strong&gt;TwiPodcast&lt;/strong&gt;. Actually, I built this project for one of my best friend who lives in India.&lt;/p&gt;

&lt;p&gt;We usually have a regular chat on Facebook and wishing her &lt;strong&gt;Good Morning&lt;/strong&gt; and &lt;strong&gt;Good Night&lt;/strong&gt; everyday had become my daily routine. One day, I thought, why not wish her everyday in my own voice via phone call. So, to wish her, I can use Facebook Messenger, WhatsApp or Viber as there are so many VOIP alternatives. But all these options require active internet connection both to sender side and receiver side. If it was one day task, I could call from my phone or use those free VOIP apps but I need to wish her everyday and it is going to cost me a lot if I continue with existing call options.&lt;/p&gt;

&lt;p&gt;As a developer, I thought why not build something myself that can be used to call phones for free. This is how the idea for the project comes in my mind. Initially this project was made specifically for my friend but then I realized, there might be many people like me, who wants to wish their beloved ones in their own voice for so, I generalized the project for normal people.&lt;/p&gt;

&lt;p&gt;Though, the initial idea was to wish my friend but after working on the project for some days, the idea changed from wishing to listening podcast and so named TwiPodcast as there are many people who love listening podcast.&lt;/p&gt;

&lt;h2 id=&quot;what-is-twipodcast&quot;&gt;What is TwiPodcast&lt;/h2&gt;

&lt;p&gt;Twipodcast is a web app that allows you to listen podcast or any mp3 media file on your phone for free without internet.&lt;/p&gt;

&lt;p&gt;Yes, you heard it right. You don’t need internet to listen podcast.&lt;/p&gt;

&lt;h2 id=&quot;how-it-works&quot;&gt;How it works?&lt;/h2&gt;

&lt;p&gt;The web app uses the url of the mp3 file and calls the given phone number to stream the mp3 file directly to the phone number via phone call without requiring internet to the receiver side. You can supply a valid url of any media file that is of mp3 format to stream the media file to your phone without internet.&lt;/p&gt;

&lt;h2 id=&quot;use-cases&quot;&gt;Use cases&lt;/h2&gt;

&lt;h3 id=&quot;listening-podcast&quot;&gt;Listening podcast&lt;/h3&gt;

&lt;p&gt;Suppose, you want to listen any podcast on your mobile phone. To listen it, you must have internet connection and you know, it is going to eat your data package if you are on mobile network. In such a situation, you can use TwiPodcast to stream the podcast directly to your phone for free without internet.&lt;/p&gt;

&lt;h3 id=&quot;dedicating-songs&quot;&gt;Dedicating songs&lt;/h3&gt;

&lt;p&gt;Suppose, you liked any song and want to dedicate it to your beloved ones. In order to do so, you must have url of that song and you can also use TwiPodcast to dedicate song to your beloved ones.&lt;/p&gt;

&lt;h3 id=&quot;convert-text-to-speech&quot;&gt;Convert text to speech&lt;/h3&gt;

&lt;p&gt;Suppose, you want to convert the text into speech so that you friend can listen what you typed. In such a situation, you can use TwiPodcast to perform the task. You need to type the message and TwiPodcast will convert the text into speech once the call is made. The result is, your friend listens the message you typed in the textbox.&lt;/p&gt;

&lt;h2 id=&quot;how-to-use-twipodcast&quot;&gt;How to use TwiPodcast?&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Create an account at &lt;a href=&quot;http://twilio.com&quot;&gt;http://twilio.com&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Verify your email.&lt;/li&gt;
  &lt;li&gt;Get a Twilio number.&lt;/li&gt;
  &lt;li&gt;Verify the number whom you want to call.&lt;/li&gt;
  &lt;li&gt;Copy your &lt;strong&gt;account sid&lt;/strong&gt; and &lt;strong&gt;auth token&lt;/strong&gt; from Twilio dashboard page.&lt;/li&gt;
  &lt;li&gt;Visit &lt;a href=&quot;http://sandipbgt.github.io/twipodcast/#/sendPodcast&quot;&gt;http://sandipbgt.github.io/twipodcast/#/sendPodcast&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Enter all the details.&lt;/li&gt;
  &lt;li&gt;In &lt;strong&gt;Voice text&lt;/strong&gt; input field, type the message you want to convert to speech.&lt;/li&gt;
  &lt;li&gt;In &lt;strong&gt;Podcast Url&lt;/strong&gt; input field, type the url of the podcast you want to listen. Some of the podcasts url can be found by clicking &lt;strong&gt;Browse Podcasts&lt;/strong&gt; menu. You can also use url of any valid mp3 file.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;SEND&lt;/strong&gt; button and a phone call will be made to the number that you entered in &lt;strong&gt;To phone&lt;/strong&gt; input field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are a developer, you might be interested in reading the source code at &lt;a href=&quot;https://github.com/sandipbgt/twipodcast&quot;&gt;https://github.com/sandipbgt/twipodcast&lt;/a&gt; or the documentation at &lt;a href=&quot;http://sandipbgt.github.io/twipodcast/docs&quot;&gt;http://sandipbgt.github.io/twipodcast/docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Most of  the countries are supported for Twilio phone calls. However, Nepal is not in the list currently.&lt;/p&gt;
</description>
        <pubDate>Sat, 14 Nov 2015 11:00:00 +0545</pubDate>
        <link>http://sandipbgt.com/2015/11/14/twipodcast-helps-you-listen-podcast-on-your-phone-without-internet-for-free/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2015/11/14/twipodcast-helps-you-listen-podcast-on-your-phone-without-internet-for-free/</guid>
        
        
      </item>
    
      <item>
        <title>How To Display Current Git Branch Name In Terminal Prompt In Ubuntu?</title>
        <description>&lt;p&gt;Git and GitHub is one of the most imortant tool for software development.
One of its great feature is branching/merging. Whenever I am inside a git directory, I have to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git status&lt;/code&gt; to see which branch I am currently working on. Contstantly switching branches is always confusing to me.&lt;/p&gt;

&lt;p&gt;The solution to this is to have the terminal prompt display the current branch name.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm6.staticflickr.com/5734/22459069076_e69af8100f_z_d.jpg&quot; alt=&quot;My terminal prompt&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;First create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bash&lt;/code&gt; directory in your home directory and clone the project to it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; ~/.bash
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/.bash
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git clone https://github.com/jimeh/git-aware-prompt.git&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Edit your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt; and add the following to the bottom:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GITAWAREPROMPT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~/.bash/git-aware-prompt
&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GITAWAREPROMPT&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/main.sh&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PS1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\$&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{debian_chroot:+(&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\$&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;debian_chroot)}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\u&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\h&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\w&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$txtcyn&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\]\$&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;git_branch&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$txtred&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\]\$&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;git_dirty&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$txtrst&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\]\$&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; into any git directory, current branch name will be shown in the terminal prompt.&lt;/p&gt;
</description>
        <pubDate>Mon, 26 Oct 2015 13:08:00 +0545</pubDate>
        <link>http://sandipbgt.com/2015/10/26/how-to-display-current-git-branch-name-in-terminal-prompt-in-ubuntu/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2015/10/26/how-to-display-current-git-branch-name-in-terminal-prompt-in-ubuntu/</guid>
        
        
      </item>
    
      <item>
        <title>How To Install Arc Theme In Ubuntu?</title>
        <description>&lt;p&gt;Ubuntu’s default theme is nice enough, but it is hasn’t changed much
in several years. If you want a stylish looking Ubuntu desktop, try an
alternative theme. Mine favourite is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Arc&lt;/code&gt; theme.&lt;/p&gt;

&lt;p&gt;Note: You must be running &lt;strong&gt;Ubuntu 15.04 or later&lt;/strong&gt; to use this theme.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://farm1.staticflickr.com/641/22497045831_a5b6488eaf_z_d.jpg&quot; alt=&quot;Arc Theme Preview&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Open your terminal and run the below commands&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;unity-tweak-tool
wget http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_15.04/Release.key
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-key add - &amp;lt; Release.key
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;sh &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_15.04/ /' &amp;gt;&amp;gt; /etc/apt/sources.list.d/arc-theme.list&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;arc-theme&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;configuration&quot;&gt;Configuration&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Unity Tweak Tool&lt;/code&gt; from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dash&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Theme&lt;/code&gt; under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Appearance&lt;/code&gt; section.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Arc&lt;/code&gt; theme from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Available themes&lt;/code&gt; list.&lt;/li&gt;
  &lt;li&gt;Click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Icons&lt;/code&gt; tab.&lt;/li&gt;
  &lt;li&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Elementary-xfce-dark&lt;/code&gt; from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Available themes&lt;/code&gt; list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy the new look of your Ubuntu desktop.&lt;/p&gt;
</description>
        <pubDate>Sun, 25 Oct 2015 14:11:00 +0545</pubDate>
        <link>http://sandipbgt.com/2015/10/25/how-to-install-arc-theme-in-ubuntu/</link>
        <guid isPermaLink="true">http://sandipbgt.com/2015/10/25/how-to-install-arc-theme-in-ubuntu/</guid>
        
        
      </item>
    
  </channel>
</rss>
