teleren/devto huggingface dataset:
Creating a stack navigator, with proper animations, using Ionic and React.
Tags: ionic, react, router, stack
Published: 2020-02-18 11:44:32

So, I've been really diggin' the Ionic and React integration. I usually [add it to an already existing React application](https://dev.to/ionic/adding-ionic-react-to-an-existing-react-project-4kib) and go from there.

But, recently, I've stumbled upon something. I want to control the *direction* of my transitions between pages. 

And the docs, they sure do provide something to work with. You can pass a prop called `routeDirection` to some specific Ionic components. But you can't control it with code.

But, **I**, want to control the direction of my transitions, with my own code, so I started looking into it.

It happens that these transitions are actually part of a `Context` called `NavContext` inside `@ionic/react`, so you can just:

```ts
import { useContext } from "react";
import { NavContext } from "@ionic/react";


function MyComponent(){
  let navigationContext = useContext(NavContext);
  
  //forbidden by the gods, a back-animated-push
  navigationContext.navigate("/route", "back"); 
}

```


So, to create a stack animator, all you need is a hook to handle the screens you've passed, and one singleton array shared between them:

```ts
//IonicCustomNavigation.ts

import { useContext } from "react";
import { NavContext } from "@ionic/react";

//Hook to encapsulate navigation context
export function useContextNavigation() {
  let navigation = useContext(NavContext);

  return navigation;
}

//Stack
let stack: string[] = ["/"];
export function useStackNavigation() {
  let navigation = useContextNavigation();

  console.log(stack);

  function navigateTo(screen: string) {
    let indexOfScreenOnStack = stack.indexOf(screen);
    if (indexOfScreenOnStack != -1) {
      if (indexOfScreenOnStack == stack.length - 1) return;

      stack = stack.slice(0, indexOfScreenOnStack);
      navigation.navigate(screen, "back");
    } else {
      navigation.navigate(screen, "forward");
    }
    stack.push(screen);
  }

  return navigateTo;
}
```

And **done!** You'd need to pass extra parameters to the `navigateTo` function if you want to handle state, but that is simple enough.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hpihlaprn3w8rc1s6q8q.gif)

I spent some time working around a solution, and that seems to do it.

For reference, the versions I'm using of Ionic and Ionic/React are:

```js
/**
"@ionic/react-router@^5.0.0":
  version "5.0.0"
  resolved "https://registry.yarnpkg.com/@ionic/react-router/-/react-router-5.0.0.tgz#939e9619cceebc2603cc738eb276d3bd6b523762"
  integrity sha512-IjBSZtel1W9zJvdwI9Z8LOHS9eOWhulumiTuvG2yD1Qj6dQ8Cp67zOYdHhxkhH2JBnxILC+vJgXp/0pnEFIu2Q==
  dependencies:
    tslib "*"

"@ionic/react@^5.0.0":
  version "5.0.0"
  resolved "https://registry.yarnpkg.com/@ionic/react/-/react-5.0.0.tgz#12a7ea61ce7e9e35a27768628370020bbfd6091a"
  integrity sha512-Q6uPAyWa01XLoZ7MdeM0xRKID8SR/hFuoGIjXFlawq2TKwiPCZbSjegHXdFHcX0LHTC/iQuu4Ly2d8UaD5ljZQ==
  dependencies:
    "@ionic/core" "5.0.0"
    ionicons "^5.0.0"
    tslib "*"
*/
```
Consigli allo sviluppatore web per creare un forte posizionamento.
Tags: freelancer, webdev, marketing, business
Published: 2020-02-18 11:34:09

Trovare il giusto posizionamento è un'attività incredibilmente importante per qualsiasi professionista e per lo sviluppatore web è ancora più importante!

In questo video troverai alcuni suggerimenti che devi assolutamente mettere in pratica se vuoi differenziarti dalla concorrenza e ottenere i clienti che ti meriti.

Abbiamo anche lanciato un **corso gratuito** dal titolo: [Dal niente al cliente - Trova il tuo cliente ideale in 15 giorni](https://skillsandmore.org/landing-corsi/dal-niente-al-cliente-in-meno-di-un-mese/)

Vieni a scoprire le importanti lezioni che puoi apprendere e ricordati di iscriverti sul nostro [canale YouTube](https://www.youtube.com/user/skillsAndMore) per restare aggiornato con gli ultimi consigli.
Top Common Mistakes of Angular Developers
Tags: angular, developers
Published: 2020-02-18 11:18:29

Angular is a new platform. We learn how to use it, how to optimize the application and how to improve our code. As part of being team members, we do code reviews and trying to improve each other skills. As part of the code reviews and reading of code examples on the web, I pay attention to some common mistakes of Angular developers. It can be a junior or an expert developer, we all make mistakes in the code.

Many developers don’t know this and fall into this trap. To solve this problem, there are various solutions:

1) Use ngDoCheck
2) Use immutable value as the input
3) Split the input value to multiple inputs
4) Use subscriptions


