teleren/devto huggingface dataset:
YAML for DevOps.
Tags: yaml, beginners
Published: 2022-05-08 07:26:48

YAML has become very popular for writing configuration files. It has become a widely used format for writing configurations for many different DevOps tools and applications e.g. Docker, Kubernetes, Ansible, Prometheus.

For that reason while utilizing this instruments, understanding the subtleties of YAML language structure and its primary concepts is significant.

YAML is a data serialization language. Just like XML and JSON.

## What is a Serialization language?
With a serialization language, applications written in different languages and with different technologies can exchange data using a common agreed upon or standard format. The most standard formats are YAML, JSON, and XML.

YAML actually stands for YAML Ain't Markup Language. 

YAML files can be created with the extension:
.yaml
.yml

They are both the same. 

## YAML Format compared to others.
YAML has grown in popularity over the past years due to:
Because it is super human readable and intuitive, it is perfect for writing configuration files for all those recent DevOps tools like Docker, Kubernetes, etc.

We'll consider this example to show you how YAML, XML, and JSON formats compare. Here's how YAML looks:


![YAML format sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ogwmxrk8byy85kvxgvk.png)

It's straightforward, and very clean.

Here is the same data in XML:


![XML format sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p693vuxzq75qkpb4pm77.png)

Here is the same code in JSON format:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtnlz4mcgqd6yboe77cl.png)

The YAML encoding is a superset of the JSON encoding. Any valid JSON file can be encoded in YAML.

XML and JSON data structures are defined using special characters, as you have seen.

In XML, you have text in angle brackets <> while in JSON you have text in curly brackets {}. In YAML, you do not have those special characters.

How are data structures defined in YAML? It is defined through line separations and  spaces with indentation. 

That's why you can space and indent in JSON and XML, but not in YAML.


![YAML format error sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37j5oo996zkuupxm1wfq.png)

See you soon.
VSCODE Installation Guide🏆
Tags: vscode, productivity, performance, microsoft
Published: 2022-05-08 07:16:07

Hey everybody, this is _Imran Haider_. Today, in this post I will talk about the downloading and installation of the VS Code - the best IDE for programmers/coders.
So, let’s start.

Go to your browser and search for **Visual Studio Code Download**.

![Visual Studio Code Search](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3hxp8dg5peqamrlupz1.png)

Click on this first link to download Visual Studio Code. 


![Visual Studio Website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdymco8go0aozwqd82kk.png)

You can also download from this link👇:
https://code.visualstudio.com/download

Click on this link and it will ask for saving location of exe file. Choose your file location and then click save. For Windows, choose first one. For Linux, choose second one and for MAC, choose third one.


![Downloading Visual Studio Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fh4fa1tz879tu9nhk7h5.png)

After Downloading, you will see Visual Studio Code downloaded in the bottom left corner of Chrome window.


![VS Code Downloaded](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0wm95u64a332qay90z9.png)

Now, we will move to the installation process. Run the setup. You will see this license agreement page when the setup will launch.
Follow these steps.

![Installation Process 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzqobktvcvw5qtu4mz7u.png)


![Installation Process 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbdaxy0s6ceczhg4lmzs.png)

![Installation Process 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iovlbh72lvxuy1bdq6va.png)

Make sure to check these check boxes.

![Installation Process 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4zk30nxi3i7xx2cfx3t.png)

![Installation Process 5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqd1t8xcxes867sr1tbp.png)

![Installation Process 6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mud4ylkacliorlq3rpvi.png)

![Installation Completed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tbulsrx87du7g43o9v0o.png)

Congrats!🏆 You have successfully installed Visual Studio Code.

Like | Share | Leave A Comment and don't forget to follow for us amazing posts.

Connect with us 🏆:
LinkedIn: https://www.linkedin.com/in/imran-haider-swl/
Instagram: https://www.instagram.com/imran.programmer45/
GitHub: https://github.com/Imranprogrammer9
Working on a Project restlessly
Tags: appwritehack, appwrite
Published: 2022-05-08 06:54:31


