teleren/devto huggingface dataset:
Persistent multi-user Docker on macOS
Tags: docker, macos
Published: 2021-02-01 20:04:10

First, be aware that `docker` is not designed to be securely shared among multiple users. Please assume that anyone who has access to `docker` is effectively equivalent to `root'.

This assumes that users will be interacting with `docker` via the command-line, rather than graphically. It also assumes that the environment is such that allows a single user to be automatically logged into via the GUI, but this is mostly out of laziness rather than an underlying technical restriction.

1. Choose an account that Docker Desktop will run as. I recommend creating a `docker` user, but it could be any account. This account does not need admin access.

2.  Open `Settings -> Users & Groups -> Login Options`, and ensure that this user is automatically logged into.  

3. Created a shared containers directory:

```sudo mkdir -p /Users/Shared/Library/Containers
sudo chown docker:staff /Users/Shared/Library/Containers
sudo chmod -R 770 /Users/Shared/Library/Containers/```

4. Login graphically with the account that will run Docker and start `/Applications/Docker.app`, answer any questions it might have.
5. Open `Settings -> Users & Groups -> Login Items`, and drag the `Docker` app to it.
6. Quit `Docker Desktop` via the menu item
7. Open `Terminal` and move your Docker data to a shared location that can be written to by other users:

```mv ~/Library/Containers/com.docker.docker /Users/Shared/Library/Containers
chmod -R 770 /Users/Shared/Library/Containers/com.docker.docker
chmod -R +a "group:staff allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /Users/Shared/Library/Containers/com.docker.docker
chmod -R g+rw /Users/Shared/Library/Containers/com.docker.docker/Data
```

Then link your local Docker data to this shared source, and make sure that others can traverse into this folder to resolve the socket symlink:

```ln -s /Users/Shared/Library/Containers/com.docker.docker ~/Library/Containers/com.docker.docker
chmod g+x ~/Library ~/Library/Containers```

6. Restart `/Applications/Docker.app` to test
7. SSH into the host as another username, and run `docker run mariadb` to test.
8. Reboot host and reconnect via ssh to test (it may take a moment for Docker to start up)

This is the configuration we use for the #kernelcafe. Please add your improvements to the comments!
Definition of ready DOR and definition of done DOD templates
Published: 2021-02-01 20:01:15


Defining when a task can be started or when the task is completed is a basic activity that helps the development team to control the flow of tasks and avoid getting stuck when requirements are not clearly defined. It also prevents sending uncompleted changes into the development branch

## Definition of ready DOR

First definition helps the team to validate if a task is ready for starting the development. Next is a basic list of validations than can help the team determining if a task has the necessary information:

```
├── Is ready to start?
│   └── acceptance criteria is correctly described?
│       ├── If is a user interface, are the prototypes well defined and the gherkins written?
│       ├── If is an API, are all the entities and their attributes defined?
│       └── if (task cannot be started)
│          ├── add a comment
│          ├── move to parking lot
│          ├── assign to the person responsible for solving
│          └── end
├── update task status
│   ├── check estimated story points
│   ├── move the task to in progress
│   ├── create branch to work
│   └── create a pull request
└── end
```
## Definition of done DOD

```
├── basic validation
│   ├── follows TDD required structure?
│   ├── do structure follows CQRS structure?
│   ├── were all requirements completed?
│   ├── follows the required graphical design?
│   ├── are transactions tracked in AI?
│   └── are resources translated?
│       └── was static code analysis performed?
├── before sending a pull request
│   ├── validate that all automated tests are working
│   ├── static code analysis passing
│   ├── format code if needed
│   ├── check comments grammar
│   ├── remove any commented code
│   └── remove visual studio warnings
├── developer test environment validation
│   ├── commit changes
│   ├── merge changes from the integration branch
│   └── send pull request
```
How to Create a Firebase Project
Tags: firebase
Published: 2021-02-01 19:54:08

##Firebase
Firebase is a platform developed by Google for creating mobile and web applications. It provides the services such as 
* Authentication
* Hosting
* Storage
* DB
* Analytics etc...  

##Project Creation
1.  Login to [Firebase](https://console.firebase.google.com/) console
![FireBase](https://dev-to-uploads.s3.amazonaws.com/i/f9px3nirvdsyaf5uz0it.jpg)
2. Click on Add Project.
3. Enter the Project Name and click Continue.
![Project Name](https://dev-to-uploads.s3.amazonaws.com/i/r37s2y3a8h5olgns2fzb.jpg)
4. Continue on the Google Analytics section.
![Google Analytics section](https://dev-to-uploads.s3.amazonaws.com/i/0wnkrvsq09w6llsj7rwt.jpg)!
5. Select a Default Account else to create a new one and click Create Project.
![Create Project](https://dev-to-uploads.s3.amazonaws.com/i/5sm5wwg7umvj4xn4nf7m.jpg)
6. Few seconds to create. Once created you would able to see the project.
7. Successfully Project is created.
TodaysWeather: My first Ruby CLI Gem
Tags: ruby, cli, codenewbie
Published: 2021-02-01 18:52:17

It's now been close to 2 months since starting my software engineering journey with Flatiron. And I'm proud to announce that I've successfully created my first Ruby CLI gem using an object-oriented design. It's called TodaysWeather. And as you might guess, it provides the user with today's weather in the zip code of their choice.

The process was initially trickier than expected. Up until now, I've been building my fundamental dev skills through exercises with clear-cut answers. This was the first time that I had to tap into my own imagination and creativity to solve a problem from scratch using those new skills.

Once I decided on the purpose of the gem being to provide the user with the weather information, I hit my first roadblock. My experience so far had been solely with coding. But the first task of creating the gem was to create and organize the overall framework of files. Something I'd never done or experienced before. Where do I even start? Ugh. But with all other coding questions I've had so far, I immediately turned to Google. In a quick search, I learned that there's a simple command for creating the basic framework of files for a gem: $bundle gem project_name.

And it was great! It built the general framework and came with all the bells and whistles! The basic architecture of files. The MIT license. A README template that helps organize the developer's thoughts to the user. Sweet!! I was ready to get started!

Over the next 2-3 days, I coded the entire project with a few hurdles here and there. The main hurdles were staying focused on a single task at a time and properly organizing methods between the different objects I had created. I had to keep reminding myself to pace myself and to not worry too much about complete cleanliness now. Let's just get this thing working and then I can refactor it later to be more organized and concise.

I found a free weather API from OpenWeatherMap.org. I created an account with them and they provided me with a unique API key to access their weather data. I integrated the API key with my code and was successfully able to access their weather data stored in a hash.

I had previously linked my code to a repository on my GitHub account. After I had committed and pushed my updates, I got an alarming automated email from GitHub. My API key had been exposed. I immediately changed my repository settings to private and googled the situation.

I didn't even consider that my API key could be used by others on the internet. Fortunately, I had acted soon enough (much thanks to GitHub) that there weren't any problems. I deleted my original API key, generated a new one, and learned to save it in an environment variable that I could gitignore from being pushed to my public repository. Phew! That mistake could have costed me upwards of $2,000!

In the end, this was an extremely valuable experience. I learned a ton of new lessons and with my first gem successfully developed, I definitely gained some nice confidence boosts.

Stay tuned for more updates on this journey!
Help a Newbie!
Tags: help, codenewbie
Published: 2021-02-01 19:39:27

I'm somewhat of a new developer, I have background in LUA however, I'm currently going to Lambda School to learn JS, HTML, and CSS. Just started too. Was wondering if anyone had any information on how to best proceed for after school? What makes the most money? What are you working on? What were your challenges that I can avoid?
How to change slug before uploading to Algolia
Tags: gatsby, algolia, contentful, help
Published: 2021-02-01 19:31:12

I'm working on implementing Algolia search into my Gatsby website. I need to format the slugs of my content correctly so that Algolia gets the correct links.

The slug my query gets from Contentful is similar to `/icon-name/`

I need it to match the path that gets created from my Gatsby-node.js file path: `/design-resources/icons/${node.slug}/`

Is it possible to get this path after its created from Gatsby-node.js or is there a way to transform the icon Query below before uploading to Algolia?

### My Query

```
const iconQuery = `
query iconQuery {
    allContentfulIcon {
        edges {
            node {
                id
                title
                slug
                keywords
                pngFIle {
                    fluid {
                        srcSetWebp
                    }
                  }
              }
        }
    }
}`;
```

### Transformer for Algolia

```
const queries = [
  {
    query: iconQuery,
    transformer: ({ data }) =>
      data.allContentfulIcon.edges.map(({ node }) => node), // optional
  },
];

