teleren/devto huggingface dataset:
How to generate 11 char hash key for Sms Retriever?
Tags: android, react, reactnative, javascript
Published: 2020-06-30 19:13:02

11 digit unique hash string is the key used for auto verifying SMS. Google Play Services utilizes the hash string to figure out which check messages to send to your application. This unique hash can be different for different environments.  For example, if an app is signed by a debug Keystore for development the hash will be different. Similarly, it will be different for production build if it is signed by a production Keystore. Also if the app is signed by app signing by Google Play again the hash will be different.
**Let's get started on how to generate this hash**

**Solution 1 if your app is signed by google play**

**Step1-** Go to play console -> Open app -> Release management -> App Signing -> Download Certificate .
Eg- A file will get download like *deployment_cert.der*


**Step2-** Convert the *deployment_cert.der* file to a .jks file, use below command
``` keytool -importcert -alias YOUR_ALIAS -file deployment_cert.der -keystore certificate.jks -storepass YOUR_PASSWORD ```
(replace *alias* with your alias name and *YOUR_PASSWORD* with your keystore password)


**Step3-** Once you enter the command, it will prompt like->
Trust this certificate? [no]: yes -> Certificate was added to Keystore

**Step4-** Now in terminal enter command
``` keytool -exportcert -alias YOUR_ALIAS -keystore certificate.jks | xxd -p | tr -d "[:space:]" | echo -n YOUR_PACKAGE `cat` | sha256sum | tr -d "[:space:]-" | xxd -r -p | base64 | cut -c1-11 ```

(replace *alias* with your alias name and *YOUR_PASSWORD* with your Keystore password)


**Step5-** Finally you will get the hash. For more original documentation refer- [Click me](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string)

