Ngrok – Publish localhost securely

Ngrok allows users to deploy a secure tunnel to their own box. This allows for application sharing without the hassle of deploying application or sharing local network ips.

Ngrok acts as a NAT server sitting between your localhost and the internet. Ngrok generates http endpoints like http://f7f49fde.ngrok.io/.

To Get Started with ngrok.io Visit.

For a quick taste of ngrok use the gist below. Make sure to use linux or mac.

curl https://gist.githubusercontent.com/gabber12/8109d10ba732ac380502135489b28c97/raw/2811ebee68ce8ecefbdc37d54ec1805812427544/ngrok-demo.sh | bash -s linux

The snippet creates a Hello World flask application and intializes a ngrok tunnel.Once ngrok connects you can open the endpoint to access the application.



Ngrok handles a bunch of other stuff like

  • Authentication – Signup on ngrok.io and save auth token by ngrok authtoken {token}
  • Protocols – Out of the box ngrok allows for HTTP TLS and tcp based tunnels.
  • Custom domains – Custom domains can be reserved on ngrok by upgrading from free plan.

Ngrok also provides a neat dashboard to monitor account tunnels.

I myself found ngrok pretty useful for getting feedback on early stage projects, debugging mobile apps by routing traffic to a local setup and even connect to my machine at home through ssh.

Building an Elixir CLI application

Elixir-lang is a dynamic, functional programming language which runs on top of the erlang VM. Running on beam(VM) it comes with all the goodies like low-latency and ease of building fault-tolerant distributed systems.

Elixir comes with excellent tooling and getting started with a new project is a breeze with mix. Mix is a build tool that ships with Elixir that provides tasks for creating, compiling, testing your application, managing its dependencies and much more.

Mix creates a new project with appropriate readme a gitignore the lib directory (all your source code would live here) and a test directory. Continue reading

Whats new in Mysql 8.0

Mysql 8.0 was released a couple of months back, if you havent heard the news here is what it brings to the world.

MySQL 8.0 status. MySQL 8.0 is a development series not recommended for production use.For latest update see

Global Data Dictionary

Instead of maintaining the FRM, TRG.. files, MySql will use the global data dictionary to store table metadata. These will be cached in memory as data objects. There is a pragmatic difference between system table and data dictionary as the mysql blogs says

Data dictionary contains meta data needed to execute SQL queries while system tables contain auxiliary meta-data like timezone and help information.

Roles

Instead of remembering which user had the INSERT UPDATE privilege now MySql gives the ability to create roles. Roles are basically a group of privileges.
So you might want to create an analytics role and assign it to all users who only want read access. Certainly, should help DevOps, DBA guys.

Index Toggling

MySql now allows for making an index invisible, what invisibility signifies is that the MySql query optimizer wont consider that index in the query plan optimization. The primary use case here is to monitor query performance after making index invisible and then proceed as needed, as toggling index costs almost nothing.

Better UUID support

For long it has been considered a bad idea to make UUID as primary key And for good reasons. Mysql now adds UUID_TO_BIN, BIN_TO_UUID functions, these solve two problems

  • Increase space efficiency vs varchar(36)
  • The problem of innodb storing data by primary key order(by swapping the high time variant part to start

For more detailed changes refer MySql Blog or What new in MySql 8.0

This is the first blog in the HHYN(Have you heard the news) series.

Feedback is always precious so  please like, reblog or comment below.

Introduction to Rust-lang

Rust is a compiled, statically-typed, non-garbaged collected systems programming language. An initiative by Mozilla, it has attracted a lot of traction lately because of its blazing fast speed and the high level abstraction(as the rust-lang page says “Zero cost abstractions”).

Read Time ~10 mins.
Continue reading

Elm-Lang : Client side functional programming

Elm is a client side pure functional programming language for programming. Elm code compiles down to HTML, CSS and Javascript. The introduction page mentions it being a competitor to React.

Elm is a functional language that compiles to JavaScript. It competes with projects like React as a tool for creating websites and web apps.

Dont just dismiss this as Yet another language that transpiles to JS. Elm has a lot of nifty features, that makes it a choice worth considering.

Continue reading

All you need to know about HTTP/2

HTTP/2 is the largest change in Hyper text transfer protocol after almost 16 years. Being a major version upgrade from HTTP/1.1, there has been a lot of discussion around it.

HTTP/2 is a binary protocol highly inspired from Google’s SPDY, It brings improvements over older version of HTTP in terms of security(by proposing an explicit TLS profile) , speed and simplicity. HTTP/2 can be used both on TLS and TCP More details, but most browsers only support it over TLS.

Major additions in HTTP/2

Continue reading

Laravel Elixir: Cakewalk frontend build configuration

As a frontend developer, you would be accustomed to using task runners like grunt or gulp.

Task runner automate the usually tasks like concatenation, minification, trans-compiling etc. Chances are you even wrote the configuration files for your task runners. If you have written or seen such configuration, you would agree its a tedious task. Finding out which task to run and then configuring the input output directories and what not.

Recently i was exploring laravel and php, and for frontend automation the docs referred to –

    Laravel-elixir

Continue reading

Why you should care about typescript?

Javascript is being used to develop apps which are getting more and more complex and run on device spanning from web, mobile to PCs. Javascript (as the name suggest) is a scripting language. This means it lacks the usual constructs used to structure large application like – modules, classes and interfaces.

Also without the love of static typing developers usually face long cryptic runtime errors which are hard to understand and debug.

“Enters TypeScript.”

Continue reading