teleren/devto huggingface dataset:
Importance of Standard Operating Procedures in Code Development
Tags: rapinnotech, codequality, sop, software
Published: 2020-05-26 15:03:40

Standard Operating Procedures or SOPs are documents containing step-by-step instructions the user needs to follow to perform a function. It acts as a guide, highlighting the best practices you need to integrate into your workflow to get high-quality products.

While it doesn’t show the user how to perform specific tasks, it creates a transparent framework for your company. If you are on the fence about setting SOPs for your business, given below are three reasons that highlight their importance in code development:

Decrease training costs

With SOPs, you are setting up your company for future growth. When the plan is to have multiple branch offices, these documents are extremely helpful. For starters, they allow you to port your work processes to new locations.
Another major benefit of SOPs is that they bring down the cost of training. New employees will have access to standard operating procedures. At the same time, it highlights their responsibilities and ensures everyone is on the same page. Your new staff will be able to settle into your company quickly while decreasing your training costs.

Prevent the loss of knowledge

Imagine a situation where only a handful of employees know about top-notch code development practices. However, these staff members decided to leave your company or take a couple of weeks off to recover from an illness/go on vacation.

Without SOPs, any employee loss can have a significant impact on your business. You will have to halt operations, which can be an expensive affair. With SOPs, code development documentation will remain intact despite the resignation and retirement of your employees. During the time of absence of your staff, you can transfer the work to another member with minimal direction.

Standardize consistency and quality

With SOPs, your company will be able to ensure a level of quality and consistency in your code development. The reason being, employees have to follow the instructions highlighted in the official document to complete their jobs.

As a result, your staff doesn’t have to waste time trying to figure out what they have to do every day. From the start of code development till the end, you can be confident about the product you deliver to your clients. It protects your company’s integrity while providing the framework for employee accountability.

SOPs are indispensable when it comes to code development, due to the importance of these documents. If you don’t have one for your company, develop and integrate it with operations for both short and long-term growth!
Run your Github Actions jobs from a specific directory
Tags: todayilearned, github, webdev
Published: 2020-05-26 15:02:10

---
title: Run your Github Actions jobs from a specific directory
published: true
cover_image: https://imgbbb.com/images/2020/05/26/actions.png
description: instruction to run Github actions from a specific directory
tags: todayilearned, github, webdev
---

I am working on a current project where the Backend and the Frontend of the application are on the same repository of Github. That's why I faced a situation to run the Github Actions jobs for my React app from a specific directory. And, I find a quick solution to it.

##**Specify for all Jobs:**##

Github actions have a working-directory option to declare on workflow. It specifies the working directory for all run steps. 
```yaml
defaults:
  run:
    working-directory: web
```
Documentation: 
[defaults.run] (https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun)

##**Specify for specific Job:**##

So, you got the idea. This can be configured for specific jobs too. To set working_directory for a specific job, here is the procedure- 

```yaml
jobs:
  job1:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: scripts
```
Documentation: 
[jobs.<job_id>.defaults.run] (https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun)

Here is a simple Actions for NodeJs build job. The 'web' directory will be used for all jobs run-

```yaml
name: Node.js CI

on:
  push:
    branches: [ frontend-develop ]
  pull_request:
    branches: [ frontend-develop ]
    
defaults:
  run:
    working-directory: web

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm test 
```
From the first documentation an important note to quote- 
> When more than one default setting is defined with the same name, GitHub uses the most specific default setting. For example, a default setting defined in a job will override a default setting that has the same name defined in a workflow.

Thanks for checking out the article. I hope it may help someone somehow. Let me know if I missed something or did something wrong. 

Good Luck!

Cover Image: Github