Explore in detail about Angular 9-
https://www.code-sample.com/2018/05/angular-2-4-5-6-7-8-interview-questions.html
top 5 Free VPN for Android 2020
Tags: bestvpn, freevpn, ghostvpn, topvpn
Published: 2020-02-18 11:13:09

Installing one of the best free VPN gives user’s an extra level of security on Windows PC, MAC, Android device or iPhone. The software has become very much popular over the past few years along with the demand for best VPN’s in the market.
https://asotech55.blogspot.com/2020/02/top-5-free-vpn-for-android-2020.html
Custom Mobile App Development Company - AppClues Studio
Tags: mobileappdevelopment, uxuidesigncompany, mobileappdevlopmentagency, mobileappdevlopmentfirm
Published: 2020-02-18 11:02:49

AppClues Studio is a Mobile App Development Company. We provide all types of Customized Mobile App Services including iOS, Android, iBeacon, Native Apps etc. Our services also include UI/UX Designing, Customer Acquisitions, Branding, Lifecycle Management etc.

We develop creative and customer centric mobile apps to give your users and customers a ceaseless friendly experience. Our proficient developers and passionate designers turn you unfashioned ideas into user-satisfying products. Without limiting ourselves, we match your energy and serve worldwide.
How to Fax to Email?
Published: 2020-02-18 10:44:13

Do you know what is fax to email and how does it work? If no then no need to be worried because in this article we will help you out in knowing all important things about it.  One of the most important questions arises here is what exactly is fax to email? Fax to email is the capability to send faxes via an email account that is also called fax from email and receive faxes in the form of PDF attachments in an email inbox.