module.exports = queries;
```
A better DX for GraphQL Requests
Tags: graphql, javascript, tooling
Published: 2021-02-01 18:48:26

If you have worked with GraphQL and been frustrated while skimming through the requests in the Network panel, you aren't alone. 

I am talking about this.

![GraphQL Requests in Chrome DevTools](https://dev-to-uploads.s3.amazonaws.com/i/ubv974yc55tjohifti91.png)

This kills a lot of time while trying to find out the exact request you are looking for since the requests look all the same.

Some time ago, I decided to do something about this to make the debugging experience better and faster and I stumbled upon [Apollo HTTP Link](https://www.apollographql.com/docs/link/links/http/#options) documentation.

When setting up Apollo, we provide a bunch of options and `link` is one of them. For HTTP Requests, we use `apollo-link-http`.

Especially this part.

> `uri`: the URI key is a string endpoint or function resolving to an endpoint -- will default to "/graphql" if not specified.

The main focus here is that `uri` can be a function and that function receives the entire query object. That object contains things like `variables` and `query` and also the `operationName`.

Now, as you can imagine, that can come in handy in trying to distinguish the requests from each other.

While setting up link in apollo configuration, we can change he `uri` to include the `operationName` as a URL parameter and it comes up in the Network panel with the same.

```js
import { createHttpLink } from 'apollo-link-http';