You can find me on- 
[Twitter](https://twitter.com/jahananower)
[LinkedIn](https://www.linkedin.com/in/anower-jahan-466210122/)
Installing Azure CLI for debian based systems
Tags: azure, cli, linux, mint
Published: 2020-05-26 14:52:15

If you were to google "install azure cli on linux". Chances are you'
re going to come across [the following guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest#manual-install-instructions) from Microsoft on how to do it. I also tried a [python package](https://pypi.org/project/azure-cli/) that wasn't working for me but you may have more luck.

The issue is if you're using a Linux distribution that isn't Debian or Ubuntu it seems like there's no hope. For me, using Linux Mint 19.3 I couldn't see the issue initially, then I noticed `lsb_release -cs` in the 3rd step of the above guide. This outputs just the codename of your distribution. And if there is no target for it you're not only not getting your new shiny CLI but you get a malformed repository in your software sources.

# Let's do this

Firstly, assuming you have blindly followed Microsofts guide as I did then we need to remove that malformed repository. The easiest way to do it for this step is to open a GUI, blasphemous I know. Anyway, in Linux Mint I open up "Software Sources", select the "Additional repositories" section and remove all *Microsoft* repos.
![](https://i.imgur.com/LbgzVSN.png)

If you're not using Linux mint there will be something similar for you just have a look around.

---

Now that's dealt with let's add the _correct_ repository for our system. We need to know what version our distro is based on. For mint there is [this handy table](https://en.wikipedia.org/wiki/Linux_Mint_version_history#Release_history). Where Linux Mint 19.x is based on Ubuntu Bionic Beaver. With the codename being *bionic*. Or you can just use the command `cat /etc/upstream-release/lsb-release`, my output is:
```
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
```

Now we can do some installing. For ease, I'm copy and pasting the first 2 steps from the Microsoft guide.

Packages for install process:
```
sudo apt-get update
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
```

Download and install Microsoft signing key:
```
curl -sL https://packages.microsoft.com/keys/microsoft.asc | 
    gpg --dearmor |
    sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null
```
You may have to remove the new lines after the `|` (pipes).

Next, the new and improved, add Azure CLI repository:
```
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ bionic main" | 
sudo tee /etc/apt/sources.list.d/azure-cli.list
```
Again here with the new line removals. Notice that `bionic` is added in there. If your system is not using `bionic` swap it out for whatever your systems codename is.

Now it's just a case of the usual install:
```
sudo apt-get update
sudo apt-get install azure-cli
```
---

You should be set to do all the azure commands :)

Issue submitted: https://github.com/Azure/azure-cli/issues/12758
React issue
Published: 2020-05-26 14:51:03

Hi All,

beginner level of react , create new using "npx create-react-app hello-world", successfully create app when try to run with npm start. Getting error on browser
  
Failed to load resource: the server responded with a status of 431 (Request Header Fields Too Large).

If anyone have any idea regarding this please help me.

Thanks in advance.
Using a simple Bash script to increase your iOS bundle version
Tags: ios, devops, bash, commandline
Published: 2020-05-26 14:42:47

Last week I got a message from someone using a tool I created for myself called `XCIncreaseBuildVersion`. I created this script that increases the bundle version in preparation for uploading my app to App Store Connect. 

It's always satisfying to see your tools help someone. 

The script searches the `Info.plist` files and increases the build version number using `plutil(1)`.

If you are interested in the tool you can find it here:

https://github.com/rderik/xcibversion/

If you want to check the whole article that explains the logic behind the automation of the process, and how to upload the `xarchive` to App Store Connect, you can find it here:

https://rderik.com/blog/automating-build-and-testflight-upload-for-simple-ios-apps/

Who knows, maybe it can also help you in your CI/CD pipeline.
78/100 100daysofcode Flutter
Tags: 100daysofcode
Published: 2020-05-26 14:29:15

day 78/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today learn about Location, Google map api, acces current location
https://github.com/triyono777/100-days-of-code/blob/master/log.md
SEQ & PASTE: An effective way to add sequential numbers to the beginning of a file in bash
Tags: bash, sequence, linux
Published: 2020-05-26 14:28:16

Recently I explored `seq` and `paste` Linux commands and I was amazed how effectively we can accomplish our desired target of adding a sequential numbers to the beginning of a file without using any `for` loop or manipulating the data file line by line.

Lets dive in to see how we can leverage these two commands.

`seq [n]` generates sequential numbers starting from **1** to **n**.

```bash
seq 10
# Output
# 1
# 2
# 3
# 4
# 5
# 6
# 7
# 8
# 9
# 10
```

We can redirect the output of the command to a file, say, `serial`.
```bash
seq 1024 > serial

wc -l serial
# Output
# 1024 serial
```

The second command we are going to explore is `paste`. The command uses two or more files to produce an output separated by `whitespace` in columns.

Lets say we have a `cities` file with names of different cities in it

```
Prague
Montreal
Amsterdam
Rome
Barcelona
```
and a `serial` file with the following numbers

```
1
2
3
4
5
```

Lets use `paste` command on `serial` and `cities` files.

```
paste serial cities
# Output
# 1	Prague
# 2	Montreal
# 3	Amsterdam
# 4	Rome
# 5	Barcelona
```
As we can see the output is separated by a `whitespace`. We will see how we can modify the delimiter shortly.

### Wind things up
Lets put 2 commands together to accomplish our target.

Suppose we have a CSV file `mock.csv` with the following content
```
Ryder,eget.metus.In@congueturpis.com,El Quisco
Keelie,vel.faucibus.id@libero.net,Temuka
Hamilton,enim.non.nisi@Maecenas.co.uk,Leeds
Lani,neque.sed.dictum@et.net,Largs
Gloria,montes.nascetur@nisl.co.uk,Vejalpur
```
and we wish to add sequential numbers to the beginning of the file. Here is the final bash script.

```bash
#!/bin/bash

# Generate sequence of numbers (1 to 5)
seq 5 > serial

# Use paste to combine two files with comma as a delimiter
paste -d, serial mock.csv > data.csv

cat data.csv
# Output
# 1,Ryder,eget.metus.In@congueturpis.com,El Quisco
# 2,Keelie,vel.faucibus.id@libero.net,Temuka
# 3,Hamilton,enim.non.nisi@Maecenas.co.uk,Leeds
# 4,Lani,neque.sed.dictum@et.net,Largs
# 5,Gloria,montes.nascetur@nisl.co.uk,Vejalpur
```

Viola!!! That was simple and elegant. Note that we have used `-d,` option with `paste` to indicate the delimiter to be `,` rather than a `whitespace`.

Note that we have hard coded `5` as an argument to `seq` command because we know beforehand that `mock.csv` contains `5` rows. What if we don't know the number of rows in the CSV file? Simply use `wc -l` command and extract the number of lines using `awk` or `cut`.

```bash
LINES=$(wc -l mock.csv | awk ' {print $1} ')
# LINES=$(wc -l mock.csv | cut -d ' ' -f1)

# Use LINES variable as an argument to seq command
seq $LINES
```

That's  it.

---

I hope it will help you. Keep Coding!
Matt's Tidbits #70 - Cleaner diffs!
Tags: mattstidbits, kotlin, tidbittuesday
Published: 2020-05-26 14:24:53

[Last time, I wrote about some neat Kotlin field tricks.](https://medium.com/@matthew.b.groves/matts-tidbits-69-neat-kotlin-field-tricks-ae778bf0241f) This week, I wanted to share a tip for how to achieve cleaner code diffs!

A coworker recently submitted a PR with something that caught my eye:
```kotlin
fun foo(
  param1: String,
  param2: String,
) {
}
```

Did you see it? Right here:
![](https://cdn-images-1.medium.com/max/1600/1*0EwDMzhEeqVRkJE6peIN_Q.png)

At first, I thought this might be some kind of error, but after researching a little, I found that trailing commas are an upcoming feature of Kotlin!
[https://blog.jetbrains.com/kotlin/2019/12/what-to-expect-in-kotlin-1-4-and-beyond](https://blog.jetbrains.com/kotlin/2019/12/what-to-expect-in-kotlin-1-4-and-beyond/#trailing-commas)

Why is this helpful? Well, if you add or remove parameters to this method, the diff will look much cleaner!

Here's an example of adding a parameter without using trailing commas:
![](https://cdn-images-1.medium.com/max/1600/1*mtQeQKyUryIqYn394IZaLA.png)

And here's what this same change looks like when using trailing commas:
![](https://cdn-images-1.medium.com/max/1600/1*gfW-OFTysArUB9mCJJr9cg.png)

It's a small change, but having trailing commas can really cut down on the clutter of seeing two lines changed, when in fact you had only changed one. That means fewer lines of code to review, which should reduce the amount of review time, and also make it less likely that a substantial change would slip past someone.

What other upcoming Kotlin features are you most excited about? Let me know in the comments below! And, please follow me on Medium if you're interested in being notified of future tidbits.

*This tidbit was discovered on May 20, 2020.*
Don’t forget about the new people you've welcomed into your community
Tags: community, virtualevents, conferences, inclusion
Published: 2020-05-26 14:11:29

Right now, connecting with other humans is important. Many of us have converted our in-person events to virtual rather than waiting until the pandemic is over. Some have transitioned the same event directly to a zoom call and called it good enough (and maybe that works). Others have put more thought into it. They've considered the value of their in-person events and figured out how those values could translate to virtual. They've considered the opportunities that virtual has to offer. One of those opportunities is that we can be more inclusive.

### We can be more inclusive

For the last few months, we’ve been able to reach more and different people with our virtual events. Now we can engage with someone who can’t get away from work during the evenings or the workday. We can engage with people who can’t afford to travel or to take work off to attend. We can engage with people who might not enjoy in-person events for various reasons (maybe they are introverts who prefer small groups). We can engage with new parents who can't or won't attend in-person events. We can include parents who can’t find or afford childcare or those who are caring for elderly parents. We can include kids. Some people are more comfortable in front of a webcam and mic instead of 1500 people in a crowded room. Some attendees might be more likely to ask questions by chat instead of in that crowded in-person room. We can include people who might not otherwise feel welcome in our communities because of their gender, race, religion, or ability. We can engage with other communities.

### How will you engage new people after the pandemic?

We've taken this opportunity to include more folks. How will you maintain the new online community that you've built (either from scratch or as you've grown) as we start relaxing the rules and laws surrounding in-person events? We are going to be adjusting to a new normal for quite a while, but eventually we'll be able to meet in-person. How will you engage your online community then? Will you go back to excluding them, making it harder for them to take part in and give back to your community? Or will you continue to meet them where they are and offer ways to engage in ways that work for them?

Start thinking now how you will engage this new and different community you’ve been building over the last few months. Offer your digital membership after your in-person communities reopen and events start happening. Stream your small (or large, whenever we get to that point) in-person events. Find a place where your online community can connect outside of your in-person and virtual events.

### Don't forget about the new people

Don’t forget about the new people you've welcomed into your community over the last few months. Don't go back to the same old, same old. You were there for them at a time when it mattered, so don’t put the responsibility back on them to come to you after the pandemic ends.
Code nothing
Tags: devgrad2020, octograd2020
Published: 2020-05-26 14:08:28


# Code nothing

Code nothing is the best way to write secure and reliable applications. Write nothing; deploy nowhere.

## Getting Started

Start by not writing any code.

```

```

This is just an example application, but imagine it doing anything you want. Adding new features is a bliss:

```

```

The possibilities are endless. Think nothing, do nothing.

### Building the Application

Now that you have not done anything it's time to build your application:

```

```

Yep. That's it. You should see the following output:

```

```

### Deploying

While you still have not done anything it's time to deploy your application. By running the following command you can deploy your application absolutely nowhere.

```

```

It's that simple. And when it comes time to scale the application, all you have to do is:

```

```

I know right?

## Contributing

You don't.

> This post is based on Kelsey Hightower [repository](https://github.com/kelseyhightower/nocode).
How To Make API Request In Flutter.?
Tags: flutterdevelopment, api, flutterapp, flutterapi
Published: 2020-06-20 14:31:16

---
title: How To Make API Request In Flutter.?
published: true
date: 2020-05-26 14:03:00 UTC
tags: flutterdevelopment,api,flutterapp,flutterapi
canonical_url: https://medium.com/innovation-incubator/how-to-make-api-request-in-flutter-a93f902bbf3e
---

![](https://cdn-images-1.medium.com/max/1024/1*EnmjF5Rz8RnlItQX2aJpTw.png)

### What all we need ….??

- **http** package to make the request.
- **dart:convert** to process the response from server.

So now let’s make an App that will make API request to get the List of ToDo’s.

And then we will display the first ToDo.

Let’s get into the steps:

#### 1. Creating UI.

Create a ListTile , that will show our ToDo and a button which will make API request.

![](https://cdn-images-1.medium.com/max/294/1*kxaQIafD7Sbj_iZG2HD1eg.png)

![](https://cdn-images-1.medium.com/max/597/1*BGJ_N71ZDOkcwp8y4A48Cw.png)

#### 2. Making Request.

Create a method ,which will make API request.

![](https://cdn-images-1.medium.com/max/206/1*qaZ-gr9JCM9Ik5z8fvLZvQ.png)

![](https://cdn-images-1.medium.com/max/593/1*CvF9nfQXKUxK8w2U4_VkbA.png)

#### 3. Processing Data.

Now, we have to process the response, so we can use it easily.

![](https://cdn-images-1.medium.com/max/191/1*ytEJcC0LEDppZIqjsK3-NQ.png)

![](https://cdn-images-1.medium.com/max/588/1*zlGK2w5jA4PcJVQ5hXJQBw.png)

#### 4.Updating UI

Update the UI with received data.

![](https://cdn-images-1.medium.com/max/191/1*zhPcN9fWFNMGeO3Mk1XCYw.png)

![](https://cdn-images-1.medium.com/max/589/1*0t63Em41rJkQPNhTCeGqhQ.png)

#### 5. Functionality

At last, add functionality to the Raised Button

![](https://cdn-images-1.medium.com/max/297/1*smSrWJD1PtIQZJ3r4Hi8Yg.png)

![](https://cdn-images-1.medium.com/max/595/1*o-30NSjPOuDm8IV0iQHtyw.png)

The URL i have used above provides dummy API’s for trial

Also don’t forget to mention the http package in the pubspec.yaml file.

* * *
OBS Webcam
Tags: audiovideo
Published: 2023-01-06 01:21:08

---
title: OBS Webcam
published: true
date: 2020-05-26 03:53:56 UTC
tags: AudioVideo
canonical_url: https://brandonrozek.com/blog/obswebcam/
---

[Open Broadcaster Software](https://obsproject.com/) is a great piece of software for recording and live streaming different video content. It would be nice to use the same level of professional software in video calling software as well.

Now there already exists a [OBS plugin](https://github.com/CatxFish/obs-v4l2sink) for this purpose, but it does require recompiling OBS with this plugin. This post will outline a possible technique to get around this, at a cost of performance.

To see discussion around this topic, check out this [Github thread](https://github.com/CatxFish/obs-virtual-cam/issues/17).

OBS has two different options, streaming and recording. Since I want the ability to record a high fidelity version of my feed, we will use streaming to push video to a local RTMP server. This local RTMP server will then re-encode the video to a [v4l2 video device](/blog/fakewebcam/).

We will use `ffmpeg` as our RTMP server

```
ffmpeg -hwaccel vdpau \
       -fflags nobuffer \
       -listen 1 \
       -i rtmp://localhost:12345/live/app/ \
       -f v4l2 /dev/video20

```

| Flag | Description |
| --- | --- |
| `-hwaccel vdpau` | (Optional) Allows `ffmpeg` to use GPU for acceleration |
| `-fflags nobuffer` | Tells `ffmpeg` to not bother buffering the video and work with the latest frame possible. |
| `-listen 1` | Starts a server to listen for video. |

Then from OBS you will want to use the Auto-Configuration wizard to have it figure out the right set of parameters to use for the lowest latency. Once that is set you can hit the stream button and you are all set to use the fake video device for your calls! Depending on your hardware, you might notice a few seconds of latency.

To quickly verify that you can see your OBS video from the video device.

```
ffplay -fflags nobuffer /dev/video20

```