<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Renoir dos Reis</title>
    <description>The latest articles on DEV Community by Renoir dos Reis (@renoirtech).</description>
    <link>https://dev.to/renoirtech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F24243%2Fd9972e6c-a5a5-477b-930f-8c8c3cd99674.jpeg</url>
      <title>DEV Community: Renoir dos Reis</title>
      <link>https://dev.to/renoirtech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/renoirtech"/>
    <language>en</language>
    <item>
      <title>Testing integrations between third-party webhook and local applications using Ngrok</title>
      <dc:creator>Renoir dos Reis</dc:creator>
      <pubDate>Thu, 10 Jan 2019 23:31:30 +0000</pubDate>
      <link>https://dev.to/renoirtech/testing-integrations-between-third-party-webhook-and-local-applications-using-ngrok-5317</link>
      <guid>https://dev.to/renoirtech/testing-integrations-between-third-party-webhook-and-local-applications-using-ngrok-5317</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;It may sound silly, but ever since I started developing web applications I've always found it a pain in the ass to inspect and debug integrations between my app and third-party webhooks - in addition to the hassle of replicating events, I've never relied on testing "hypothetical" scenarios - thinking that I even started an open source project that tried to solve this problem, whose name is called &lt;a href="https://github.com/pequitech/hookathon"&gt;Hookathon&lt;/a&gt; that had the objective of inspecting and redirecting requests to local environments through a client / package installed in the project, finally replicating the requests stored in a bucket in the desired project, but we do not dedicate what is necessary to maintain the project in good health.&lt;/p&gt;

&lt;h1&gt;
  
  
  The tool
&lt;/h1&gt;

&lt;p&gt;The good news that it's not necessary, there is a solution that solves all these problems in an efficient, free way, this is &lt;a href="https://www.ngrok.com"&gt;Ngrok&lt;/a&gt;, a product created by &lt;a href="https://inconshreveable.com"&gt;Alan Shreve&lt;/a&gt; -- which has worked on giants like Microsoft and Twilio. Alan wrote about the creation of Ngrok and an &lt;a href="https://inconshreveable.com/09-25-2013/ngrok-tunnels-better-faster-stronger/"&gt;article on his blog&lt;/a&gt; he describes the product as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Ngrok is a tunneling, reverse proxy that establishes secure tunnels from a public endpoint to a locally running network service while capturing all traffic for inspection and replay. It is an open-source project on GitHub."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Let's get started:
&lt;/h1&gt;

&lt;p&gt;Well, now that you know a little bit about the tool and why i found it let's demonstrate how to expose a local environment to allow third-party services to submit requests to local environments via Webhook is very simple and the two solutions that I'm going to present have been tested and work with the following scenarios :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scenario 1: A PHP project using PHP 7.2.6 Development Server&lt;/li&gt;
&lt;li&gt;Scenario 2: A Laravel (PHP) project using Laravel Development Server (php artisan serve)&lt;/li&gt;
&lt;li&gt;Scenario 3: A Laravel (PHP) project using Laravel Homestead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To do this just follow the steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Access the &lt;a href="https://ngrok.com"&gt;Ngrok website&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Register or Login&lt;/li&gt;
&lt;li&gt;Download the client based on your OS&lt;/li&gt;
&lt;li&gt;Authenticate the client downloaded following the instructions that appear on the same page you've downloaded it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the first two scenarios just run the following command&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ngrok http &amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ex: ngrok http 127.0.0.0.1:666&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For the third scenario (if you are using a domain to access the homestead Ex: homestead.test you must rewrite the host-header. But don't worry, to achieve it just increment the command above to something like)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ngrok http &amp;lt;homestead_host_ip&amp;gt;:&amp;lt;port&amp;gt; -host-header=&amp;lt;homestead_domain&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;example: ngrok http 192.168.10.10:80 -host-header=homestead.test&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Voilà, now just point the URL generated by Ngrok in Webhook that you want to test and enjoy this wonderful solution.&lt;/p&gt;

&lt;p&gt;Have any questions about Ngrok, how it works and what else is recommended? Check the "How it works" page of the &lt;a href="https://ngrok.com/product"&gt;official website&lt;/a&gt;. If you are even more NERD and like to read the documentation before you start using it, follow the link to the &lt;a href="https://ngrok.com/docs"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Credits
&lt;/h1&gt;