// In your configuration...
link: createHttpLink({
  uri: ({ operationName }) => {
    return `${options.httpEndpoint}/?gqlOp=${operationName}`;
  }
}) 
```
Here's the result.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gh6sbjdxap1oct9hyrqh.png)

Ain't that neat? Hope this helps you save some debugging time.
Check which apps on your Mac don't support Arm64
Tags: bash, applem1, applesilicon, arm64
Published: 2021-02-01 19:18:59

Hi there,
So I came up with a bash script that tells you which apps installed on your device aren't yet optimized for Apple Silicon(M1 chip, arm64).
It can be run simply with curl:
```
sh -c "$(curl -fsSL https://gist.githubusercontent.com/mahdyar/e72758d4a7a850cb001e75b5b0c5f143/raw/86d4eb6662fcf8e9ffe82cd67d7c5fcf31e5943d/whichiswhich.sh)"
```
or manually, there is more [here](https://gist.github.com/mahdyar/e72758d4a7a850cb001e75b5b0c5f143).
Have Fun! :)
Adding a theme support with a dark and oled theme | Vue component Lib - part 6
Tags: vue, beginners, webdev, tutorial
Published: 2021-02-01 19:02:27

Hey,

In this part we will be adding a theme package.
Adding a dark and oled theme
and then adding it to out playground!

Here is the Video:

{% youtube ELFlfMCW6xs %}

Code Repo for youtube: https://github.com/lampewebdev/lcs-components-yt
Code Repo for the project: https://github.com/lampewebdev/lcs-components

**👋Say Hello!** [Instagram](https://www.instagram.com/lampewebdev/) | [Twitter](https://twitter.com/lampewebdev) | [LinkedIn](https://www.linkedin.com/in/michael-lazarski-25725a87) | [Medium](https://medium.com/@lampewebdevelopment) | [Twitch](https://dev.to/twitch_live_streams/lampewebdev) | [YouTube](https://www.youtube.com/channel/UCYCe4Cnracnq91J0CgoyKAQ)
Tell Me I'm Wrong, Please (Angular and Async)
Tags: angular, typescript, webdev
Published: 2021-02-07 05:25:27

---
title: Tell Me I'm Wrong, Please (Angular and Async)
published: true
date: 2021-02-01 19:00:40 UTC
tags: Angular,TypeScript,WebDevelopment
canonical_url: http://wildermuth.com/2021/02/01/Tell-Me-I-m-Wrong-Please-(Angular-and-Async)
cover_image: https://wilderminds.blob.core.windows.net/img/Tell-Me-Im-Wrong,-Please-(Angular-and-Async)/protractor.jpg
---

I'll try and keep this quick. I'm updating one of my [Pluralsight](https://shawnl.ink/psauthor) courses and I am curious if what I'm thinking makes any sense.

I've been teaching the same approach as most of the other Angular instructors, but I feel like it's not as clear as it should be. Let's look at a simple example of making a network call and showing state. I have a simple view that shows two strings. I am using a central service for calling the remote server with HttpClient. Here's the call using Reactive:

```
  loadReactive(): Observable<boolean> {
    return this.http.get<ResultData>(this.URL)
      .pipe(
        map((data: ResultData) => {
          this.reactiveResult = data.title;
          return true;
        }));
  }

