teleren/devto huggingface dataset:
Translate Readme to Groot's Language
Tags: actionshackathon
Published: 2020-08-23 19:11:47

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)
![groot](https://i.pinimg.com/originals/91/1f/a2/911fa26109f5633959e0b698f68e9a3f.gif)I really love groot, not because of anything but his language. It has only three words. `I`,`am`,`groot`. And it can mean anything in the world making it easy to learn and understand. As part of my test to modify markdown files at a lower level for my [Translate Readme Action](https://github.com/dephraiim/translate-readme), I creates this [action](https://github.com/dephraiim/groot) modify the texts in a readme, thereby changing the content of the readme to groots language. As another action I created, I am submitting it.

### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)
Wacky Wildcards

### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
{% github dephraiim/groot no-readme %}

### Additional Resources / Info

I am groot. 
[Note]: # (Be sure to link to any open source projects that are using your workflow!)

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )

[Reminder]: # (Submissions are due on September 12th (11:59 PM PDT) and winners will be announced on September 23!)
Valid argument values for app.use( )
Tags: 100daysofcode, javascript
Published: 2020-08-23 19:08:26

App.use( ) is an express method that mounts middleware functions in express applications.  It takes two arguments, a path and a callback function (the middleware). If we intend to use the middleware every time a request is made regardless of the route, the path is ommited, leaving us with:
```javascript
app.use(callback)
```
If the middeware is intended for a specific route the path must be included as an argument. There are number of different valid path values including but not limited to:
 * Path such as `/users`. This path defines any route beginning with `/users`
```javascript
app.use('/users' ,callback)
```
 * Path pattern `/user+profile`. Any route beginning and ending with user and profile
```javascript
app.use('/user+profile' ,callback)
```
 * An array. `['/users', '/profile']`.
