teleren/devto huggingface dataset:
Day 346 : Radio Waves
Tags: hiphop, code, coding, lifelongdev
Published: 2021-04-15 22:47:12

_liner notes_:
- Professional : Not too many things happening at work. Had a company wide meeting and hangout session with some folks afterwards. Other than that, just worked on my blog post.

- Personal : So, last night I worked out what different parts of the new side project would do. I also came up with a pretty good URL for the project. Decided I would sleep on it just to make sure I will still like it in the morning. Also watched an episode of "Dr. Stone" and went through tracks for the radio show.

![View inside the lush green Abeokuta Forest, Nigeria](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yf4hh71j6d92qfb9kcb7.jpg)

So, I woke up and still like the URL for the project and bought it. There is a part that I'll be reusing from another project like a year or 2 ago and was thinking I would need to turn it into a Web Component just in case I want to use it in a future project. Turns out that I already made it a Web Component. haha Great job, past Dwane! haha. Going to finish up my blog post so that I can finish up early Friday. After that, I'll probably watch another episode of "Dr. Stone", set up for the new side project and go through tracks for the radio waves takeover on Saturday.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube iHtyERazHKU %}
Fix "target not found: ttf-unifont" not found error when install fresh Manjaro linux
Published: 2021-04-15 22:27:10

Almost all people get this error when they install a fresh Manjaro linux distro.
I faced this issue and i spend 3 to 4 hour to fixed that.
Here is a quick solution

Open terminal write:
```bash
sudo pacman-key --init
```
after that open gpg.conf and edit 
```bash
sudo nano /etc/pacman.d/gnupg/gpg.conf
```

change keyserver value 
```bash
keyserver hkp://pgp.mit.edu
```

and save and reload linux and ttf-unifont issue will fixed
JavaScript Array find() Method
Tags: javascript, beginners
Published: 2021-04-15 22:26:17

The **find ()** method returns the value of the first element of the array that satisfies the test function provided. Otherwise, the undefined value is returned.

```js
const users = [
    {
        user_id: '1234',
        first_name: 'Francisco',
        last_name: 'Inoque',
        email: 'jaimeinoque20@gmail.com',
        username: '@franciscoinoque'
    },

    {
        user_id: '5678',
        first_name: 'Jose',
        last_name: 'David',
        email: 'josedavid@gmail.com',
        username: '@josedavid'
    },
     
    {
        user_id: '9101',
        first_name: 'Peter',
        last_name: 'Jordan',
        email: 'peterjordan@gmail.com',
        username: '@peterjordan'
    },

    {
        user_id: '1112',
        first_name: 'Clifton',
        last_name: 'Urik',
        email: 'cliftonurik@gmail.com',
        username: '@cliftonurik'
    }
]

let error_msg = {
     error: 'User not found'
 }
function findUserByUserID(user_id)
{
    const user = users.find(user => user.user_id === user_id);

    if (user)
    {
        return user;
    }  else
     {
        return error_msg
    }
}

const getUser = findUserByUserID('1112')
console.log(getUser)
```
How to Setup Laravel Database Read & Write Connections
Tags: laravel, database, readandwriteconnection
Published: 2021-04-15 22:13:15

There are times when your application is at a stage where one database for read & write is not enough and you might want to use separate databases for read & write. Luckily Laravel provides you with the flexibility to setup a separate database connection for read & write.

Let's say you have two MySQL databases with same credentials and you want to setup one for read and other for write. In you `config/database.php` file change the `mysql` configuration as follow:

```php
'mysql' => [
    'read' => [
        'host' => '192.168.1.1',
    ],
    'write' => [
        'host' => '196.168.1.2',
    ],
    'sticky' => true,
    'driver' => 'mysql',
    'database' => 'database_name',
    'username' => 'root',
    'password' => 'secret',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
],
```

Let's say you want to setup two read databases, the configuration will be as follow:

```php
'mysql' => [
    'read' => [
        'host' => [
            '192.168.1.1',
            '192.168.1.2',
        ],
    ],
    'write' => [
        'host' => [
            '196.168.1.3',
        ],
    ],
    'sticky' => true,
    'driver' => 'mysql',
    'database' => 'database_name',
    'username' => 'root',
    'password' => 'secret',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
],
```