**Step6-** To know more on how to auto verify OTP on react native without asking permission [read this article ](https://dev.to/jyotishman/how-to-auto-read-sms-otp-in-react-native-without-permission-13a6)
How to auto-read SMS/OTP in react native without permission?
Tags: reactnative, react, android, javascript
Published: 2020-06-30 19:12:57

Gone are those days when the entire SMS read permission is taken only just for getting the OTP for login or check purposes.

![dev image](https://dev-to-uploads.s3.amazonaws.com/i/xzwqmwtu983ql2xjxgnt.png)

Google just released an API called SMS Retriever API that allows you to fetch the SMS without any permission from the app.

So, basically on android device permissions are categorized into 2 categories- 
1. Normal permission
2. Dangerous permission

SMS permission like **(READ_SMS, WRITE_SMS, SEND_SMS)** comes under dangerous permission. That means whenever the app is asking for such dangerous permission the app gets rejected while publishing to play store. Hence the [SMS Retriever API ](https://developers.google.com/identity/sms-retriever/overview) comes into the picture. 
Instead of taking the entire SMS Permission only for a single OTP, it's great to use the API and get rid of app rejection from google play store. **So, let's get started on how we build this feature on react native-**

1. The first step before starting is we should know the SMS rules for the API to work correctly.
A valid verification message might look like the following: ```
<#> Your Example app code is: 123ABC78 /f8Escobih1Z
```

2. The last 11 digits alphanumeric character is the unique hash generated for the app. That 11 digits unique character is the main key where google play services listen for the SMS using the SMS Retriever API. 

3. If you don't know how to get the unique 11 digit hash of your app  [read this article.](https://dev.to/jyotishman/how-to-generate-11-char-hash-key-for-sms-retriever-2ag4)

4. Once we know the 11 digit hash and we have configured the SMS like the template mentioned on point 1 we are ready to listen to the OTP.

5. To start listening to our SMS/OTP we will need an npm package to perform the task. 
React Native SMS Retriever is the best plugin with clear documentation where we can detect the user phone as well as listen to SMS. To know more about how to use this package [read this article.](https://www.npmjs.com/package/react-native-sms-retriever)
WebAssembly with Rust and React (Using create-react-app)
Tags: webassembly, react, rust, webdev
Published: 2020-06-30 18:57:30

WebAssembly looks quite promising in bringing high performance, near-native speed to frontend applications, all from within the browser.

This opens up entirely new fronts/avenues for frontend application which was previously inaccessible. There are numerous articles and writings on webassembly out there, and this article's scope is not about the workings of WebAssembly but instead about setting it up with Rust and React, so one can use this boilerplate code to build useful applications.

The reason I chose Rust is that Rust as a language is really good and is well suited for systems programming and also I have been exploring Rust for close to a month for another side project of mine but that is for another day.

Create a new app using create-react-app
```
npx create-react-app my-app
```
create-react-app is the defacto tool to create a react app which takes care of setting up all the initial configuration and scripts, so developers can focus more on creating applications rather than configuring them

```
sudo npm i -g wasm-pack --unsafe-perm=true
```
We will be using this to create a native rust package that is configured to compile to wasm. One can think of it as a create-react-app equivalent for the Rust module. 

```
wasm-pack new <your-native-module-name>
```
This will create a native rust module

Now, you can restructure the app the way you want, just make a note of the relative path of the native module from the project's root.

Create-react-app takes care of all the configuration, but it does come at a price. We can't modify configurations to suit our needs, because that is the job of create-react-app. But for adding our rust module and WebAssembly into our build, we need to update webpack config.

We don't need to eject create-react-app, there is a way we can do this without ejecting create-react-app; using ‘react-app-rewired’ 

```
npm install react-app-rewired @wasm-tool/wasm-pack-plugin --save-dev
```

add config-overrides.js
{% gist https://gist.github.com/lokesh-007/ac6ec36f743e73ac48c35cdd574d4874 %}

Rewrite your scripts config in your package.json file
```
"scripts": {
   "start": "react-app-rewired start",
   "build": "react-app-rewired build",
   "test": "react-app-rewired test",
   "eject": "react-scripts eject"
 },
```

Done, you are all set for creating something useful with react and rust.

Please refer to the github repo below for reference,
{% github https://github.com/lokesh-007/wasm-react-rust no-readme %}
How to configure your CI pipeline environments
Tags: ci, cd, devops
Published: 2020-06-30 18:39:08

This seems like a very simple and trivial thing, but it's something which gets easily overlooked.  Setting up a CI pipeline environment is fairly trivial (unless you are using a custom docker image - but that's for another time); just tell the script to use a specific [docker](https://www.docker.com/) image, and the scripts to run.  However, there's different ways of configuring environments to achieve the same results.

Consider a simple website/web application running on Linux.  I'll assume it's running [PHP](https://www.php.net/), and requires some [NodeJS](https://nodejs.org/en/) elements to allow task runners such as Gulp to perform actions.  There's nothing in that setup described so far which tells us which web server the application is on, nor how PHP is to be configured.  Do we have an Apache web server, is it [Nginx](https://www.nginx.com/), or something else we haven't fully thought of?  With PHP, is this the built in module, or will it run as FPM?  Is the local environment configured for that?

Just those things alone lead to some combinations which are possible, probable, and likely.  However, we will really only be running one of those in production (albeit on several servers).  And though we've covered the application elements, what of the actual OS itself?  With the myriad Linux distributions available unless developers are all developing on the same distro, there could be issues fairly easily.

Thinking in simple terms, the difference of users from [Debian](https://www.debian.org/) based Linux distributions to [CentOS](https://www.centos.org/), and that family.  For Apache web-server alone the user and groups [Apache](http://apache.org/) run as are different, so these may need configuring to be consistent, especially when factoring in file uploads and other aspects of an application which may need to access the file system.

Things also come unstuck somewhat if you only run certain parts of jobs for deployment, how will you know they whether they work [until the deployment fails?](https://www.garybell.co.uk/how-to-configure-your-ci-pipeline-environments/www.garybell.co.uk/test-your-deployment-tasks)

The lesson here is that your CI/CD environments should be configured the same as your production environments (run multiple pipelines if there's different environments to consider).  You should also [test your deployment tasks](https://www.garybell.co.uk/test-your-deployment-tasks/) for each environment, too!

---
This article was originally posted on my blog at https://www.garybell.co.uk/how-to-configure-your-ci-pipeline-environments/ on 15th January 2020
Create a desktop application from your website in 10 minutes
Tags: javascript, html, desktopapplication, node
Published: 2020-06-30 18:35:48

If you have ever tried to build a desktop application in a traditional way i.e. in C, JAVA, .Net then you will agree it no only time consuming but costly.
Using a cross-platform framework helps you to reduce the cost and time to build a production-ready application.
**Electron** is one of the most famous frameworks to build a cross-platform application. Many famous Softwares like VS Code, Atom, Slack are build using Electron.
I would suggest to give it a try, it will hardly take 10 min.
I've built a small application to get you started where you can create a desktop application from your website and maintain a history of your navigation.
I've explained it in detail in my blog **[how to create a desktop app](https://www.blog.guidefather.in/2020/06/how-to-create-desktop-app-from-website.html)**
![App preview](https://dev-to-uploads.s3.amazonaws.com/i/ybnfznu16ziwkep9xtqk.gif)

# What is electronJs
With the help of ElectronJs one can build cross-platform desktop applications with HTML, JavaScript, and CSS. It was introduced in 2013 to make cross-platform text-editors, later its scope was extended to build other utility apps. Electron has chromium in it.
Electron has two processes 
**Main Process:** It manages the bootstrapping the application and lifecycle events like starting, quitting, etc. This main process is responsible for interacting with the native GUI of the Operating System. It creates the GUI of your application.
**Rendering Process:** It is created by the main process and its main purpose is to render the UI.

Clone the project from my [Github Repo](https://github.com/guide-father/desktop-app-in-minutes) and change my website URL [www.blog.guidefather.in](https://www.blog.guidefather.in) to your website URL and if you are interested then you can check out my blog **[how to create a desktop app](https://www.blog.guidefather.in/2020/06/how-to-create-desktop-app-from-website.html)** to learn more.
The Legend of Data - Ep.5 - Data Visualization 2
Tags: python, datascience, beginners, tutorial
Published: 2020-06-30 18:31:21

---
title: The Legend of Data - Ep.5 - Data Visualization 2
published: true
description: This week we continue to do data visualisation with Matplotlib, we learn what are figures and axes, how to customize your plot by changing the elements in your axes, and having multiple subplots in a figure. In the end, we figure out a few slow fire type pokemon, can you guess what they are?
tags: python, datascience, beginner, tutorial
---
This week we continue to do data visualisation with Matplotlib, we learn what are figures and axes, how to customize your plot by changing the elements in your axes, and having multiple subplots in a figure. In the end, we figure out a few slow fire type pokemon, can you guess what they are?

If you have any questions or any suggestions about which Python or Data Science topics to cover, please leave your comment at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

You can get the slide deck [here](https://slides.com/cheukting_ho/legend-data-pandas1/). The notebook that I used can be found [here](https://github.com/Cheukting/legend_data).
Why I'm learning BSL. ✊
Tags: watercooler
Published: 2020-06-30 18:10:25

Hey so I thought I'd talk about something unexpected.

My son is now at 2.5.0 and by now you might expect him to be talking, well you'd be right he does talk but then he never says the word again try as we might, he only says mum and dad. The rest of the time I attempt to decipher his various grunts shouts and cries which is an art into itself. 

As this community knows, there is more than one way of doing something and as lockdown hit we needed a way to save us all the frustration. To teach him to talk my partner and I have been learning to talk in sign language (BSL), the process is just so, I need a word for this, let's look it up in the app. Our son has a book or 3 on the subject as well, I have caught him sitting there teaching himself!

Anyways why BSL? It's activating the brains language bits and bobs in a way that allows him to associate shapes to words, it's also teaching him that 2 things can mean the same thing.

Why you should learn it. It is going to help you by raising your memory and IQ, allow you to make friends with people you normally might struggle to do so. You can communicate ideas faster and more visually and also it's a fun challenge!

Oh and when your brushing your teath you can still talk.
The Future of Agile is Machine
Tags: development, agile, machinelearning
Published: 2020-06-30 18:01:47

As with any emerging technology, there is always more hype, talk and pontificating in the years leading up to implementation and full acceptance. I can recall  a speech given by Jeff Bezos a decade ago where he compared the internet to electricity, concluding that we were in the stage of the early washing machine in when discussing how the internet would change our lives. That was 10+ years ago. 

Today the internet is old news. We suck down topics relating to cognitive computing like machine learning, artificial intelligence. Then, there are the [naysayers who claim](https://www.usatoday.com/story/money/2017/11/29/automation-could-kill-73-million-u-s-jobs-2030/899878001/) we'll lose half the active jobs in the United States due to new technology. While this may be true, the future opportunities in this tech are astounding. 

When it comes to machine learning, three phases of use, implementation and development exist: 

**Supervised Learning** -- Where humans provide the assisted answers to machines with the right input/output parameters. 
**Unsupervised Learning** -- Where we provide large data sets to a machine that is programmed to learn and then sit back and watch how the data is interpreted and processed. 
**Reinforced Learning** -- Where we provide reward functions with positive and negative feedback to a computer that essentially rewards good and bad behavior. 

Today, we're in the supervised learning phase of machine learning software development. Yes, unsupervised algorithms exist and are working, but they have not crossed the chasm into mainstream use and acceptance. Not until an elementary school child can scan his/her homework into the computer and have it cheat back the answers with relative ease will we be there. 

When it comes to those of us knee-deep in the pile of agile frameworks, scrum meetings and continuous process improvement, the one area we are looking forward to is the implementation of machine learning algorithms to greatly supplement, if not replace some of the methodologies that call for the input of manual timestamps and updates by project managers and agile scrum leaders. 

Whether front-end or back-end, no where is process automation more invited, tested and championed than in software development, but the future of agile will require many years of inputs and learning iteration techniques from humans to perfect in order to truly pass the baton to machines. 

We're working to help solve issues like this at [DEV.co](https://dev.co/?to), but these things take time, resources and patience to effectuate real change in process and personnel. 

For agile software development and testing to truly be agile, we'll need to dig deeper into frameworks and the processes that ultimately improve them and make the code truly "deliverable." Until then, we'll work with the great tools and teams we already have, until of course they all disappear and machines take over.
#027 Kubernetes Architecture
Tags: docker, devops, tutorial
Published: 2020-06-30 17:55:36

# Introduction

this is part 27 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.
***

# Kubernetes Architecture

. Nodes
![Nodes](https://dev-to-uploads.s3.amazonaws.com/i/4jktgunpfes8a08dn24a.png)

A node represent a server contain several container , Also we can call it Worker. It contain a Kubernetes orchestrator than manage those containers.

. Cluster
![Cluster](https://dev-to-uploads.s3.amazonaws.com/i/8301nhah90u0xlarfd3l.png)

A Cluster is collection of nodes and masters.

. Master 
![Master](https://dev-to-uploads.s3.amazonaws.com/i/a6m6nj7jafp2y64pu5wc.png)
Master also called manager in other tools , He manage those nodes . He keep tracking and monitoring and distribute work on those nodes. 
Master can be both worker and manager in same time.
We can also have many masters so if one stop other do the management.

***

# How does Kubernets work?

![how-it-works](https://dev-to-uploads.s3.amazonaws.com/i/5sk8fh790z1aejhc6wx7.png)

. etcd is a Database who store all the information about the nodes and workload in the nodes.
. I can access master using REST API also with the help of kubectl command . I can say to master I need 3 replication of this container , so he go and check what nodes are available at this moment and what is the workload on every node , And where I should distribute those replication to a cluster.
***
# End
Those are not the full architecture , it's the basics there a lot of other things like controller , services . We will talk about them later.
Online me vs offline me
Tags: career, mentalhealth, life
Published: 2020-06-30 16:39:28

---
title: Online me vs offline me
published: true
description: There’s a vast disconnect between the version of me that I present online on blogs and the version of me that actually exists in the real world.
tags: career, mentalhealth, life
---

**There’s a vast disconnect between the version of me that I present online and the version of me that exists in the real world.**

Does anyone else struggle with this?

When I write stuff online, usually it’s about serious (and yes... boring) technical topics like unit testing and TDD. That’s only fair because that’s something I care about, have a lot of experience with, and is something I can help people with.

**But it’s not who I am.**

Most of my work as a software consultant is about **helping people have a happier existence at work.** It sounds totally ridiculous to say it like that, but it’s true.

It starts by bringing my whole self to work. My lazy, erratic and often clueless self. And I encourage others to do the same. To be themselves, and to not take their work too seriously.

And that stuff is hard to write about. Because it’s just... _existence_.

It’s the almost unnoticeable words and actions that happen every single day. An attitude to work and life.

Telling jokes. Laughing together. Watching YouTube videos together while you wait for the build to finish. Talking about what you got up to over the weekend... and being honest about it. Listening.

Taken on their own, these actions aren’t very interesting to outsiders. But together, they add up to something worth sharing.

This blog post is brief, but it’s a _start_. There will be more to follow!

 🙏
Day 3: Conditional Statements
Tags: python
Published: 2020-06-30 17:37:48

### Howdy! 
Welcome to another day of my 30 days of code. Todays topic was conditional statements. I focused on keywords **if** & **and** to work through this problem. I also implemented pythons built in **range** function, which can take in 1, 2 or 3 parameters to work out if an element/variable is in a range of numbers. For this I used only two parameters each time.

The problem was, given an integer (n), work out if it was weird or not weird given these conditions:
- if n is odd, print 'Weird'
- if n is even, and in the range 2-5, print 'Not Weird'
- if n is even, and in the range 6-20, print 'Weird'
- if n is even, and greater than 20, print 'Not Weird'

Heres my solution:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/678qhf57gdskplkxs8o4.png)
Core Web Vitals und SEO
Tags: seothemen, google, seo
Published: 2020-08-19 14:20:25

---
title: Core Web Vitals und SEO
published: true
date: 2020-06-30 17:37:33 UTC
tags: SEOThemen,google,seo
canonical_url: https://j0e.org/core-web-vitals/
---

![Core Web Vitals](https://j0e.org/wp-content/uploads/2020/06/core-web-vitals.png)

Core Web Vitals sind Googles neue Web Performance Metriken. Es handelt sich um drei Werte, …

Der Beitrag [Core Web Vitals und SEO](https://j0e.org/core-web-vitals/) erschien zuerst auf [WordPress und Marketing](https://j0e.org).
Minute JavaScript - Apply Bind Call function methods
Tags: javascript, video
Published: 2020-06-30 17:23:38

---
title: Minute JavaScript - Apply Bind Call function methods
published: true
description: Minute JavaScript - Apply Bind Call function methods
tags: javascript, video
---

Minute JavaScript is a Fast format JavaScript Tutorial that gets straight to the point.

Topic: Apply Bind Call function methods

# More Videos

If you'd like to see more of my videos, [head over to YouTube](https://www.youtube.com/channel/UCDYDhCEPlrYfRyj2ApxeVMA/).

More Minute JavaScript Videos: 

[![Screenshot of YouTube Channel](https://dev-to-uploads.s3.amazonaws.com/i/ql8225baay311dte4eib.png)](https://www.youtube.com/playlist?list=PL59tadyXaIqVBUhq1PlZQvUSSzQzM62AF
)

What would you like to see next?