**Working on a Project for Appwrite hackathon**

Hey, I'm a student , I started working on a project for this hackathon for more than 20days along with my exams and other stuff. I was able to learn quite a lot of things while creating this project.


Here is the simple logo which I created for this project


**VisualBox**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mpp7ozxgt5i4mc2ne81p.png)


Any guess what it would be?
Appwrite Community Report #5
Published: 2022-05-08 06:46:30

Hello everyone! Greetings from team Appwrite 👋

We are back with our weekly community report, to share with you all what Appwrite has been doing! 🤩

Here’s a sneak peek! 👀

**TLDR;** This time around we have OSS Fund Announcement, Appwrite x DEV Hackathon progress updates, bug fixes, new features, 30 days of Appwrite, and a lot more! Stay tuned till the end 😉

---
## 📢  What’s new

- Appwrite just announced their community initiative “OSS Fund” worth $50,000 to support open-source project maintainers! 😮
We cannot wait to see your amazing projects! 🤩
{% embed https://appwrite.io/oss-fund %}


- Appwrite hack ends soon, make sure you drop your solutions before the deadline ⏰
{% embed https://dev.to/devteam/announcing-the-appwrite-hackathon-on-dev-1oc0 %}

_P.S - Exclusive swags await every participant!_ 😉 

---
## ✅ Issues solved

We hear your feedback and try to implement them every week!  Here are the issues we’ve fixed this week:

- Fixed the aggregation of the search field when updating name and email for users
🔗[Link to PR]
(https://github.com/appwrite/appwrite/pull/3152)

- Fixed deploy function JSON parse error
🔗[Link to PR](https://github.com/appwrite/sdk-generator/pull/427)

---

## ⚒️ What we’re currently working on

- Improvement of authorization skip method
- Updates on Utopia/database with MongoDB adapter
- Work-in-progress with Hashing API, that will help you import/export users to/from other platforms effortlessly.
- Fixing type of ‘listAttributes’ for Deno
- Python function create_deployment now accepts boolean property 
- Users invited to the team now appear in users list

---
## 🗣 Discussions
- Let’s talk about Appwrite’s permissions
🔗[Join the GitHub discussion here](https://github.com/appwrite/appwrite/discussions/2689)

- Multiple function improvements
🔗[Join the GitHub discussion here](https://github.com/appwrite/appwrite/discussions/2985)

---

## 📘 Resources
- [Learn how to write unit tests for Appwrite SDK on Flutter with Mockito by Aditya Rohman.]
(https://betterprogramming.pub/write-unit-test-for-appwrite-sdk-on-flutter-with-mockito-e0c3b403199e)

- If you have built something with Appwrite or wrote a blog or made a fan-art, make sure you drop a PR to: https://github.com/appwrite/awesome-appwrite

- 30 days of Appwrite is now updated, have you checked them out already? {% embed https://30days.appwrite.io/ %}
We are awaiting to see what you build, be sure to drop them [here](https://github.com/appwrite/awesome-appwrite).
if-else and else-if
Published: 2022-05-08 06:03:28

##if-else
- bir nechta shartlar berilganda ishlatiladi.

```cpp
#include <iostream>

using namespace std;

int main()
{  
  int baho;
  cin >> baho;
  if (baho >= 90)
  {
    cout << "A" << endl;
  }
  else
  {
    if (baho > 80)
    {
    cout << "B" << endl;
    }
    else
    {
      if (baho > 70)
      {
      cout << "C" << endl;
      }
      else
      {
        if (baho > 60)
        {
        cout << "D" << endl;
        }
        else
        {
        cout << "F" << endl;
        }
      }
    }
  }
       
  return 0 ;
}
```

- agar if yoki else dan so'ng amalga oshirilishi kerak bo'lgan buyruq bitta bo'lsa {} qo'yish shart emas.

```cpp
#include <iostream>

using namespace std;

int main()
{  
  int baho;
  cin >> baho;
  
  if (baho >= 90)
  cout << "A" << endl;
  else
    if (baho > 80)
    cout << "B" << endl;
    else
      if (baho > 70)
      cout << "C" << endl;
      else
        if (baho > 60)
        cout << "D" << endl;
        else
        cout << "F" << endl;
        
  return 0 ;
}
```

## else-if
- readability ni oshirish uchun else dan so'ng keladigan if ni bir qatorda yozsa else-if hosil bo'ladi.

```cpp
#include <iostream>

using namespace std;

int main()
{  
  int baho;
  cin >> baho;
  
  if (baho >= 90)
  cout << "A" << endl;
  else if (baho > 80)
  cout << "B" << endl;
  else if (baho > 70)
  cout << "C" << endl;
  else if (baho > 60)
  cout << "D" << endl;
  else
  cout << "F" << endl;
        
  return 0 ;
}
```
DMARC Failure Reports (Forensic Reports) Explained.
Tags: dmarc, forensic
Published: 2022-05-08 04:21:07


![DMARC Failure Reports (Forensic Reports) Explained](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n0zl553s593q12zq6e3q.jpeg)
#### What is a DMARC Failure Report?

DMARC failure reports are generated and sent almost immediately by the mailbox provider after an email fails DMARC authentication. It provides detailed information about the email message so that the domain administrator can use it to investigate into what caused the email to fail authentication and track down the sender.

DMARC failure reports were previously known as DMARC forensic reports.

#### How to Read a DMARC Failure Report?

The fields are present in a typical DMARC failure report:
* recipient email address: the email address the original message was intended for;
* authentication results: both SPF and DKIM;
* received time;
* DKIM signature;
* host that sent the email;
* email subject;
* email message ID;
* other email headers, including custom headers.

Here is an example DMARC failure report:

![example DMARC failure report](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3f6xw82dw60nm221nr0.png)

#### How to Receive DMARC Failure Reports?

In order to receive DMARC failure reports, you need to set up the ruf tag in your DMARC record.

Check out this post on the details: [How to Receive DMARC Reports](https://dmarcly.com/blog/how-to-receive-dmarc-reports-dmarc-reporting-set-up-guide).

#### DMARC Aggregate Reports VS DMARC Failure Reports

DMARC aggregate reports and DMARC failure reports are the two types of reports supported in DMARC. They serve different purposes and differ in multiple aspects.

Here is a side-by-side comparison of DMARC aggregate reports and DMARC failure reports:
* an aggregate report provides aggregate data on a group of emails, while a failure report provides details of an individual email;
* to receive aggregate reports, set up the rua tag; to receive failure reports, set up the ruf tag;
* aggregate reports are not real-time: they are sent everyday by default; failure reports are sent almost immediately after the failures;
* aggregate reports are in XML format, while failure reports are in plain text;
* aggregate reports don't contain personally identifiable information (PII) like recipient email address; failure reports do contain PII;
* aggregate reports are supported in all DMARC-compliant mailbox providers, while failure reports are supported in only a handful of mailbox providers.

Original post: [DMARC Failure Reports (Forensic Reports) Explained](https://dmarcly.com/blog/dmarc-failure-reports-forensic-reports-explained)
Favicons in root with Eleventy
Tags: eleventy, favicon, indieweb
Published: 2022-05-08 05:16:38

---
title: Favicons in root with Eleventy
published: true
date: 2022-05-08 03:34:00 UTC
tags: eleventy, favicon, indieweb
cover_image: https://generative-placeholders.glitch.me/image?width=1000&height=420
canonical_url: https://denmchenry.com/posts/favicons/
---

It occured to me after fiddling around with nonsense and making silly mistakes all day that the cleanest way to keep favicon files together and away from my main image folder would be to put them into their own directory and pass the contents of that directory to root.

Whenever I decide to change my favicon, I can clear out the local directory and replace its contents with the new files, and won't have to worry about things like losing track of files in my image directory or cluttering the main directory in my local repo.

You choose which directories and files to pass through as is within the `module.exports` in your `eleventy.js` file. You likely already have a few lines like this for things like the "img" and "css" directories.

Here's a quick and dirty run down of how they work.

Examples:

1. Pass the /img/ directory through:   
 `eleventyConfig.addPassthroughCopy("img")`
2. Pass a specific file through:   
 `eleventyConfig.addPassthroughCopy("img/favicon.ico")`
3. Pass something through to a different location:   
 `eleventyConfig.addPassthroughCopy({ "favicon" : "/" } );`

This last example takes an object rather than a string and passes the contents of the source directory through to a different destination directory, in this case to root. The "favicon" directory will not appear on the live site, but its contents will be copied to the root directory, which is exactly what I wanted.
[Almost Netflix clone]
Tags: appwritehack, javascript
Published: 2022-05-08 04:10:02

## Dev handle: soham0047


### Overview of My Submission
Build a almost netflix clone with using data imported from appwrite


### Submission Category: 
 Wacky Wildcards


### Link to Code

[Netflix Clone](https://github.com/Soham-0047/almost-netflix-project-setup-appwrite.git)



 # Screenshots/demo videos are encouraged!

![sc1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/im0pri2fqxcyd9jejw4c.png)


![sc2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vebpwbda1b1brju089s7.png)

![sc3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82c00f1chxwhncaq6u6m.png)

![Main theme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv2xngcm9j1cx807ylis.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2hhxdak62pjaartmw1a.jpeg)
Can I Set Up DMARC without DKIM?
Published: 2022-05-08 04:04:57

![Set Up DMARC without DKIM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywyriils573vcauvxgay.png)
Yes, you can set up DMARC without DKIM and have only DMARC and SPF in the equation. In this case, DKIM check always fails and DMARC authentication result is up to SPF check and SPF identifier alignment, which still somewhat works but is less than optimal.

#### DMARC authentication equation

The DMARC authentication result hinges on the SPF authentication result and the DKIM authentication result. An email passes DMARC authentication when ANY of the following is true:

* it passes SPF authentication and has SPF identifier alignment;
* it passes DKIM authentication and has DKIM identifier alignment.

To put it into a simple equation:
> DMARC authentication pass = (SPF authentication pass AND SPF identifier alignment) OR (DKIM authentication pass AND DKIM identifier alignment)

#### DMARC without DKIM

Now that DKIM is missing, the equation becomes:
> DMARC authentication pass = SPF authentication pass AND SPF identifier alignment

In other words, SPF authentication result and the existence of SPF identifier alignment completely determine the outcome of DMARC authentication.

#### When SPF authentication fails...

All is good since SPF alone can authenticate legitimate emails.

But wait. What if SPF authentication fails?

For a direct email flow, a legitimate email coming from an authorized outgoing server gets authenticated by SPF. However, if an email is forwarded like in the email list scenario, SPF authentication can fail since the intermediate server's IP address is not on the SPF IP list.

When this happens, and if no DKIM is set up, the legitimate email fails DMARC authentication since it fails both SPF and DKIM authentication, in which case, it's a false negative.

#### A full DMARC implementation is your best bet

As discussed above, having DKIM set up in your DMARC implementation increases the possibility of legitimate emails passing DMARC authentication.

Since most email services allow you to set up both SPF and DKIM, you definitely should set up DKIM alongside SPF.

#### Does DMARC require DKIM?

No. DKIM is not required by DMARC. However, setting up DKIM keeps false negatives in DMARC authentication at the minimum.

Original post: [Can I Set Up DMARC without DKIM?](https://dmarcly.com/blog/can-i-set-up-dmarc-without-dkim)
傳送 物件/陣列 到 FORMDATA
Tags: javascript, formdata, axios
Published: 2022-05-08 03:31:48

JS 自從有了打包工具之後，很多工具造福不少開發者，以往要送個 AJAX 到後端，大多都是一個頁面處理一個 method

框架化後，每個程式碼開始有了 物件化、封裝方式來做，現在大多都用 axios 來送 AJAX

但是遇到一個問題就是送檔案的時候，需要使用到 FormData 的物類別物件。

但是整個像後端送的程式碼都封裝起來了，要針對一個檔案上傳的方法，做出額外處理，當檔案上傳處理頁面多了之後維護除錯方法就有點麻煩。

所以比較好的方式還是修改 API 送出前，先把物件轉換好判定是否有 `File` 類型，然後轉換成 `FormData` 就可以一勞永逸

問題來了，以往直接用 axios 傳送到後端，一個 object 就可以搞定 value is array 的問題，開發者似乎不用煩惱太多後續處理問題

頂多就是遇到 `GET` 網址參數需要轉換純文字的狀態，但也也只需要一個 qs 套件就可以解決解決

但如果採用 `FormData` 這個類型的時候，整個 object 就必須自己處理，如果遇到傳送一個陣列的時候，就必須額外針對 key = array 的狀態去處理，然後如果 value = array 也是很麻煩的事情。

舉個例子，往後端送 `array1 = [1,2,3]` ，如果是 axios 就可以直接送，如果是送 FormData 就必須處理成

```
array1[]:1;
array1[]:2;
array1[]:3;
```

這點可以利用 PostMan 來做測試看看後端可以吃到怎樣結構的陣列

這邊原本的想法是，把物件的每個 value 歷遍，只要 `value instanceof File` 就成立條件，把 key 轉換成陣列

不過找了很多遞迴解法，都沒有 qs 轉換 陣列來的快速有效，最終還是爬了一下 qs 的實際操作用法，

```javascript
  const files = new Map()
  const queryString = qs.stringify(data, {
    arrayFormat: 'brackets',
    encode: false,
    filter: (name, value) => {
      if (value instanceof File) {
        let id = lodash.uniqueId('__FILE__.')
        files.set(id, value)
        return id
      } else {
        return value
      }
    }
  })
```

利用 [qs](https://github.com/ljharb/qs) 的 filter method 把所有 value 檔案移到暫存變數 files 裡面，利用 lodash 取得目前唯一的數值，將原先的 data (object) 的 File 類型 value，全部轉換成 file 的 uniqueId，最終就可以得到一串處理過的字串，快速的將 物件陣列轉換成字串

```
a=__FILE__.1&b[a]=1&b[b]=2 ...
```

只要有了這個純字串的東西，要拆解成陣列 + 物件就方便多拉，拆完之後遇到 __FILE__ 的 value 記得去把 files 裡面的檔案給領回來，這樣塞入 `FormData` 就可以解決陣列 key 或是 value = array 的問題了

完整範例放在 [codepen.io](https://codepen.io/mesak/pen/xxpvLGe)
Turtle Event Lisener
Tags: python, beginners, tutorial, productivity
Published: 2022-05-08 03:03:57


###today notes(6/05/2022)
1.turtle event lisener
<code>
turtle.lisen()
turtle.onkey(fun #create a function with parameter,key #set a key in alphabet & icons)
2.higher oder funtion
one funtion works with another funtion 
eg :def calculation(n1, n2, funtion)
	return funtion(n1, n2)
    

    calculation(1, 5, add)
add is funtion 

#python commonly use but other language not
3.
Conversational AI in VRChat 2
Tags: ai, vr, vrchat
Published: 2022-05-08 02:10:09

## What's this?

- Introduction of a voicebot that implemented conversational AI in VRChat
  - https://youtu.be/j9L51pASeiQ


## System

- ASR: googletrans
  - https://pypi.org/project/googletrans/
- Text Generation: Rinna (1.3B-parameter Japanese GPT model)
  - https://huggingface.co/rinna/japanese-gpt-1b
- TTS: tyc-talksoft
  - https://shirowanisan.com/tyc-talksoft

- Sound Pipeline
  - application -> speaker -> dialog.py -> mic -> application
  - Direct loop also exists.. (application -> speaker -> mic -> application)

- (TBD) Release the scripts in GitHub
  - Need to clean the codes and write documents..


## Prerequisites

- Ubuntu 18.04.5 LTS
- Voice chat application (VRChat for example)


## Setup

`
$ sudo apt install portaudio19-dev pavucontrol python-xlib scrot
$ git clone https://github.com/Lunran/sts.git
$ cd sts
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install --upgrade pip
$ pip install -r requirements.txt
`


## Usage

- Run VRChat
  - Open "Settings", "Audio Volume"
    - Mute "UI/Menu", "World" and "Avatars" 
- Run the script
  - refer to "$ python dialog.py -h" for details
Zkpad project - zk-rollups
Tags: tutorial
Published: 2022-05-08 02:00:22

If you are someone interested in cryptor. So today I will introduce you to a potential project that is [zkpad](https://zkpad.io/).

Starknet is a potential network when it has raised more than 100m of capital and has a TPS > 100,000 so it is a very potential network in the future. There will be a lot of projects that will launch on it and then those projects will need capital when they launch. So where do they raise capital on the Starknet network, that's what Zkpad is trying to do, building a safe and decentralized fundraising on Starknet.

zkpad creates a fundraising venue for projects at the start of their launch on the starknet platform. zkpad ensures general security and decentralization for retail investors when investing in projects launched on zkpad. Zkpad also has full roadmap plans as well as tokenomics. Their team has also appeared so it will be safe.

Zkpad also makes it easier for people to access zk-rollup technology. This is a technology that helps the etherium network to scale. You can learn more here [Zk-Rollups](https://wp.zkpad.io/introduction/a-look-at-zk-rollups).

Here are their tokennomics:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ibx14i8p7oqklw1kah7.png)

17.5% of the tokens will be sold at the launch of the project, with 5% allocated to the Seed phase, 15% to the private sale, and finally 10% for the public sale.

And here is the roadmap:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6bhkzir3wzbxo5sswkv.png)

You can learn more about Zkpad on the homepage link: https://zkpad.io/
Review Pull Requests with git worktrees
Tags: git
Published: 2022-05-08 01:40:07

---
canonical_url: https://waylonwalker.com/til/review-pull-requests-with-git-worktrees/
cover_image: https://images.waylonwalker.com/til/review-pull-requests-with-git-worktrees.png
published: true
tags:
- git
title: Review Pull Requests with git worktrees
---

Sometimes you get a PR on a project, but cannot review it without wrecking your current working setup.  This might be because it needs to be compiled, or a new set of requirements.  Git worktrees is a great way to chekout the remote branch in a completely separate directory to avoid changing any files in your current project.

``` bash
# pattern
# git worktree add -b <branch-name> <PATH> <remote>/<branch-name>
git worktree add -b fix-aws-service-cnsn /tmp/project origin/fix-aws-service-cnsn
```

This will create a new directory `/tmp/project` that you can review the branch
`fix-aws-service-cnsn` from the remote `origin`.  If you have setup different remotes locally you can check for the name of it with `git remote -v`
Javascript Animation 19
Tags: javascript, webdev, css
Published: 2022-05-08 01:15:25

Whatever you do on Javascript, you have to understand the roots and focus on the basic knowledge.
# 1. Generative Art  
{% codepen https://codepen.io/php-hacker/pen/wvryRPz %}
# 2. CSS Spark   
{% codepen https://codepen.io/php-hacker/pen/yLzvGzz %}
# 3. Halloween Monster   
{% codepen https://codepen.io/php-hacker/pen/gOGvZxp %}
# 4. Text Shadow 
{% codepen https://codepen.io/php-hacker/pen/OJxQrpy %}
# 5. Eyeball Animation     
{% codepen https://codepen.io/php-hacker/pen/XWeZodZ %}