Now, let's assume you have two different MySQL servers with different credentials then the configuration will be as follow:

```php
'mysql' => [
    'read' => [
        'host' => '192.168.1.1',
        'username' => 'root',
        'password' => 'secret',
        'database' => 'database_name',
    ],
    'write' => [
        'host' => '192.168.1.2',
        'username' => 'root',
        'password' => 'secret',
        'database' => 'database_name',
    ],
    'sticky' => true,
    'driver' => 'mysql',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
],
```

Now, if you want to setup two read databases with different credentials and the configuration will be as follow:

```php
'mysql' => [
    'read' => [
        [
            'host' => '192.168.1.1',
            'username' => 'root',
            'password' => 'secret',
            'database' => 'database_name',
         ],
         [
            'host' => '192.168.1.2',
            'username' => 'root',
            'password' => 'secret',
            'database' => 'database_name',
         ],
    ],
    'write' => [
        'host' => '192.168.1.2',
        'username' => 'root',
        'password' => 'secret',
        'database' => 'database_name',
    ],
    'sticky' => true,
    'driver' => 'mysql',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
],
```

For more configuration and options details you can refer to [Laravel database connections](https://laravel.com/docs/7.x/database#read-and-write-connections).
Using Shoelace with Vite Rails
Tags: rails, ruby, webdev, vite
Published: 2021-04-15 22:02:11

## Purpose

To provide a reusable reference for myself to add Shoelace to a ViteRails project.

## Setup ViteRails

I will not cover this here. Instead go check out the ViteRails documentation here: https://vite-ruby.netlify.app/guide/
And come back once youre all setup!

## Install Packages

1.) Install [Shoelace](https://shoelace.style/) and [rollup-plugin-copy](https://www.npmjs.com/package/rollup-plugin-copy) via yarn

`yarn install @shoelace-style/shoelace rollup-plugin-copy`

## Setup CSS entrypoint file

When using vite I usually have a file called:

`app/frontend/entrypoints/application.css`

This is my entrypoint CSS file.

Heres what it should look like:

```css
/* app/frontend/entrypoints/application.css */
@import '@shoelace-style/shoelace/dist/shoelace/themes/base.css';

/* if you want to use the dark theme, uncomment this */
/* @import '@shoelace-style/shoelace/dist/shoelace/themes/dark.css'; */
```

## Setup JS entrypoint file

In Vite, you will also have a `app/frontend/entrypoints/application.js` file. In this file, add the following lines:

```js
// app/frontend/entrypoints/application.js

import './application.css'

// import shoelace components here

import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js'

const mode = import.meta.env.MODE || "development"

const paths = {
  production: "",
  development: "-dev",
  test: "-test"
}

let rootUrl = `/vite${paths[mode]}`
setBasePath(rootUrl)
```

## Setup `vite.config.ts`

Finally, setup your `vite.config.ts` like so:

```js
// vite.config.ts

import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
import * as path from "path"
import copy from 'rollup-plugin-copy';

const mode = process.env.NODE_ENV || "development"

const paths = {
  production: ``,
  development: `-dev`,
  test: `-test`
}
const vitePath = `public/vite${paths[mode]}/assets`

export default defineConfig({
  build: {
    rollupOptions: {
      plugins: [
        copy({
          targets: [
            {
              src: path.resolve(__dirname, 'node_modules/@shoelace-style/shoelace/dist/assets/icons'),
              dest: path.resolve(__dirname, vitePath)
            }
          ],
          // https://github.com/vitejs/vite/issues/1231
          hook: 'writeBundle'
        })
      ]
    }
  },
  plugins: [
    RubyPlugin(),
  ],
})
```

and BAM! youre good to go!

Sorry this was so brief and I don't have any examples to share, this was a quick down and dirty that I may revise in the future.
Hello
Tags: firstpost, blockchain, gamedev, github
Published: 2021-04-15 21:58:23

Hello, I'm a new developer teaching myself some new coding skills. I want to start doing a little game developing and playing games to actually make money in the competitive field.

I'm also creating a directory of blockchain projects, useful tools, blockchain games, and development knowledge. If you have a project or link that you think I'd be interested in, please don't hesitate to contact me.
FontAwesome vs. emojis
Published: 2021-04-15 21:53:54

##FontAwesome
**Pros:**
✔️ Great variety of iconic symbols
✔️ Web design style
**Cons:**
❌ Large file size, slows page loading
  
  
##Emojis
**Pros:**
✔️ Extremely easy to use
✔️ Tiny code size
✔️ Comic style
**Cons:**
❌ Limited set of iconic symbols
❌ Not working properly on older OS (ex.: Windows7, etc.)
  
  

Would use emojis if there would be social media logos included, while FontAwesome is good for user experience in tech and business web design. 

Of course, it's possible to use custom images (or svg) for that, though this would be a boring routine. 

Latest Google Fonts update offers great variery of special symbols to use as a font or svgs. Nice option either.
DAW + Audio Engine Dev Update (#7.5) - Dealing with Unproductivity
Tags: music, ava, audio, daw
Published: 2021-04-15 21:22:45

Hello! I have been quite unproductive recently. I took some time and found the source and I realized for the most part, it's because I've been stuck at home for around 2 years now. I actively try new things every once in a while but sometimes it doesn't work! Do I have an exact solution right now? Well not exactly. But will find a way.

I thought this part of the project development process should be documented too. So I wrote about it.

Until I find a way, I'm gonna keep studying and reading some tutorials. So it's not gonna be the *worst* thing ever.

Anyways, you can check out the Ava sound engine repo from [here](https://github.com/funktional-stdo/ava).
What is a good free cloud database allowing ~= 50 incoming connections?
Tags: discuss, postgres, database, devops
Published: 2021-04-15 21:08:39

Hello! I am writing an application for history lessons to help students learn history more efficiently. As it's a side-project, and also pretty local one, I want to avoid any costs on it. I was able to host frontend on Netlify, and backend in Python on Vercel (serverless). But in order to store the data I need some database to connect to. I see heroku postgres as one of the options, which seems fine, but it allows only 20 connections at a time, while possible peak load is around 50 connections. What is a good free cloud database for that? It could be postgres, or something else. Ideally I want it to be working for years without touching, if it is even possible (:
Javascript Project
Published: 2021-04-15 20:41:31

This project was by far the hardest yet. I didn't think I'd make it through but I kept pushing and came up with something that may not be perfect, but I'm really proud of. Javascript is probably my favorite topic we have covered so far I love how I can see everything I am creating as I build. I can't wait to continue refining my project and building it into a functional app that could one day be used by others. I had to take a second try at this project. Initially the city selector for my new house form was hardcoded and would cause issues down the line if the functionality to add new cities was added. In order to fix this I had to go back and create a function that would create an option element that would display the city choices. My next feature that I would like to add is the ability to sort houses by the city. I have already set my project up in such a way that this shouldn't be difficult because I have access to house ids that have the same id as the city and with my static all method I should be able to build that fairly easily.
Intro to Software Engineering Workshop
Tags: beginners, eventsinyourcity, javascript
Published: 2021-04-15 20:39:07

INTRO TO SOFTWARE ENGINEERING: THE BASICS
Learning The Basics of Software Engineering

This workshop will help you gain an overview of software engineering from a career software engineer and engineering manager. Learn about a day in the life of a software engineer, including workflow, problem solving, teams, process, and career growth in the context of a simple, one-level game written in JavaScript with the Phaser.io library. This is a beginner-level workshop, but you should be comfortable enough with the command line to run simple commands.

Pre-requisites: 

Have NodeJS and Git installed

VSCode or an editor of choice installed

Price: $5.00 USD 

This fee is just to ensure your attendance and secure your spot! You will learn so much for practically a free workshop! 

Date: April 28th, 2021 at 7pm EDT - this is a LIVE workshop

[Sign up here](https://www.youaretech.com/shop/intro-to-software-engineering-the-basics)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezhbcrom1pvsd5s0u3oj.png)
Windows Users Warned: A new Windows Desktop Vulnerability found.
Tags: security, devops, news, hacking
Published: 2021-04-15 20:19:24

Desktop Window Manager’s vulnerability:

Kaspersky researchers have found a zero-day vulnerability (CVE-2021-28310) in a Microsoft Windows component called Desktop Window Manager (DWM). 

They said:

"The vulnerability our advanced exploit prevention technology discovered is an elevation of privilege vulnerability. That means a program can trick Desktop Window Manager into giving it access that it shouldn’t have. In this case, the vulnerability allowed the attackers to execute arbitrary code on victims’ machines — it essentially gave them full control over the computers."

CVE-2021-28310 is an out-of-bounds (OOB) write vulnerability in dwmcore.dll, which is part of Desktop Window Manager (dwm.exe). Due to the lack of bounds checking, attackers are able to create a situation that allows them to write controlled data at a controlled offset using DirectComposition API.

*How to get your pc safe:*

Download this pc patch
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-28310
Everything Management Does: Explained In Two Panels
Published: 2021-04-15 20:15:33

** Management Explained
These two panels explain everything you need to know about how and why management does its work.
![Management explained](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofstq1br5c2tq0c4s15l.png)

If you disagree, it is simply because you haven't had enough management dropped on your foot yet.  Give it a year or so and you'll see.  😆🤣

Read the [entire comic here](https://dilbert.com/2007-08-12).
Reach Your Goals with the CodeNewbie Challenge (#CNC2021) 🎉
Tags: codenewbie, beginners, challenge, cnc2021
Published: 2021-04-15 20:14:51

---
title: Reach Your Goals with the CodeNewbie Challenge (#CNC2021) 🎉
published: true
description: 
tags: codenewbie, beginners, challenge, cnc2021
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6spvgj3o59ksps8dxai3.png
---

It's an exciting day for early-career developers and people learning to code!

The [CodeNewbie Community](community.codenewbie.org) has announced the relaunch of their beloved **[CodeNewbie Challenge](https://community.codenewbie.org/cnc2021)** with updated resources and a stronger focus on community support. 

If you ever find yourself needing help when it comes to **Starting to Code**, **Coding More**, **Writing More**, or **Getting a Job**, the CodeNewbie Challenge 2021 (#CNC2021) is for you. 

The five-week challenge is conducted through routine emails that package up manageable weekly "missions", suggested reading material from other community members, helpful worksheets and exercises, lots of support, and self-care tips. This potent combo will help you make real, satisfying progress towards your goals.

<mark>Ready to challenge yourself to reach your biggest early-career coding goals? Sign up and view FAQs and additional info [here](https://community.codenewbie.org/cnc2021).<mark>

We hope you'll join us — you've got this! ❤️
Firebase: The google API for building Apps
Tags: javascript, webdev, react, firebase
Published: 2021-04-15 19:58:10

Firebase is tool used for the backend and database of any app or website you might create. It's a template for your app, that can be configured to your specific needs while delivering the basics. It's made owned by google which makes it even more accessible. I use google for pretty much everything. Emails, writing, and countless other things. I actually didn't know that something like Firebase existed a year ago. I mean who's gonna give up a service like this for free-ish. Anyway lets get right into it.

#Firebase offers Authentication
This is literally the bread and butter of any application. Users need to be identified and have a secure way of doing so. Firebase authentication consists of google auth, facebook auth, email only auth, github auth, email and password auth, and a few others. Users can safely change passwords, confirm their email, and even change the email they are using. [Here's the link to the docs for auth.](https://firebase.google.com/docs/auth)

#Firebase offers 2 different Databases and storage
Firebase is flexible, like really flexible. There are 2 different databases available: the real-time database, and the firestore. Both are great but personally I recommend the firestore. Storage is just for storing things that you cant keep in either database in your google cloud bucket. 
 1. Storage: https://firebase.google.com/docs/storage
 2. Firestore: https://firebase.google.com/docs/firestore
 3. Real-time Database: https://firebase.google.com/docs/database

#Firebase offers cloud functions
Because of the nature of firebase you don't have direct access to a server, but cloud functions solve that problem. You can export your functions to be called using triggers. So any server side code can be run no stress. [Here's the link to the docs](https://firebase.google.com/docs/functions) 
P.S you need to be on a paid plan to use Firebase cloud functions.

Now that all that's been said here's a quick example of how you might implement firebase into a react app.
{% gist https://gist.github.com/OreOlad/3b0b6405c0475533afdf8533a3bec261 %}
[Here's a link to the code in action.](https://react-firebase-testing-b646e.web.app/)

#Happy Hacking!
![Cat Coder Photo](https://i.redd.it/0cj4wyr1uc851.jpg)
High Availability Architecture setup on AWS using Terraform
Tags: aws, terraform
Published: 2021-04-15 19:45:06

<h3><b>What is Terraform?</b></h3>
<p> Terraform is an open-source infrastructure as a code tool used for building, changing, and versioning infrastructure efficiently. Terraform is created by Hashicorp. The language used in Terraform is HCL or Hashicorp Configuration Language.<p>

<h2>An Example of terraform code</h2>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9412630w95f0m4q8zofp.png)

<h3>Terraform Providers</h3>
Terraform Providers are like Plugins, every provider has its own documentation describing its own resources and usage. The Terraform Registry is the main home for all provider documentation. There are almost 948 Terraform Providers out of which few are AWS, GCP, AZURE, KUBERNETES, OCI, and ALIBABA.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6xyhd9islwvvqqfyc1gc.png)
Source: terraform.io
<h3>Components of High Availability Architecture</h3>
<b>EC2 - Elastic Compute Cloud in AWS</b>
Secure, Resizable compute capacity on the cloud.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6xbf25wzynibqzbrlmv.png)
source: wikipedia.org

<b>S3 - Simple Storage Service</b>
Object Storage Service through a web interface that allows us to block all public access to our objects
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8z21jxtlgukg9tz2ibz.png)
source: aws.amazon.com

<b>CloudFront</b>
Fast Content Delivery Network (CDN) Service that provides a globally distributed network of proxy servers that cache content and deliver to customer globally with low latency and high transfer speed.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o3sx7l9czbvb39awtth.png)
source: askvsk.com

<h4>For Storage we have 2 options:<h4>
<ul>
<li>EBS</li>
<li>EFS</li>
</ul>
<b>EBS - Elastic Block Storage </b>
Easy to use, High-Performance Block Storage Service designed for use with AWS EC2.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tbhlw1fypy07dy1gomta.png)
source: wikipedia.org

<b>EFS - Elastic File System</b>
Simple, Scalable Elastic File System for use with AWS Cloud Services and on-premises resources.
  ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kacnhagehxyu5c1j23z1.png)
source: medium.com

<h2>Terraform Code:</h2>
<b>High Availability with EBS - https://github.com/RajitPaul11/terraform_aws/tree/main/high-availability_aws </b>
<b>High Availability with EFS - 
https://github.com/RajitPaul11/terraform_aws/tree/main/high-availability_efs
</b>
Pinterest Video Downloader Online: 
Published: 2021-04-15 18:50:48

Are you struggling How to download Pintrest videos?

It is a phenomenal and convincing device to discover such a photos, chronicles and Gifs, people are using this application or stage from one side of the planet to the other for looking and saving required things. Thus, this application moreover gives featured and most elevated level things in different arrangements for the straightforwardness of customers. 

For capable use, yet you can in like manner use this application to find different things, for instance, plans, favoring considerations, arranging contemplations and much more things.<a href ="https://pinterestvideosdownloader.com/how-to-download-pinterest-videos/">Pinterest video downloader</a> for pc allows the customers to save and download every one of the ideal things without barely making the slightest effort and likeness. 

You don't need to download every one of the ideal pictures and pins since you can similarly save those pins because of less additional space for downloading. Other than this, you can in like manner share these pins in like way your benefit with your allies and online media stages, for instance, Facebook, Messenger and Instagram. 

Consequently, you can in like manner share and imply saved things to others with the help of other social normal stages similarly as your email accounts. You can moreover acquaint the Pinterest application directly with your devices with the help of the present catch. Thusly, you can similarly make your record using the email address or phone number on the Pinterest application. Thusly, you can use spare things later.