```

In the component, I can just subscribe to the change:

```
  onLoadReactive() {
    this.store.loadReactive()
      .subscribe(s => console.log("Success"),
        e => console.log("Failure"));
  }

```

All the nesting makes this hard to read in my opinion. I am thinking of showing the async/await pattern instead. Here would be the call in the service:

```
  async loadAsync(): Promise<boolean> {

    const result = await this.http.get<ResultData>(this.URL)
      .toPromise();

    this.asyncResult = result.title;

    return true;
  }

```

Longer but clearer I think. And in the component:

```
  async onLoadAsync() {
    try {
      if (await this.store.loadAsync()) {
        console.log("Sucess");
      } else {
        console.log("Failure")
      }
    } catch {
      console.log("Failure")
    }
  }

```

I plan on teaching both, but is Angular moving away from the subscribe model to async/await now that it exists or are people sticking with it?

Please help me tell the right story to new Angular users!

[![Creative Commons License](http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/3.0/)

 This work by [Shawn Wildermuth](http://wildermuth.com) is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/3.0/).  
 Based on a work at [wildermuth.com](http://wildermuth.com).

* * *

If you liked this article, see Shawn's courses on [Pluralsight](http://shawnw.me/pscourses).
 ![](http://feeds.feedburner.com/~r/ShawnWildermuth/~4/WCRyLLFiWM4)
Whoa there Bubba!!!!
Tags: javascript, fullstack, juniordev, noob
Published: 2021-02-01 18:46:25

# Davoris Cowell

### About Me

Hi! I'm from Georgia. I've been coding for four years now but there's never too much knowledge!

_Dublin, GA 31021._


## **Weeks 2 & 3**


### _Functions & Object Oriented Programming_

What we learned these past two weeks have been challenging, but yet very productive. We've been going over objects, arrays, and functions. 

**Functions** are one of the fundamental building blocks in _JavaScript_. A function in _JavaScript_ is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it. Functions can be declared or expressed. The difference between the two id when and where they are invoked. We've also discussed how a function can be called in another function, which is called closures. _Closures_ are the nesting of functions, and grants the inner function full access to all the variables and functions defined inside the outer function.


**Object Oriented Programming** or _**OOP**_ is based on the concept of "objects", which can contain data and code: attributes or properties, and code, in the form of methods. Objects can contain related data and code, which represent information about the thing you are trying to model, and functionality or behavior that you want it to have. Object data can be encapsulated in a namespace making it easy to structure and access. 


_Special thanks to the MDN for helping me understand these definitions more thoroughly!!_
Recover 7zip password 
Published: 2021-02-01 18:34:55

Simply, download SysInpire 7z password recovery software that is safely recover 7zip password without damage any data. This software made with the best technology and allows to re-open lock 7z file password by applying three methods brute force attack, mask attack, and dictionary attack. This software is 100%  recover alphabetic, numeric, symbolic, and special character password in few second .it is a free DEMO offered to all users and trail to the working process of the software.

Get the details - https://www.sysinspire.com/7z-password-recovery-software/
Blogruary: 28 days of posting
Published: 2021-02-01 18:32:49

I suck at blogging. Presently. I *presently* suck at blogging. I read somewhere that you should qualify negative statements with "presently." So, yeah, I presently suck at blogging, but I would love to get better at it.

I've tried three or four times to start blogging, and I always fizzle out after a handful of posts. Why? I *presently* (ah, see what I did there?) struggle with finding value in what I have to say. Of course, that's a pretty poor excuse to not write.

The thing is, I love the feeling I get when I help other people learn something. I get to do that every day at my job as a developer at The Container Store (it's where space comes from; look it up). I've also heard [teaching others](https://fs.blog/2012/04/feynman-technique/) is a great way to learn, and learning is like one of my top favorite seven things.

With that in mind, this month I have resolved to write 28 blog posts, including this one. I'm calling it Blogruary because I'm a stickler for naming things. The first 'r' is silent, in case you're wondering. 

You may ask, *Ryan, why February?* Well, it's the shortest month of the year and I feel more comfortable doing 28 posts versus 30 or 31 and mind your own business, okay? Geez!

I'm not going to lie. Going from three blog posts a year to 28 in a month is going to be tough. I'm setting some ground rules to make sure I accomplish my goal. First drafts should take no longer than fifteen minutes to write. Editing should not exceed one hour. And to keep me honest, I will share these blog posts with all my followers on Twitter (hi mom!) as well as on my [dev.to](http://dev.to) account.

The subject matter may be a bit random at times. I'm still trying to figure out what my *thing* is. But the end goal is to become a better communicator and help others in the process. I hope you come along for the ride.
Should I train on CTF or Bug Bounty ?
Tags: security
Published: 2021-02-01 17:07:26

Computer security is of interest to you, but you don't know where to start.

You hear about CTF, Bug Bounty. We tell you it's great to start training.


I'll explain the differences between the two and where to start for it to be the most effective. There is a lot to learn with CTFs and Bug Bounties.

It's very different, but the things to learn from it are amazing


You will know the best platforms and you will be able to make an informed choice.


Enjoy

---

{% youtube bls1rH--u6k %}
<figure>
  <figcaption>Video with French Audio & English Subtitles</figcaption>
</figure>

---

*If you like this content, push the like button, that helps spread the message.* 👍🏼
*If you think it can be useful to anyone in your network, share it.* 📨

---

Video produced by [Wild & Secure](https://wildnsecure.com), your consulting firm to all things security and real estate.
If you want to receive weekly quality content about security, subscribe to our newsletter [on our website](https://wildnsecure.com/contact).
Python Prowess: Day 1
Tags: python, codenewbie
Published: 2021-02-01 18:26:35

I am starting my python journey today. I'll be sharing my progress and code snippets along with anything interesting I get to know! 
This is Python 3!

*Basic Input-Output Snippet*

```
>>> input()
Hello world! 
```
Output- Hello World
```
>>> print("Hello" * 2)
```
Output- Hello Hello
```
>>> print(1,2,3)
```
Output- 1 2 3

🌼Please comment if you have any suggestions or encouraging words.🌼
Responsive card using CSS
Tags: html, css, effects, csseffects
Published: 2021-02-01 18:21:04

The responsive card is made with HTML and CSS. It is very useful to show blog posts and it has hover effects.

<a rel="nofollow" href="https://codewithbishal.com/example/how-to-create-responsive-column-cards">View it on our website(Responive cards)</a>
View More :
<ul>
<li><a rel="nofollow" href="https://codewithbishal.com/example/how-to-create-an-accordion-with-html-css-and-javascript">How to create Accordion using JavaScript</a></li>
<li><a rel="nofollow" href="https://codewithbishal.com/example/css-button-glow-effect">Glowing Buttons on hover</a></li>
</ul>
At first, on our webpage, there is a preview of our responsive cards, then there are a few QNA and an overview of the blog. There is a button to copy and Download the codes (HTML and CSS). You can also try it on our website.

You can view and copy and download the source code files through the link given below. <a rel="nofollow" href="https://codewithbishal.com/example/how-to-create-responsive-column-cards">View and Download Source Code</a>
Solving a differential Calculus problem with Python
Published: 2021-02-01 18:16:10


## Problem Statement
A mixing tank with a volume of 10 liters contains a salt solution at a concentration of 120 g/L. If salt-free water is continuously fed into this tank at the rate of 15 L/h, and the volume is maintained constant by continuously overﬂowing the excess ﬂuid, what will be the concentration of salt after 90 min.

## Solution

```python
def salt_in_g(volume, concentration):
    grams = volume * concentration
    return grams
 
def in_flow(water_in_l, delta_t):
    volume_add = water_in_l_h * delta_t
    return volume_add
 
volume = 10
concentration = 120
total_grams = salt_in_g(10, 120)
 
water_in_l_h = 15
delta_t = 1 / 216000
 
for _ in range(1, 90*60*60):
  gram_out = salt_in_g(in_flow(water_in_l_h, delta_t), concentration)
  total_grams = total_grams - gram_out
  concentration = total_grams / volume
 
print(concentration)
```
- Run it in your browser [here](https://repl.it/talk/share/Solving-calculus-problem-with-Python/118827)