By sending or receiving a fax by [email usually needs a service plan](https://cocofax.com/email-to-fax.html) that comes along with an email fax company, but there are also some options available in free fax by email.

There are some ways through which you can fax to email easily, but to choose the best ways and services is tough because of this huge competition out there in the market as it is really popular and many people are up for it because of its high demand.

**Following is one of the best method through which users can easily fax to email whenever they need to:**

**Fax to Email through CocoFax**

The time when you are directing a fax, via whatsoever source it can be, the most vital element that comes into one’s mind is the trustworthiness and safety. As we all know that fax is utilized for significant and safe communications, we all require and ensure that the fax we are going to send is sent and taken to the right person. Just because of the sake of safety we all want to use some reliable app so everything ends up in a safe way and don’t get problematic.

**Below are some steps to follow when it comes to fax to email with the help of CocoFax:**

As the first step, sign up for [CocoFax](https://cocofax.com/) and get the 30-day free trial period. Now you have to select your own fax number for free. Make sure that you register the email address that is in your use and you would utilize it to send and receive faxes.

Now open the email client on your device. Here you have the ease to utilize the email client’s application or open it in a web browser or via any other method. Like for Gmail it can be utilized from the Gmail application, via a web browser, and through Outlook as well.

Here direct to the decision of writing a new email and tap on it. You will see that the new email comes up. It can also differ a bit from email clients, but the main idea would be the same.

When the new email opens, you can write your fax. The time you have filled all the vital fields, you can just tap the option that says Send. At the end CocoFax will get the email and encode it as a fax file for the receiver. It will also dial the recipient’s fax machine.
Save money by identifying EBS volumes that are not in use
Tags: ebs, aws, snapshots, python
Published: 2020-02-18 10:24:27

Description:
How to save money by identifying EBS volumes that are not in use. The script linked in this article will help you to identify these unused volumes and take a snapshot and/or delete them.

Background:
When deleting an EC2 instance there are 2 options for the EBS volumes attached. The option DeleteOnTermination can be set to true or false [1]. By default, the DeletionOnTermination attribute for the root volume of an instance is set to true and for non root volumes is set to false. As the name suggests, this attribute determined whether or not a volume is deleted when an instance is terminated.

The attribute can be altered using the modify-instance-attribute API [2].

A common scenario occurs when customers terminate instances and have volumes with DeleteOnTermination set to false. In this case the volumes persist. Unlike an instance (which doesn't incur a cost when it is stopped) volumes that are not in use (in an "available" state) are still incurring the same cost as if they were attached to an instance. This is because with EBS volumes you pay for the provisioned space and/or IOPS. Even if the volume is not in use the space/IOPS is still provisioned for you and therefor charged.

*Definition*
A volume in an "available" state is one that is provisioned and incurring cost but is not attached to an EC2 instance.

To help AWS users prevent these costs I have written a short python script.

https://github.com/alanmdonald/unused_volumes

Setup:
You will need to have python and boto3 installed. You will also need to have your AWS credentials correctly configured with the appropriate permissions.

Running the script will:
Check for all volumes in an available state in every region. If there are none the script will exit. If there are volumes they will be printed to the screen given the volume id, region, whether or not the volume has a snapshot and if so the date of the latest snapshot.

Once listed you will be given 4 options.

[1] Delete volumes  
[2] Take snapshot of volumes  
[3] Take snapshot then delete  
[4] Quit

Option 1 will delete all of the available volumes that have been found. You will be asked to confirm this selection.

Option 2 will snapshot all of the available volumes that have been found.

Option 3 will snapshot all of the available volumes that have been found and then delete them. You will be asked to confirm this selection.

Option 4 will quit the script.

You can re run the script in order to confirm the new snapshots or that the volumes have been deleted.

[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination

[2] https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-attribute.html
SimplestWeb Updated
Tags: freelance, dev, work
Published: 2020-02-18 10:21:49

Hi All, I have some great news about Simplest Web. I've decided it's time to take my freelance efforts to the next level, find an office space to work from. It was one of my goals for 2020 to find an office for Simplest Web. This goal came true sooner than I expected. It was in December when I had the thought that it might be time to up the scale of my Software Development Services.

So far, I had been working from home and having client meetings at cafes. It was and still can be sufficient for the work I do, but a few perks of a private space excites me to give it a try. The first and biggest perk is as the name suggests "private" space, it's very important to me that I have my own dedicated space to work out of, when you're working from home there's only so much room you can spare from the clutter of household things. Best of all, there's an infinite number of possibilities when you're starting fresh, this appeals to me a lot. Will be able to experiment with a lot of things and see what fits the space.

I don't see new clients walk in with a requirement for my services, this is not how I work (I need to know the person to start any work) and I don't expect this to happen but it'll be fun to experience it when something like this happens. This won't be my first office nor the last, but I am feeling very positive and eager to see how things go.

I want to use this new place as my workspace, hangout area, to meet clients, for creative activities, to hold small meetups and to organize movie nights. I can hear you say, enough already.

I am very excited to see what this new change will have for my life and Simplest Web's future. I will be sharing more updates with you in the future.

Thanks to everyone that made this possible, I can't thank [Saravanan Doctor](https://g.page/tamilmaruthuvamgobi) enough, who arranged everything from the start to end.
A batteries included React-TypeScript starter
Tags: react, typescript, beginners, productivity
Published: 2020-02-18 10:19:59

TLDR: [https://github.com/sreetamdas/ts-react-starter](https://github.com/sreetamdas/ts-react-starter)

Everyone starts off working with React using the [create-react-app](https://create-react-app.dev).

But one doesn't need to venture out much to find out that there's a vocal group that finds CRA to be [bloated](https://hackernoon.com/create-react-app-is-way-too-bloated-5db07c3511).

But this is justified, since CRA is the entry point for any react developers out there, and by providing an all-tools-included-and-configured, CRA takes away the pain of having to set up (and customise) each of the tools that we would need along the way.

But say you are starting from scratch, and have this knack to set up up everything yourself. I was that person :shrug:.

I set out to define all of my config files from scratch, and basically not rely on CRA at all. I will say this: it left with a lot of appreciation for CRA, since only when you try to set up everything yourself do you realise how much of a pain in all the wrong places it can turn out to be.

Anyway, having gone through this ordeal myself and [not wanting to repeat myself](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), I created for anyone that might find a use for it.

## Link:

[https://github.com/sreetamdas/ts-react-starter](https://github.com/sreetamdas/ts-react-starter)

### What's included:

-   React
-   TypeScript
-   Babel
-   ESlint
-   Editorconfig
-   Webpack
-   Prettier
-   Jest
-   Commitlint

### Why commitlint?

Granted, commitlint is probably the only tooling that you might not have heard of in the list above, but it is an excellent tool which forces you to write meaningful commit messages (no more `hotfix for that bug`) and sets you up to start contributing to OSS libraries.

If you've got anything else that you believe this starter needs, feel free to comment below/fork my repo/send a PR. Cheers!
How to Encrypt a Drive on Ubuntu 18.04
Tags: encryption
Published: 2020-02-18 10:16:36

Enable disk encryption after installation

Here I have two disk drive .

SSD as / (root partition)
HDD as /home (home partition)
Installing Cryptsetup:-

$ sudo apt-get install cryptsetup

$ sudo apt-get install lvm2

#

Copy /home to another location

sudo -i

sudo mkdir /data –> make directory for copy data

sudo cp -avi sumantk /data –> Copy the home

sudo vi /etc/passwd –> change the home path for unmount /home

Unmount the drive

umount /dev/sda1

Format & change to lvm type

sudo mkfs.ext4 /dev/sda1

Format & change to lvm type

pvcreate /dev/sda4

vgcreate vg_home /dev/sda4

lvcreate -n lv_home -l 100%FREE vg_home

cryptsetup luksFormat /dev/mapper/vg_home-lv_home

cryptsetup luksOpen /dev/mapper/vg_home-lv_home mycrypt

mkfs -t ext4 /dev/mapper/mycrypt

vim /etc/crypttab

mycrypt /dev/mapper/vg_home-lv_home

Make a entry in fstab file

vi /etc/fstab

/dev/mapper/mycrypt /home ext4 defaults 0 2

/dev/mapper/vg_home-lv_home /home ext4 defaults 0 2
Get to Know Our Roots
Tags: dbaport
Published: 2020-02-18 10:12:48

Dbaport Technology is carving a growing niche for itself by applying high-level skills and expertise on its clients’ behalf in the Enterprise Database Management arena.

The company has been around since 2016 and has built an outstanding reputation for its expert knowledge and delivery. Both Microsoft and Oracle rate Dbaport Technology in the top select handful of organization’s in the Enterprise Database Management area of specialization.

Our team of 40+ permanent, highly skilled Database Administrators and Consultants bring many years of experience to the table. In addition, as they interact across a range of different sites, their level of experience continues to rise, adding further value to clients.

We foster a heterogeneous Database Technology and Services strategy. Our expertise covers a comprehensive range of Database Technologies – including Microsoft SQL Server, Oracle Database, MySQL, MariaDB, MongoDB, Azure Cosmos DB, PostgreSQL and Sybase. This means that focus is always on service and suitability rather than on product.

The Dbaport Technology services are structured to allow clients the flexibility to choose the engagement model, which suits their needs.
Hardening Docker with SELinux on CentOS 8
Tags: docker, centos, selinux
Published: 2020-02-18 09:49:22

---
title: Hardening Docker with SELinux on CentOS 8
published: true
description: Hardening Docker with SELinux on CentOS 8
tags: docker, centos, selinux
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---

You should not install Docker on production servers without taking additional security measures. In this video we show you the very minimal steps of hardening Docker daemon on CentOS 8 server by properly configuring SELinux.

{% youtube sT9Q2xZr4nk %}

***

*You can always hire [our DevOps mentors](https://mkdev.me/en/specializations/devops) and learn directly from them!*
ObjectBox: Alternative to SQLite for android
Tags: android, sqlite, database, objectbox
Published: 2020-02-18 09:41:17

https://blog.joshsoftware.com/2019/11/06/objectbox-alternative-to-sqlite-for-android/

How many times do we need to write CRUD operation while building android application? Many times right? For me its like daily job.

Till now I used to use sqlite database. But when I came across ObjectBox , I started liking it. Why? Because it saves me a lot of time in writing bucket of code which I used to spend while writing sqlite db query also it was a bit complicated / confusing while reading those queries. While in case of ObjectBox your queries becomes easy and readable.
ประสบการณ์การ Contribute ที่ดี 900 กว่าเท่า
Tags: contribution, programming, experience, git
Published: 2020-02-18 09:25:01

---
title: ประสบการณ์การ Contribute ที่ดี 900 กว่าเท่า
published: true
description: ตามหัวข้อนั้นแหละ
tags: contribution, programming, experience, git
cover_image: https://i.imgur.com/xYGHuKC.png
---

จำได้ว่าสมัยช่วงเข้าวงการเขียนโปรแกรมใหม่ๆ ไม่กี่ปีที่ผ่านมานี่เอง การ Contribute ให้ Open Source นี่เป็นอะไรที่ว้าวมากสำหรับเรา คือแบบ มันเป็นอะไรที่ดูเท่นะ ไอ้การที่ได้เป็นส่วนหนึ่งในการพัฒนาโปรเจคให้มันดีมากขึ้น ช่วงนั้นก็จะโหยหามาก พยายามหาโปรเจคง่ายๆ หรือพยายามทำอะไรที่มันไม่ยากมากอย่างการแก้ Readme.md เลย ง่ายๆ แต่บางครั้งก็อยากจะข้ามขั้นไปช่วยแก้โค้ดให้เลยทั้งๆ ที่ตัวเองก็ไม่ได้เทพอะไรปานนั้น

สิ่งที่อยากจะบอกคือ ไม่ต้องรีบร้อนอะไรขนาดนั้นหรอก ถึงเวลานึง มันก็จะมีโอกาสที่ดีในการ Contribute เองนั่นแหละ

ช่วงปีที่ผ่านมา เราก็ทำไรง่ายๆ แค่[เพิ่ม Link ของ Document จากที่อื่น](https://github.com/facebook/jest/pull/8363)เอง ไม่คิดอะไรมาก พอดีว่าช่วงนั้นเพิ่งเริ่มศึกษาวิธีการเขียน Test แล้วเห็นว่ายังไม่มี How-to ของ Gatsby.js เลย ทั้งๆที่มัน Setup Test อย่างเยอะ

แล้วหลายวันที่ผ่านมาก็[เพิ่ม type ให้กับ perf-hooks](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42428) ซึ่งเป็น API สำหรับทำ Branchmark ของ Node.js เพราะ type เดิมมันเป็น string แต่เราคิดว่ามันควรจะ Specify มากกว่านี้ รอบนี้ได้รู้จักการทำ Git Rebase หรือการ Rewrite History ด้วย เพราตอนแรก Pull Request โดนปล่อยร้างไม่มีคนมา Review จน Bot มัน Closed Pull Request เลย

สรุปคือ ไม่ต้องรีบ ถึงเวลา เราเป็นผู้ใช้ เดี๋ยวก็มีโอกาสได้เป็นส่วนหนึ่งของ Contributor อยู่แล้วสักวัน
170 new remote jobs for developers at PayPal, Zapier, Toggl, and others
Tags: python, ruby, javascript, swift
Published: 2020-02-18 09:21:50

Good day, DEV community! 👏🏼

It's Arsen from Meerkad community of remote job seekers with weekly updates.

During the period from February 2 to 17, I collected 170 vacancies from popular job boards like Glassdoor, Flex Jobs, WeWorkRemotely, and others, as well as from Facebook, Twitter, and Reddit.

It takes about 3 hours a day to visit 78 sources that I prepared in advance. Here are the links for several job's categories:
- Java [meerkad.com/remote-java-jobs](https://meerkad.com/remote-java-jobs)
- Python [meerkad.com/remote-python-jobs](https://meerkad.com/remote-python-jobs)
- Ruby on Rails [meerkad.com/remote-ruby-on-rails-jobs](https://meerkad.com/remote-ruby-on-rails-jobs)

All jobs for developers are here 👉🏻 [meerkad.com/remote-developer-jobs](https://meerkad.com/remote-developer-jobs)

🙏🏻 Community is free and exists on donations. Support us on Patreon https://patreon.com/meerkad

Are you a Recruiter or HR? Looking for candidates? Let's connect and chat!


Ars