&lt;p&gt;This article uses the following sources as a basis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Knox reply @ Laracasts discussion forum: &lt;a href="https://laracasts.com/discuss/channels/servers/homestead-ngrok#reply=156596"&gt;https://laracasts.com/discuss/channels/servers/homestead-ngrok#reply=156596&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Mbeck's blog - To use the thumbnail
&lt;a href="https://blog.mbeck.com.br/como-fazer-tunelamento-de-localhost-de-forma-segura-ee696fcd1180"&gt;https://blog.mbeck.com.br/como-fazer-tunelamento-de-localhost-de-forma-segura-ee696fcd1180&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>ngrok</category>
      <category>devops</category>
    </item>
    <item>
      <title>Why you should try the community punch</title>
      <dc:creator>Renoir dos Reis</dc:creator>
      <pubDate>Wed, 27 Dec 2017 13:12:54 +0000</pubDate>
      <link>https://dev.to/renoirtech/why-you-should-try-the-community-punch-2c3k</link>
      <guid>https://dev.to/renoirtech/why-you-should-try-the-community-punch-2c3k</guid>
      <description>&lt;h1&gt;
  
  
  Community Punch
&lt;/h1&gt;

&lt;p&gt;In the ending of March Bruno Silva (24) was reported lost to the local police of Rio Branco capital of Acre on the north of Brazil, but something got peculiar on this case, Bruno left his room’s walls and fourteen books full of handwritten encoded texts. This texts choked the local population and became viral on the national media, rapidly Bruno became known on the internet as the Acre alchemist, but no clue of what the texts talk about was found till the first week of April.&lt;/p&gt;

&lt;p&gt;On the first week of April me and my business partner Igor Rincon  — cyber security researcher— we were finishing another usual sprint on Antecipe (a Cyber Security startup that we founded alongside with other partners) late night when Igor was too much quiet for his personality. When i came across with what he was doing i saw Igor was almost finishing the decoding one of Bruno’s text called Caminho Dificil, so i started to help him until i thrown on the table one idea: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why not create an website that helps other people to decode other texts with this decode alphabet that you discovered? And why we don’t try to unify all translations in one place? Why not open the code of this site for everyone that want to collaborate with its improvement?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So we created an MVP (minimum viable product) of the idea in the site called decifreolivro.com and open the code to the community via Github repository called Hardpath (github.com/hardpath) and went to sleep in our inflatable beds.&lt;/p&gt;

&lt;p&gt;On the other day later in the lunch time we’ve got our first pull-request from a woman that wanted to improve the layout of the site. Few hours later we received more than fifteen pull-requests from people i never knew before this project. These pull-requests purpose to improve our site in many ways that we never expected (like the creation of the font-family Giordano representing the first alphabet that we solved) to improve and thanks to the community we were always walking forward in quality, and this is the community punch that i would like to talk and show to you why you must think twice in the possibility of open the next project to the community.&lt;/p&gt;

&lt;p&gt;In the first week of the project we got more than two hundred of thousands unique visitors and more than 50 stars on our Github project. We shared our knowledge to the community and the community retribute with a large variability of knowledge which considering alone would be a great answer to your question the possibility of share you project to the world.&lt;/p&gt;

&lt;p&gt;Me and Igor got thousands of connections via email, Facebook, Linkedin, which let us to be in touch with people engaged with the same interests ta we have. Some of this connections open the path to other fabulous social projects like Findrr.org (an app to find lost people near you based on the current search radius that spread according to the person was seen in that area).&lt;/p&gt;

&lt;p&gt;The community quickly discovered other encoding that Bruno used on other texts and translated many other Bruno’s text in less than a month so our purpose to unify the translations was accomplished thanks for the community.&lt;/p&gt;

&lt;p&gt;We had the chance to interact with extraordinary people, created friends and we invited some of then to work with us in other projects (the knowledge we shared was immeasurable), we were also invited to talk about it on some conferences and our career achieved the next level on development community participation.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;No matter what is the objective that your project aim to achieve, if you open it to the community you probably accelerate the speed to reach your goals. You probably will learn new skills by collaborating with other members. I call this Community Punch.&lt;/p&gt;

</description>
      <category>community</category>
      <category>career</category>
    </item>
  </channel>
</rss>