```javascript
app.use(['/user', '/profile'], callback)
```
This are just but a few, you can find the full list in [Express documentation](https://expressjs.com/en/4x/api.html#app.use).

The callback argument can be passed as a single function , multiple function or an array of functions.
```javascript
app.use('/' ,callback)
app.use('/' ,callback, callback2)
app.use('/', [callback, callback2])
```

*Note to myself: Tutorials are a quick way to get started but reading the documentation is very essential as much as it can be long and boring.*

_Day 38_
Don't repeat yourself principle ( DRY )
Tags: javascript, php, functional
Published: 2020-08-23 18:48:51

someone said :
' They say good programmer writes 100 lines of code per day but a great one deletes 50. Do you agree? Let's become the latter by following the Don't Repeat Yourself principle, because the best code is no code at all '.

when I made my first search about DRY I find this :
Don't repeat yourself is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy. The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system".

So what this mean?  and how can we use it? 
in the Article, I try to write a simple explication.
Don't repeat yourself principle ( DRY ) has been formulated by Andy Hunt and Dave Thomas in their book The Pragmatic Programmer.

DRY is a principle we should use every day in our code, because it makes it simple to read and understand, by never write a two function that will do the same stuff.


Before you write your code, you should think two or three steep forward, this way will help you get the big image for you All code, and in this way will find yourself apply DRY.

Conclusion

DRY is one the principal of CLEAN CODE,
make sure to always search for improving your code, until it is easy to read by others because one day you will be the other.
Capitalize the first letter of every word
Tags: webdev, beginners, javascript
Published: 2020-08-23 18:47:45

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

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro Learning ● Web Development ● Javascript ● MERN stack  
**www.codedrops.tech**
Can you make a landing page review?
Tags: devops, design, ux
Published: 2020-08-23 18:43:25

![screpy website analysis tool](https://dev-to-uploads.s3.amazonaws.com/i/l2wv0dv3v69ow2wof7q3.png)

We are working on a user-friendly interface for Screpy.
What do you think is the biggest shortcoming/defect of [this page](https://screpy.com)?
Async/Await easy retry in c#
Tags: csharp, dotnet, webdev, productivity
Published: 2020-08-23 18:37:57

---
title: Async/Await easy retry in c#
published: true
description: In Asynchronous programming in some cases we need to retry a method if it fails. Easy-Retry can provide this functionality with ease
tags: csharp , dotnet , webdev , productivity
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/x4stck1ndz7o1bknv3lh.jpg
---

In Asynchronous programming in some cases we need to retry a method if it fails. [Easy-Retry](https://www.nuget.org/packages/EasyRetry) can provide this functionality with ease :) 


#### [NuGet](https://www.nuget.org/packages/EasyRetry) Installation
#### [GitHub](https://github.com/alicommit-malp/Easy-Retry) Source Code 

```
.Net CLI
dotnet add package EasyRetry

Package Manager
Install-Package EasyRetry

```

## Usage

Let's say there is a HTTP Task which you need to retry in case it fails 

```c#
private async Task Task_NetworkBound()
{
    await new HttpClient().GetStringAsync("https://dotnetfoundation.org");
}
```
In order to retry it after 5 seconds you just need to do as follows

```c#
//With DI
await _easyRetry.Retry(async () => await Task_NetworkBound());

//Without DI
await new EasyRetry().Retry(async () => await Task_NetworkBound());
```

Or you can use the retry options to customize the behavior of the retry algorithm as follows 

```c#
await _easyRetry.Retry(async () => await Task_NetworkBound()
    , new RetryOptions()
    {
        Attempts = 3,
        DelayBetweenRetries = TimeSpan.FromSeconds(3),
        DelayBeforeFirstTry = TimeSpan.FromSeconds(2),
        EnableLogging = true,
        DoNotRetryOnTheseExceptionTypes = new List<Type>()
        {
            typeof(NullReferenceException)
        }
    });
```
#### [NuGet](https://www.nuget.org/packages/EasyRetry) Installation
#### [GitHub](https://github.com/alicommit-malp/Easy-Retry) Source Code
3 List To String Tips You probably didn't know
Tags: kotlin, android, java, androidbites
Published: 2020-08-23 18:01:18


Hi #androidDevs, This is Androidbites where I try to break down a small concept into an understandable code snippet and share my learning experience with it.

String to List conversions and back to it i.e List to String are very much crucial operations need to know if you're into competitive programming. Today let's explore how to do that in Kotlin...

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


to learn more advance operations that can be performed on the `joinToString()` follow up from:

https://chetangupta.net/list-to-string/

see you on the other side 😈

Happy Hacking!

Follow me: LinkedIn : bit.ly/ch8n-linkdIn Medium : bit.ly/ch8n-medium Twitter: bit.ly/ch8n-twitter StackOverflow : bit.ly/ch8n-stackOflow CodeWars : bit.ly/ch8n-codewar Portfolio : bit.ly/ch8n-home Github : bit.ly/ch8n-git Instagram : bit.ly/ch8n-insta Youtube: bit.ly/ch8n-youtube
What is serverless?
Tags: serverless, aws
Published: 2020-08-23 17:54:26

I will break down how things used to work and slowly come back what serverless means as on date.

Say I want to host an application. Here is what I used to earlier -

Case 1: Buy a physical server. Setup the hardware, the software the networking, the storage, and all other dependencies and then host my website. Problem with this, too expensive to buy an actual server. Difficult to upgrade in order to scale. No-fault tolerance or load balancing etc.

Case 2: Rent a server from the many hosting providers out there. Buy a shared space or a dedicated one. Put my software on it. Get charged for using it or not using it as it's on rent. You pay X amount regardless of usage.

Case 3: Host my application on the cloud. Get charged for what I use and for how many hours I use. Say my application wasn't used or I switched my database off for some reason. I won't get charged for it. Say I want to scale my RAM to adjust to my user visits, I can do that with a single click. Get more instances of my CPU. You guessed it, can do it with another click(s) or so.


So serverless basically means, pay-per-use model. You pay for the amount of time you are using. 

Pretty cool!
Right way to test (deep) nested JS objects for undefined properties 
Published: 2020-08-23 17:40:00


Problem: What is the best optimal way to test (deep) nested objects for undefined properties apart from 
```
if(test.level1 && test.level1.level2 && test.level1.level2.level3) {
    alert(test.level1.level2.level3);
} 
```
:)
Solution: Suppose this is our deep nested object
```
var test = {level1: {level2: {level3: "level3"}}};
```
Most performant way is as per this writing and if you have not upgraded to ECMAScript 2020 Standard.
```
var level3 = (((test || {}).level1 || {}).level2 || {}).level3;
alert( level3 );
```
In ECMAScript 2020 standard this can be done as this
```
const value = obj?.level1?.level2?.level3 
```
For complete discussion please see stackoverflow original article below:
https://stackoverflow.com/questions/2631001/test-for-existence-of-nested-javascript-object-key/4034468#4034468
Note: For above custom solution test should be defined and also it might not work if properties are booleans.
Open Source Funding Survey Results
Tags: opensource, survey
Published: 2020-08-23 16:50:13

Hey there! A while back I wrote [my first article on dev.to](https://dev.to/alexanderwende/open-source-funding-survey-22h8) about a survey on the topic of funding in open-source projects, which I created with 2 friends of mine. 

The survey is now over and the results are finally available on [https://opensourcefunding.github.io/#results](https://opensourcefunding.github.io/#results).

Despite the relatively low turnout - 43 respondents to be precise - we think the results are still interesting and somewhat representative. We want to thank everybody who contributed and hope you find the results useful.
How do you make a about page route? 
Tags: django, python, help, html
Published: 2020-08-23 16:42:39

I’m trying to create a simple route for a about page:

path(‘about/‘ aboutpage_view, as_view(), name=‘about’)


But it’s not working,
It says it can’t find the name, then also it can’t find the views. 

I named it def aboutpage_view
Docker: permission denied while trying to connect to the Docker daemon socket
Tags: docker, ubuntu
Published: 2020-12-30 02:36:09

---
title: Docker: permission denied while trying to connect to the Docker daemon socket
published: true
date: 2020-08-23 16:19:02 UTC
tags: docker, ubuntu
canonical_url: https://danielesalatti.com/docker-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/
---

This is mostly a memo for myself since I'm sure I'll stumble onto this in the future as well, but I figured it might be useful for others as well.

If you try to run a docker command you may get an error like the following:

```
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create?name=prom_empty: dial unix /var/run/docker.sock: connect: permission denied
```

That is probably because your user is not in the docker group.

To fix this, simply create the group and add yourself to it:

```
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
```

If you installed Docker using `snap`, i.e. with something like:

```
$ sudo snap install docker
```

Then you will need a couple additional steps:

```
$ sudo snap disable docker
$ sudo snap enable docker
```

Log out and back in again, then test your Docker installation by running the hello-world image:

```
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete 
Digest: sha256:7f0a9f93b4aa3022c3a4c147a449bf11e0941a1fd0bf4a8e6c9408b2600777c5
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/
```

More details and useful post-install resources [here](https://docs.docker.com/engine/install/linux-postinstall/).

Alright, that was it.
Do you use personal assistants?
Tags: discuss
Published: 2020-08-23 16:15:33

I'm doing an research about IoT and UX. I want to know: Do you use a personal assistant on a daily basis? Things like send a message, calls, reminders, check calendar...and if you use, how do you define the experience over a conventional method (manually doing this things in your phone, for example). If you don't use them, why?
Go To Sleep-a-tron Github Actions Hackathon Submission
Tags: actionshackathon
Published: 2020-08-23 16:10:54

### My Workflow
**Name:** FraserTooth/go-to-sleep
**Description:** This Github Action will use the timestamps in commit logs to figure out whether someone is doing work past their bed time...and tell them off!
**Being Used:** On itself...🤣
**Github:** [Link](https://github.com/FraserTooth/go-to-sleep)

### Submission Category: 

Wacky Wildcards (I think...)

### Yaml File or Link to Code

{% github https://github.com/FraserTooth/go-to-sleep %}
[Link to Release](https://github.com/FraserTooth/go-to-sleep/releases/tag/1)

### Additional Resources / Info

[Explanatory DEV.to Post](https://dev.to/frasertooth/combatting-burnout-with-the-go-to-sleep-a-tron-25f9)
Visualising documentation: JavaScript array.flatMap
Tags: javascript, beginners, tutorial, codenewbie
Published: 2020-08-23 16:08:55

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

Today’s function is array.flatMap(), mdn description [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap). 

FlatMap does two things: 
1. map() -> applies the test function to each element of the aray
2. flat() -> flattens the results, i.e. smooshes together any nested arrays into a new single level 'flat' array.

That's right, it's the same as doing array.map.flat(). So why use it? It's a bit more efficient.

I've done my own version of the docs with sketches together. Here’s the folder for [array.flatMap](https://github.com/cfereday/javascript-core-functions/tree/master/arrays/do%20not%20mutate/returns%20a%20new%20array/flatMap). Check out the [readme](https://github.com/cfereday/javascript-core-functions/blob/master/README.md) to see how you can run the examples.
Syntax Podcast: JSON, JSNONP and CORS
Published: 2020-08-23 14:11:09


When you try to fetch data from another source, you have to use JSON(Javascript Object Notation). JSON allows the API to be turned into `string`, that is very easy to move, and then after the `fetch`, `parse` it back to an object. By default two separate browser entities cannot access to one another's data, because otherwise they could make changes and pull out sensitive information. However, there are ways to share data across websites. 

JSONP - is JSON with padding is an addition to a JSON format and it allows to request the API from another domain. You can only do that if the providing website gives the permission. The way it works, is that you cannot load data cross origin, but you can load Javascript cross origin, so the work around is that you have to wrap the data into a Javascript callback function and pass it that way.

CORS - stands for cross-origin resource sharing, and is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served. A web page may freely embed cross-origin images, stylesheets, scripts, iframes, and videos. 
With CORS you can designate the number of URLs that can take data from your website. You can use `Access-Control-Allow-Origin: *` allow access to any website, however it can be very risky for your application. CORS are very important to be aware of, because one way or another, dealing with data you run into it, and you have to know how to properly deal with it.
I build a Web Scraping API, curious what you guys think!
Tags: saas, webdev, javascript, showdev
Published: 2020-08-23 15:44:00

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

I was playing around with Headless chrome browsers and proxy pools and decided it would be fun to turn it into a side project.

A few months later and the [website is live](https://scraperbox.com) :)

Basically it is an API that handles headless Chrome browsers and proxy pools for you so you can easily scrape data from the web. 

I'm curious what you guys think of it!
Free your blocked ports on Linux
Tags: linux, ubuntu, troubleshooting, terminal
Published: 2020-08-23 15:36:57

You closed all your code editors and terminals but your ports are still _blocked_.

The only solution you would have in your mind as a beginner is, to restart the computer. That would definitely fix this.

But what if there is a better way?

What if I can check where my port is being used and close that application, rather than restarting the computer?

For example, my blocked port is 3005 and I would like to see which application is still using it. I would simply run this in my terminal-

`lsof -i :3005`

This would give an output with a table of all the programs using this port 3005. Notice the PID column there and note down its value. In my case, it was 6595.

Now run the following command to kill the process and free the port from this evil app-

`kill 6595`

Now run your project on that port and live happily ever after.



![Free Ports](https://dev-to-uploads.s3.amazonaws.com/i/cf6hqto773ck1pqeer0v.png)



### Closing Notes

This is not a very frequent problem but can be frustrating for beginners and developers who are not proficient in Linux.
Find and update outdated npm packages
Tags: beginners, webdev, npm, javascript
Published: 2020-08-23 15:22:42

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

**Thanks for reading 💙**  
Follow @codedrops.tech for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro Learning ● Web Development ● Javascript ● MERN stack  
Visit www.codedrops.tech
Robot Framework - Setup CI using GitHub Actions
Tags: actionshackathon, robotframework, devops, testing
Published: 2020-08-23 15:20:22

Submission for the [DEV: GitHub Actions For Open Source](https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn) 🦕🦖

### My Workflow

Continuous Integration (CI) workflow for running [Robot Framework](https://robotframework.org/) tests. Demo has two Workflows that provide these use cases:

* Run Robot Framework tests:
    * when new commits are pushed to the main branch
    * when new commits are pushed to a Pull request
    * run tests with a pre-defined schedule
    * Trigger tests manually. Input variables for a test run.
* Reporting:
    * Store Robot Framework reports from test runs
    * Post summary of results as comment to a commit. Comment is posted only to the main (master) branch. 


### Submission Category 

Maintainer Must-Haves


### Link to Code

{% github laojala/robot_docker_demo %}

### Additional Resources / Info

The project is intended as a demo about how to integrate Robot Framework tests to the CI.

#### Description of the tests

The project implements a simple "dinosaur test" that takes two inputs and tests if those are dinosaurs. Test is coded using Robot Framework and it's standard Libraries.  Project has also a cron-schedule for running tests for this dinosaur test once a year and running tests for the pull requests and for commits to the main branch.

Image below displays how the Dinosaur test can be triggered manually in the Actions:

![Screenshot of GitHub workflow_dispatch event trigger when user has clicked button "Run Workflow". There is a form-type of input overlay with fields: "Use workflow from: Master", "Creature that is expected to be dinosaur:
achillobator", "Creature that is not a dinosaur:
pteranodon", and "Tag for tests to run. Use '*' to run all: dinosaur". Button in the bottom has text "Run workflow"](https://dev-to-uploads.s3.amazonaws.com/i/67zsszq9ris1ku0zkv7g.png)

#### Further resources

I have created another demo project that describes Docker usage with Robot Framework RPA tasks. This project contains GitHub Actions BOT for closing issues. Project describes in detail how to run Robot Framework tests inside a ready-made Docker container:
* [https://github.com/laojala/rpa_challenge](https://github.com/laojala/rpa_challenge)
* [DEV Blog Post: Robot Framework - Run tasks using GithubActions](https://dev.to/laojala/robot-framework-run-tasks-using-githubactions-1oaa)