teleren/devto huggingface dataset:
Using multiple git accounts
Tags: git, github
Published: 2020-09-03 11:03:59

If you are a developer, then you must be using git. And there are chances that you might have faced the problem of using different git accounts for each git repository. How do we switch user each time we clone a new repository.

One of the solution is to change the repository username config using below command

```
git config user.name "youremail@email.com"
```
But you have to do this for every new repository. Fortunately there's a better solution of setting multiple accounts in ssh config. Below are the steps to do that.


First of all you need to generate ssh keys for each of the email.

[How to generate and link public ssh keys to your git accounts](https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html)

Next edit your ssh config file

For Linux or Mac, run below command in terminal 

```
sudo vim ~/.ssh/config
```

For windows, ssh config file is found generally at below location

```
C:\Users\username\.ssh\config
```
Open this folder and edit config file in any editor (Notepad/Sublime)

Lets say you have you have two account on github, one is your personal account and the other is work. 

And from the first step, you have generated two ssh keys **your-ssh-public-id** using personal email and **your-work-ssh-public-id** using work email.

Paste below configuration in config file

```
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/your-ssh-public-id

Host github.com-work
  HostName github.com
  User git
  IdentityFile ~/.ssh/your-work-ssh-public-id
```

Now whenever you clone any repository, edit the clone url accordingly. 
For example, if you are cloning a repository from github, then change
```
git clone git@github.com:Abhay07/repository-name.git
```
to 

```
git clone git@github.com-work:Abhay07/repository-name.git
```

If you don't change the clone url, your **your-ssh-public-id** will be used which uses personal email id. 

You can also update the remote url **after cloning the repo**, with below command

```
git remote origin set-url git@github.com-work:Abhay07/repository-name.git
```

That's it. Let me know if it helped or you have any suggestions.

P.S. — I have created some tools. Do check it out
Youtube video downloader or cutting tool : [youtubecut.com](https://youtubecut.com)
Check your IP address / Locate an IP : [myips.in](https://myips.in)
Testing on Flutter: generate unit test badge using LCOV to your repository
Tags: dartlang, testing, flutter
Published: 2020-09-03 10:48:00

# TLDR; in this publication, I assumed that you all know how to write test and testing terminology and methods, no mentions here.

# What is LCOV
LCOV is a graphical front-end for GCC’s coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function, and branch coverage measurement.

# Installing LCOV

```
brew install lcov
```

- Generating an example app — flutter counter app
{% gist https://gist.github.com/3lVv0w/4e34da47a716213f663f249b30e0aff8
%}

- example test scripts ./test/widget_test.dart
{% gist https://gist.github.com/3lVv0w/8f4bdaab83a4adb1bd8ae6fdb2185647 
%}

# Objective of lcov
- To see the coverage of the code.
- To deliver the code with quality.

# To perform the test with coverage
install [test_coverage](https://pub.dev/packages/test_coverage) library in pubspec.yml under dev_dependencies

```
dev_dependencies:
    flutter_test:
       sdk: flutter
    test_coverage: ^0.4.2
```

- then run test command with flags

```
flutter test --coverage
```

- when test complete it will generate folder ‘coverage” in the project directory, to see the result in visualized, run this commands

```
genhtml -o coverage coverage/lcov.info
# Open in the default browser (mac):
open coverage/index.html
this is the html report, that generated out looks like.
```

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

- now you will get the coverage result, but I want to present in the GitHub repo how do I do that? you should get a badge!!!

# To generate badge image
- assume that you are at the root of the project

```
$ yarn init
$ yarn add lcov2badge — more detail here
```

- then create a javascript script to generate a badge form the coverage file.

{% gist https://gist.github.com/3lVv0w/bdefa8a2187fb323890fd99d425d573f 
%}


- what you get is the ./coverage_badge.svg that you can use inside the README.md file, like this.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2o3d7otacll1v1eozhls.png)

```
![Coverage](./coverage_badge.svg?sanitize=true)
```

- the example Github code can be found [here!]
(https://github.com/3lVv0w/test_lcov_bedge)

{% github https://github.com/3lVv0w/test_lcov_bedge %}

If you have any question/discussion with me, you can contact/ follow me
FB: Krisada Vivek
DEV.to: @3lvv0w

Follow me Krisada Vivek for a more upcoming tech publication

# ThankYou! ❤
How to Set Negative Values to Zero in Excel Office 365?
Tags: excelpreface, setnegativevaluestoz
Published: 2020-09-04 03:59:23

---
title: How to Set Negative Values to Zero in Excel Office 365?
published: true
date: 2020-09-03 10:44:17 UTC
tags: ExcelPreface,SetNegativeValuestoZ
canonical_url: https://geekexcel.com/how-to-set-negative-values-to-zero-in-excel-office-365/
---

## Set Negative Values to Zero in Excel:

In this guide, we are going to see how to **Set Negative Values to Zero in Excel Office 365** with examples. Let’s step into this article!! Get an official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## Steps to Set Negative Values to Zero in Excel:

Here, we come up with the **MAX Function** to solve this task easily. Kindly, follow the below instructions.

- **MAX Function returns the largest value of a given set of inputs**.
- In the below example image, you can see the input numbers in **Column A** and **B**. The output values ( **with negative numbers** ) are listed in **Column C**.

![Example](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/1-13.png)<figcaption id="caption-attachment-13276">Example</figcaption>

### Syntax for MAX Function:

**=MAX(number1, [number2],..)**

**=MAX(0, (A2-B2))**

- Now, you can see that the **negative values are replaced with zeros** in **Column D** using **MAX Function**.

![Set negative values to zero](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/4-2.png)<figcaption id="caption-attachment-13283">Set negative values to zero</figcaption>

### Mathematical Explanation:

![Function Working Explanation](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/max.png)<figcaption id="caption-attachment-13285">Function Working Explanation</figcaption>

From the above image, you can see that the **MAX Function returns the zero value to the given negative input numbers**.

From the above steps, you can understand how to set negative values to zero using the MAX function in Excel.

## Sum-Up:

In this guide, you can clearly understand how to **Set Negative Values to Zero in Excel Office 365** with the best example. Leave your **feedback** in the below comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!
Automatically Generate Customer Receipts upon Form Submissions
Tags: tutorial, wayscript, somecode
Published: 2020-09-03 10:38:01

Introduction
------------

Creating and managing effective business depends on how you manage different tasks. And the more automated are tasks, the more it will be easier for you to focus on the real work.  
Today using WayScript, we’ll create a script to automatically generate receipt when a form is submitted.

Prerequisites
-------------

*   [Working with Python](https://docs.wayscript.com/library/modules/python)
*   [Working with Form Trigger](https://docs.wayscript.com/library/triggers/form-trigger)
*   [Working with Send Email](https://docs.wayscript.com/library/modules/send-email)

Trigger
-------

We want to generate the receipt when a form is submitted. WayScript has Form Trigger integration you can use to create forms with different fields, make it public, and receive submitted information as JSON.  
Add it as a Trigger.

![Adding From Trigger](https://wayscript.com/blog_img/133/1.png)

The next step now is to configure the fields we’ll use. To keep things simple for this tutorial, I decided to use just three inputs: The technology your client wants (Ah yes! Here, we are acting as a web development agency :D ), the existence of a logo, and his email address.  
Well, here we go.  
Technology :

![Technology input](https://wayscript.com/blog_img/133/2.png)

Logo:

![Logo input](https://wayscript.com/blog_img/133/3.png)

Email:

![Email input](https://wayscript.com/blog_img/133/4.png)

We have the fields of our form configured, now turn on the trigger and visit the page.

Python
------

Why using Python here?  
Well, we have to process the JSON output we’ll receive and make comparisons and operations. This can be done using JavaScript, Java, or even WayScript modules.  
Add the Python module.

![Adding the module](https://wayscript.com/blog_img/133/5.png)

Now, click on edit the code, and replace the existing Python Code with this.

![Code](https://wayscript.com/blog_img/133/6.png)

So basically, we are retrieving the value of keys in the variables dictionary and performing comparisons to calculate the fees.  
Then we register a variable fee in the variables dictionary of WayScript, so we can access it in other modules.

Send Receipt
------------

We’ll use SendEmail to first, send to us the receipt.  
Add Send Email module.

![Adding Module](https://wayscript.com/blog_img/133/7.png)

Once you’ve added the module, let’s enter the Email Subject and the body of the email.

![Email Body](https://wayscript.com/blog_img/133/8.png)

Great. Now, be sure the trigger is activated and make a test. And check the logs.

Conclusion
----------

Questions about this script or anything else? Join our [Discord](https://discord.gg/VWbXSbj). We're always around to help. If you want to work with the full script template, just find it [here](https://wayscript.com/user/mangabo_kolawole/O7Q6isbx)

[](https://wayscript.com/user/mangabo_kolawole/O7Q6isbx)
Using .ENV to Hide Your Air Table Credentials In React 
Tags: serverless
Published: 2020-09-03 10:23:20

## Create a dotenv file

First you'll want to create a .env file 

```
AIRTABLE_API_KEY=xxxxxxxxxx
AIRTABLE_BASE_ID=appxxxxxx
AIRTABLE_TABLE_NAME=base-1
```

## Install dotenv

Once you have this created you can use it by installing dotenv

```bash
npm -i dotenv
```

## Set up dotenv in airtable.js

```jacasvript
require('dotenv').config();
var Airtable = require('airtable');
var base = new Airtable({ apiKey: process.env.AIRTABLE_API_KEY }).base(
    process.env.AIRTABLE_BASE_ID
);
const table = base(process.env.AIRTABLE_TABLE_NAME);

module.exports = { table };
```
Embed your dev.to posts in React
Tags: npm, react, javascript, hacktoberfest
Published: 2020-09-03 10:23:16

Hey Reader,
You landed over here that indicates you also want to embed your posts on dev.to into your personal website or any other site in the simplest way possible.
Don't worry! I got you🤟.

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

I created this NPM package (react-devdotto) to embed your dev.to posts in React App in no time.

Now, let just dive into how it works.
1. Install react-devdotto:

```
npm install --save react-devdotto
```

2. Import `DevDotTo` in the file in which you want to embed posts:

```
import DevDotTo from 'react-devdotto
```

3. Put below component and replace `username` with your dev.to username (you'll get it in the URL of your profile):

```
<DevDotTo username="genialkartik" />
```

4. You can also pass a parameter `coverimage={false}` to remove cover images from blogs list. *Note: default value of coverimage is `true`.

Well Done! You did it🥳.

Visit NPM to learn more: [![NPM](https://img.shields.io/npm/v/react-devdotto.svg?logo=npm)](https://www.npmjs.com/package/react-devdotto) 

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

Feeling too lazy to test?
Then just fork project below on CodeSandbox.io & try with the below code snippet:

{% codesandbox dn00y %}

### Want to contribute?
Then just fork and clone this repository on Github.

[![Github react-devdotto](https://img.shields.io/badge/Github-react--devdotto-blue?logo=github)](https://github.com/genialkartik/react-devdotto)

- Navigate `cd react-devdotto`.
- run `npm install` to install all required dependencies.
- Make changes or fix bug.
- Make sure to run build `npm build` before commiting all changes.
- Open a pull request to `master` or `v***` branch.<br>
Now lemme buy you a coffee :coffee:.

Happy Coding!✨

🌐 Get in touch: [kartiktyagi.codes](https://kartiktyagi.codes/)
👥 Connect: [Linkedin](https://www.linkedin.com/in/genial-kartik/) | [Twitter](https://twitter.com/genialkartik) | [Facebook](https://www.facebook.com/genialkartik) | [Instagram](https://www.instagram.com/genialkartik/)
Regex for Passwords
Published: 2020-09-03 10:02:49

Minimum eight characters, at least one letter and one number:

```
"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"
```

Minimum eight characters, at least one letter, one number and one special character:

```
"^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$"
```

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:

```
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"
```

Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character:

```
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$"
```

Minimum eight and maximum 10 characters, at least one uppercase letter, one lowercase letter, one number and one special character:

```
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,10}$"
```
Service Uptime Monitor using Github Actions
Tags: actionshackathon
Published: 2020-09-03 10:01:00

### My Workflow

I've been working in a company for about 1 year now. We have a private cloud, but it's not very reliable. Sometimes our container will suddenly stopped or having our Gitlab EE unavailable, even in busy hour.

After today's daily stand up, one of my coworker said it will be fun to have a service to monitor our services, to tell when was the last time the DevOps team messed up the containers. Like in the "days without tricks meme."

So I think *"why not?"*

Here I have created a workflow to check for my service uptime, runs every 5 minutes on Github Actions. This action will execute a NodeJS app and updates a file to report latest up/downtime. This script will make a HTTP request to the service and save the HTTP status to a JSON file.

### Submission Category: 

Wacky Wildcards


### Yaml File or Link to Code

```yaml
name: Node.js CI

on:
  workflow_dispatch:
  schedule:
    - cron: "*/5 * * * *"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: 12.x
    - run: npm install
    - run: npm start
    - name: Commit and push if changed
      run: |
        git add .
        git diff
        git config --global user.email "github-action-bot@example.com"
        git config --global user.name "GitHub Action Bot"
        git commit -m "Updated incident" -a || echo "No changes to commit"
        git push
```

{% github fahminlb33/playcourt-tricks no-readme %}

### Additional Resources / Info

For the HTML I've used Matt Smith's countdown template from https://codepen.io/AllThingsSmitty/pen/JJavZN.
Golang Web - Routing Handle Func
Tags: backend, go, webdev
Published: 2020-09-03 10:00:44

In GoLang there are several ways you can do..

- By using http.HandleFunc
- Interface implemantations http.Handler in the struct, and then using in the function http.Handler()
- Create multiplexer by using struct http.ServeMux
- Etc.

But in the series, we just used http.HandleFunc, okay so lets do it.

# http.HandleFunc()

as explained briefly in the previous chapter, the http.HandlerFunc function is used for route / endpoint registration and its handler. 

- First step, create main.go and import package net/http

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

- Next, create function main() and add closure handlerIndex, and then used it closure as handler from new 2route registation, that is / and /index.

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

- Still in function main(), add the new Route /data with handler is anonymous function.

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

- Last step, run the server

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

- So, Run & Test

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1ato6goluoal1szppyga.JPG)

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

Grats, hope your enjoy it.
Invest in A Good SEO Suite for Writing Web Content
Tags: development, seo, seotools, wordpressseo
Published: 2021-01-08 07:41:54

---
title: Invest in A Good SEO Suite for Writing Web Content
published: true
date: 2020-09-03 10:00:39 UTC
tags: Development,seo,seotools,wordpressseo
canonical_url: https://maedahbatool.com/invest-in-a-good-seo-suite-for-writing-web-content/
---

I call it a total waste of time, revenue, and effort if you are writing web content and not investing in a good SEO suite. The main idea to write and make it public is that you want the others to know about your thoughts, ideas, or your product and services from a business standpoint. And if it is not reaching your target audience then everything will go in vain.

### How good should your SEO toolkit be?

A good SEO suite should take care of all the essential SEO needs that your content requires. Some SEO toolkits are bombarded with so many configuration options that you need a good deal of time first to understand these options and then configuring them according to your needs. On the contrary, other solutions might carry so few options that you can’t even fulfill the basic requirements from it.

An ideal way to make your pick is to first curate a list of essential SEO steps and they choose the suite wisely and accordingly.

### Basic SEO needs

Now I’ll help you understand what basic requirements should your SEO toolkit fulfills. I normally prefer a tool that helps me achieve the following:

- Technical SEO
- Targetted keyword research
- Rank tracking mechanism
- Backlink analysis
- Video SEO
- Link building
- Content optimization

Based on the above-mentioned features, I then narrow down my search to going for either a _free_ or a _paid_ solution.

Following these steps can help you choose an intuitive SEO suite. Choosing an SEO suite is a one-time effort that you should do to ensure that your content reaches your targetted audience. Also, you should keep searching for better options with time because SEO companies continue and innovate with new and exciting features. So, if you are sticking with a paid solution chances are that you find the same variant for free or a much better variant at less price.

The post [Invest in A Good SEO Suite for Writing Web Content](https://maedahbatool.com/invest-in-a-good-seo-suite-for-writing-web-content/) appeared first on [Maedah Batool](https://maedahbatool.com).
A Tora Tower (TT)
Tags: toradex, colibri
Published: 2020-09-03 09:45:16

My Toradex Tower is almost complete... I have now everything colibri from imx6ull to imx8 bleeding edge.

![My Toradex Colibri Tower](https://dev-to-uploads.s3.amazonaws.com/i/n5x1ndog0ibxjf7ez3my.jpg)

A real beauty? WDYT?
Day 49: How to fix (MERGE_HEAD exists) error and undo a git push
Tags: 100daysofcode, git
Published: 2020-09-03 09:42:48


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dvqq2mdogohmt1d53tfi.png)
Run into this error, again. I keep forgetting how to fix it so i am documenting this for reference sake.
Solution
* Abort the merge
```commandline
git merge --abort
```
* Git pull
```
git pull
```
* Resolve the conflict by adding a message, saving and closing the editor.
* Git push
```
git push
```

####Undo a git push
To undo a push to github this worked for me.
```
git push -f origin HEAD^:master
```

_Day 49_
Clone just the sub-folder in GIT 🔥
Tags: git, github, javascript, npm
Published: 2020-09-03 09:31:57

### Background   
Hi there, Its Naman. I am sure that if you work with Git then you must have stumble across one of these situations at least once:   
* You need only one subfolder but don't want to clone the entire repo
* You only need to play around the code and you don't care about the whole Git history.   


For the first problem, there is no straightforward way/command available (Correct me if I am wrong). If the repo is small then you can clone the whole repo. Easy peasy, you won't think twice but if the repo is huge then you might think twice or maybe thrice. 😛

For the second problem, if you don't care about the code history then cloning history is overhead for you. We should skip if we can (A native way available but isn't friendly).   

### Solving problem 🛠 :
I found this awesome package [DeGit](https://www.npmjs.com/package/degit), created by [Rich Harris](https://twitter.com/Rich_Harris) (Creator of [RollupJS](https://rollupjs.org/guide/en/) and [Svelte](https://svelte.dev/)) quite a while back. This package is way easy to install and use. I use it frequently.   


`Note: Before moving forward make sure you have Node.js installed in your system. I recommend installing Node.js via` [nvm(Node Version Manager)](https://github.com/nvm-sh/nvm)

1- Install npm package 📦
![Installing DeGit npm package](https://dev-to-uploads.s3.amazonaws.com/i/wv3woeygenq4q2p1awt6.png)

Use `sudo npm i -g degit` if your terminal shows permission error.

2- Cloning Sub-Folder ⬇️
`Syntax: degit <repo-link/subfolder-name> <output-folder>`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2ahlduwvtmz2gp40si68.png)
Here we are cloning `components` sub-folder and saving in our system with the same name.   
   

3- Cloning whole repo without whole Git history   
`Syntax: degit <repo-link> <output-folder>`   
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4jvx1cxx05jw3oipms3i.png)

I ❤️ this. It's super fast. 🚀

That's it for today. Feel free to provide any type of feedback. I highly appreciate that. Meanwhile, you can find me on Twitter [@InsaneNaman](https://twitter.com/InsaneNaman).

Signing off. See you soon.
📺 AWS News - Episode 1
Tags: aws, news, cloud, developer
Published: 2020-09-03 09:29:56

{% youtube jUcdAlqZJ7I %}

#### In this episode:
★ Amazon EC2 Hibernate
- https://aws.amazon.com/about-aws/whats-new/2020/08/pause-resume-workloads-m5a-r5a-instances-amazon-ec2-hibernation/

- - -

### For more AWS news from around the cloud, please follow, clap & [subscribe to the channel](https://www.youtube.com/channel/UCo6iCvAfqVvxKfYmJmJCB7g)!
📺 AWS News - Welcome
Tags: aws, news, cloud, developer
Published: 2020-09-03 09:26:30

A curated list of AWS news from around the cloud.

{% youtube H1W7mbghbXQ %}

- - -

### For more AWS news from around the cloud, please follow, clap & [subscribe to the channel](https://www.youtube.com/channel/UCo6iCvAfqVvxKfYmJmJCB7g)!
TESTER LÀ GÌ? TESTER CẦN NHỮNG KIẾN THỨC VÀ KỸ NĂNG GÌ?
Tags: tester
Published: 2020-09-03 09:07:26

Hiện nay nhu cầu tuyển dụng vị trí này ở các công ty công nghệ là rất lớn, bởi tầm quan trọng và không thể thiếu của nó trong quá trình hoàn thiện một phần mềm. Nếu như bạn mong muốn tìm kiếm một công việc tester ưng ý nhất, có được những thông tin mới nhất về công việc hiện đang rất hot này nhé!