teleren/devto huggingface dataset:
Software Composition: building on the shoulders of giants
Tags: devops, opensource, productivity
Published: 2022-04-07 15:51:25

When we decided to release [Faros Community Edition (CE)](https://github.com/faros-ai/faros-community-edition), the open source version of our SaaS product Faros AI (https://faros.ai), we decided to focus on 2 things: **time to value**, and **making it as welcoming as possible to users and contributors**.

As an open-source engineering operations platform, our data schema (which models everything from pull requests to deployments) is the keystone of our value proposition. We wanted to make it as useful to the community as possible. Which is why every capability of Faros CE leverages that data schema, AND is powered by best-of-class open source projects!

We rely on:
* **Airbyte** for ELT
* **Hasura** for our GraphQL API
* **Metabase** for BI
* **n8n** for Automation
* **dbt** for transformations

As a result, the Faros CE codebase is **compact**: the data schema, some initialization scripts that compose those services together, and some pre-configured dashboards and endpoints.

Faros CE is up and running in minutes! And users can leverage the full power and extensibility of those best-of-class projects. For example one can:
* Connect to new or custom data sources thanks to Airbyte’s ever growing source catalog and development kits
* Enrich data ingested in Faros CE thanks to Hasura’s Actions feature
* Get automatic insights into their Engineering Operations data thanks to Metabase’s X-Ray feature

Composition is truly the most powerful capability in software engineering. Yay functional programming?!

We welcome your thoughts on this and encourage you to try out Faros CE by heading over to our GitHub repo - https://github.com/faros-ai/faros-community-edition

Here is an example of what you can achieve in minutes!

![GitHub dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8mfhgvwiv18xdxgmiy0.png)
Security at Pastes.io
Tags: security, programming, vdp
Published: 2022-04-07 15:47:33

_At [pastes.io](http://pastes.io), we take security seriously.  If you are an independent security researcher and would like to volunteer and collaborate with us, please feel free to reach out to support@pastes.io. #pastesio #pastebin #Security  #togetherwehitharder #VDP_


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkaqeej3ex3xe6boujz1.png)
Components of Kubernetes Architecture
Tags: kubernetes, devops, opensource, linux
Published: 2022-04-07 15:42:24

Kubernetes orchestration is most widely used for deploying microservices applications in cloud. For developers who work on updating their applications on cloud, often are only aware of the kubectl commands but do not know what runs behind the scenes to get the ball rolling.

Read my blogpost where I talk about the various components of kubernetes behind the scenes who things take shape to run the kubectl commands and spin up containers on worker nodes.
 https://link.medium.com/4LCU1sPh2ob
Deploy your infrastructure and apps on AWS without ever opening the console
Tags: aws, devops, cloudnative, cloud
Published: 2022-04-07 15:42:00

Microtica 2.0 Beta is coming soon!

A new version of our developer self-service portal is available and it's a major one. New design, more ready-to-use templates, Git-push deployments, inline configuration, automated rollbacks, built-in security, real-time monitoring.

Join our waitlist and get access to the self-service portal next week. Provide your developer feedback and get paid plans for free 👇
[Microtica 2.0 Beta Waitlist](https://microtica.com/version2/?utm_source=devto&utm_medium=post&utm_campaign=portal2)
Marketo Data Replication
Tags: marketo, marketodatareplication, marketosoftware, marketointegration
Published: 2022-04-07 15:37:30

Infometry Marketo Data Replication solution leverage Marketo APIs and dynamically create target schema on Snowflake so that all the objects within Marketo are available in your Data Lake or Data Warehouse for further analysis. Infometry Marketo software provides customers to seamlessly replicate all the objects including Base Objects, Lists, Custom Objects, and the Marketo objects created dynamically by the application.

**Marketo Data Replication Challenges**

- Lack of pre-built tools or robust connectors to extract all objects.
- Marketo APIs Limitations - Performance, 10 concurrent calls, 100 calls in 20 secs, complexity.
- 500 MB Daily Bulk Export API combined file size.
- 90-day Retention Period for Activities.

**Advantages of INFOfISCUS Marketo Data Replication**

- One time setup of Data Replication Platform.
- Auto detection of new Objects (metadata) within Marketo Software.
- Auto generation of target schema in Data Lake/Warehouse.
- One-time historical data dump.
Learn more about Marketo Data Replication at [Infometry Marketo Data](https://www.infometry.net/products/analytics-solutions/marketo-data-replication/)
heyoitsJuice dev log: 01
Tags: devjournal
Published: 2022-04-07 15:26:05

As I am currently writing this, I am running on no sleep as I have *successfully*? pulled an all-nighter working on a few projects.

In my ["To new beginnings..."](https://dev.to/heyoitsjuice/to-new-beginnings-5epg) blog post, I had told myself that I needed to take accountability, which would be in the form of updating my resume.

Now for the reason I am running on no sleep: 
- Updating/Revamping one of my very first "real" projects in a weather forecast app

For a take-home coding challenge for an internship, I needed to create a five day / three-hour weather forecast application utilizing an api and showcase it to a group of devs.

I could essentially use any technologies I wanted, but the main caveat for this challenge was that I needed to use React.

At that time, I knew zero React. Luckily, I had a bit of a foundation in HTML, CSS, and Javascript. With my foundation, I was given a week to not only teach myself React, but make a  full-blown application with it.

It definitely wasn't the smoothest experience, but it was a very memorable one. From all the google searches, stackoverflow posts, and youtube videos, I had managed to scrape by and not only "learn" React, but "build" an application.

It wasn't the prettiest app, nor was it the most responsive, but it was my app, as corny as that sounds.

Fast forward a year and half or so and here I am revisiting that said challenge.

My original weather forecast app consisted of:
- React, MaterialUI, Styled-Components, Bootstrap, and Axios.

If you're curious as to what it looks like you can visit it [Here](https://github.com/heyoitsJuice/weather-app)

NOTE: (Sadly it's not deployed, so you'll have to run it yourself. I'll eventually upload a picture of it, but for now I'm on my last waking moment finishing up writing this)

With a little more knowledge and experience under my belt, I wanted to address the problem of the UI while utilizing new technologies. 

As a result, I decided on a new front-end stack of:
- React, ChakraUI, NextJS while still using Axios for API calls

After around 15 hours of total elapsed time, I "finished" the challenge and you can have a look at it [Here](https://forecast-heyoitsjuice.vercel.app/)

With one project down, I can finally add this to my Works section of my portfolio website, which will be talked about in another dev log.
Hello world! Everyone has to start somewhere...
Tags: beginners, discuss
Published: 2022-04-07 15:16:12

Hello everyone, I'm planning to write a dev blog every Thursday. I have 10+ years of experience in software development and I always use to shy away from writing any kind of blogs/tech writings. Probably because I'm too scared that others would point out mistakes or there is already good content on that topic or I suck at writing. 

I want to improve my tech skills by blogging about it. It doesn't matter if I write mistakes in my blog posts. I want to get better and improve at least 1% from my previous mistakes. I will start small and try to write on every Thursday.
Figma to Dashbook - parabeac_core v2.6
Tags: flutter, design
Published: 2022-04-07 15:10:47

In our [last article](https://bit.ly/3ugBCQ2), we covered how parabeac_core has added support for component isolation & Widgetbook. We have now also added Dashbook support in [parabeac_core](https://github.com/Parabeac/parabeac_core) v2.6!

## What’s [Dashbook](https://github.com/bluefireteam/dashbook)?


"Dashbook is a UI development tool for Flutter, it works as a development enviroment for the project widgets and also a showcase for common widgets on the app, it is heavly inspired by Storybook library, so it should be very easy for people who has already used Storybook, to use Dashbook."

To activate this feature, edit the config file in parabeac_core, located in `parabeac_core/lib/configurations/configurations.json`. Set `"componentIsolation"` to `"componentIsolation": "dashbook"`

It will look like the following:

![Dashbook Config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1r80iaxnm682ln20dip.png)


You can duplicate and use this demo project here: [https://bit.ly/3NVsvfy](https://bit.ly/3NVsvfy)

Then run parabeac_core as usual and you will have a Flutter project with Dashbook ready to test your component package.

![Component Package Example Figma](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qlqh8mpexvmm37mhgz2f.png)

*Note: Parabeac only generates dashbook/widgetbook stories & use case code for Figma Components.*

You can then run it using:

```
flutter run project_name/lib/main_dashbook.g.dart
```


![Running Dashbook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a34la4xtoqimls6ujjvl.gif)


Next? Start adding the logic needed for this component package. Learn here! - [https://bit.ly/3DUxb0v](https://bit.ly/3DUxb0v)
Laravel + Twilio Integration - The Easy Way
Tags: laravel, twilio
Published: 2022-04-07 15:04:25

Hi guys,
Let's **Integrate Twilio with our Laravel application easily** with some few steps.


**Step-1: Create a Laravel Project** called - `sms-portal`.
```php
composer create-project laravel/laravel sms-portal
```

**Step-2: Configure .env file** - After creating the database `sms_portal`
```php
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sms_portal
DB_USERNAME=root
DB_PASSWORD=12345678
```

**Step-3: Start Server**
```php
php artisan migrate
php artisan serve
```

**Step-4: Install Twilio PHP SDK**
```php
composer require twilio/sdk
```

**Step-5: Get Twilio credential**
Go to https://console.twilio.com

![Console of Twilio Page](https://i.ibb.co/C0chjYs/Screenshot-2022-03-19-at-2-41-39-PM.png "Console of Twilio Page")

Check their your **Account SID**, **Auth Token** and **Twiolio Phone Number**.

Set this value in `.env` File - 
```php
TWILIO_SID="ACxxxxxxxxxxxxxxx"
TWILIO_AUTH_TOKEN="fexxxxxxxxxxxxxxx"
TWILIO_NUMBER="+1xxxxxxxxx"
```
**Step-6: Create Our UserPhone model**
Using this model we'll send message to these phone number from our registered Twilio Phone number.
```php
php artisan make:model UserPhone -m
```

In `CreateUserPhonesTable` migration - only add the `phone_number` string column.

```php
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserPhonesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_phones', function (Blueprint $table) {
            $table->id();
            $table->string('phone_number');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_phones');
    }
}
```

In `UserPhone` model -
```php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserPhone extends Model
{
    use HasFactory;

    protected $table = 'user_phones';

    protected $fillable = [
        'phone_number'
    ];
}
```


**For More, Please Read Full Article in DevsEnv** - https://devsenv.com/tutorials/laravel-+-twilio-sms-system-integration-in-simple-way

**Our Final application** will be look like this - 

![Final Demo of Laravel Twilio Application](https://i.ibb.co/gMbNzWW/Screenshot-2022-03-19-at-3-02-36-PM.png "Final Demo of Laravel Twilio Application")
Multiple approaches of storing data using NodeJS and KnexJS
Tags: javascript, mysql, knex, node
Published: 2022-04-07 15:01:19

# The Best Approach for Storing Data in a Database

When it comes to storing data in a database, there are different approaches you can take. In this article, we'll explore several of these approaches and highlight the pros and cons of each one.

### Approach 1
The first approach involves defining each column in the insert statement. Here's an example of what this approach might look like in code:

```javascript
async function storeUser({ firstName, lastName }) {
  try {
    const [id] = await knex('users')
      .insert({
        first_name: firstName,
        last_name: lastName
      });
      
    return id;
  } catch (error) {
    throw error;
  }
}
```

While this approach works fine when you're dealing with a small number of columns, it quickly becomes unwieldy when the number of columns grows.

### Approach 2
The second approach involves passing in the entire payload as an object. Here's an example:
```javascript
Copy code
async function storeUser(payload) {
  try {
    const [id] = await knex('users')
      .insert(payload);
      
    return id;
  } catch (error) {
    throw error;
  }
}
```
This approach is more versatile, since it can handle any number of columns. However, it's also more vulnerable to errors, since any extra or misspelled columns in the payload will cause an error.

### Approach 3
The third approach is similar to the second one, but with an added twist. Instead of passing in the entire payload, you only pass in the fields that you want to store, and the function filters out any extraneous columns. Here's an example:

```javascript
const _pickBy = require('lodash/pickBy');

async function storeUser(payload) {
  const fillables = ['first_name', 'last_name'];

  try {
    const [id] = await knex('users')
      .insert(_pickBy(payload, (val, key) => fillables.includes(key)));
      
    return id;
  } catch (error) {
    throw error;
  }
}
```
This approach is less error-prone than the second one, since it filters out any unregistered properties. However, it only accepts an object, which can be limiting.

### The Best Approach
So, which approach is the best? After considering the pros and cons of each one, we recommend a fourth approach:

```javascript
const _castArray = require('lodash/castArray');
const _pickBy = require('lodash/pickBy');
const _isNil = require('lodash/isNil');

async function storeUser(payload) {
  const fillables = new Set(['first_name', 'last_name']);

  try {
    const data = _castArray(payload)
      .map(row => _pickBy(row, (val, key) => ! _isNil(val) && fillables.has(key)));

    const [id] = await knex('users').insert(data);

    return id;
  } catch (error) {
    throw error;
  }
}
```
This approach takes advantage of ES6's Set to ensure faster lookups. It can accept both an object and an array, and it omits any unregistered properties in the payload. It also uses several helpful functions from the Lodash library.
Format numbers in the user's locale using vanilla JS
Tags: javascript, intl, frontend, showdev
Published: 2022-04-07 14:56:34

JavaScript has a built-in language-sensitive number formatting feature, called `Intl.NumberFormat`. This is useful if you want to format large numbers, use thousand separators, format currency values. It is [supported](https://caniuse.com/?search=NumberFormat) by all evergreen browsers, except Internet Explorer.

# Example

```js
  const formatter = new Intl.NumberFormat('de-DE', { 
     style: 'currency', 
     currency: 'EUR' 
  })

  console.log(formatter.format(123456.789));
  // expected output: "123.456,79 €"
```

# Playground

The `NumberFormat` documentation on MDN is not very clear about the available options, so I decided to build a playground that allows you to customize the formatting options and immediately see the result for a list of locales and input numbers.

{% codesandbox 7or3uo %}

In the sidebar you'll find some presets that showcase interesting use cases. 

> Note: The features marked as V3 will be implemented in a future version of ECMAScript. Therefore, they may not yet be available in your browser yet. I will add a polyfill as soon as it is available.

Open the [Codesandbox](https://7or3uo.csb.app/) fullscreen for easy editing. The playground is built in React using the [Mantine](https://mantine.dev/) component library.
404 Error Page HTML Templates Design
Tags: design, html, css, javascript
Published: 2022-04-07 14:56:26

Implementing a custom amazing animated 404 page can be an effective way to retain visits from people who have found a dead link to your site.

Showing your creativity to build animated 404 error page templates will definitely help you.

Because 404 Page Error or Not Found error is displayed when you go to a page that doesn’t exist within an active website. One of the most common errors you can come across while browsing the Internet is a 404 or Page Not Found error.

Many websites are using 404 error page templates interactive so user will at least find it interesting and won't leave your website.

So now, below are some amazing, simple and animated 404 error page HTML Templates.

## List of 404 Error Page HTML Templates

###[Yeti 404 Page](https://codepen.io/dsenneff/full/mjZgmN)

![Yeti 404 Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehru2dh0rerdgzqaml9j.png)


###[Mars 404 Error Page](https://codepen.io/AsyrafHussin/pen/KxWRrK)

![Mars 404 Error Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fykh5mgyqu7gq99qszn2.png)

 


###[Animation 404 Error Page](https://codepen.io/vineethtr/pen/ZbKLmq)

![Animation 404 Error Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n2feirzlx6bux4x2jy3d.png)

 


###[Pure CSS 404 Error Page](https://codepen.io/sqfreakz/pen/GJRJOY)

![Pure CSS 404 Error Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqzh5z5qv2t13tc479hi.png)
 


Did you like it? 

There are many more amazing, animated, creative and attractive 404 error page html templates example are available.

So, For more amazing list visit: [404 Error Page HTML Templates Download](https://www.technicalarp.com/2022/01/free-404-error-page-html-template.html)

Thanks for visiting. Follow for more upcoming amazing content.
Improved SQS batch error handling with AWS Lambda
Tags: aws, sqs, lambda, serverless
Published: 2022-04-07 14:52:45

Originally posted at [Serverless](https://www.serverless.com/blog/improved-sqs-batch-error-handling-with-aws-lambda)

AWS announced [partial batch response for AWS Lambda and SQS](https://aws.amazon.com/fr/about-aws/whats-new/2021/11/aws-lambda-partial-batch-response-sqs-event-source/). With this new feature, processing SQS messages in batch is now much more robust, which we’ll explore in detail.

We are happy to say that **Serverless Framework supports that new feature immediately** via the new *functionResponseType* option:
{% gist https://gist.github.com/richardgrantserverless/2d5f56dbcfc204daa54a2352b34a9b1a.js %}
[Upgrade to v2.67.0 or greater](https://www.serverless.com/framework/docs/getting-started#upgrade) to start using it. In case you are [trying out Serverless Framework v3 beta](https://www.serverless.com/blog/serverless-framework-v3-beta), make sure to update the v3 beta with “npm -g i serverless@pre-3”.

## The challenge with batch processing

Up until now, it was already possible to process SQS messages in batch with AWS Lambda, but it had limitations. Here is an example:
{% gist https://gist.github.com/richardgrantserverless/6d1b49108a1be595b948c497f099d2f8.js %}
Our **worker.js** file would contain a handler like this:
{% gist https://gist.github.com/richardgrantserverless/33b00e821f3ee6b2f0072f3c326ab825.js %}
The challenge is dealing with errors: if any SQS record fails to be processed (i.e. the code handling it throws an exception), then the Lambda function execution fails and the whole batch of messages is considered failed.

That also means that **if one message fails, the whole batch is retried again**, including messages in the batch that were successfully processed.

The SQS + Lambda integration provided no practical way to deal with those scenarios. Indeed, catching errors that occurred when processing would mean marking the whole batch of messages as “successfully processed”, which was also wrong.

## AWS Lambda partial batch responses

The new “partial batch response” feature lets us signal, from AWS Lambda, which SQS messages have been successfully processed, and which have failed.

Let’s fix the previous example:
{% gist https://gist.github.com/richardgrantserverless/665db052ce2c659806b31db3abba0eba.js %}
In **worker.js**, we can now catch errors and report failed messages in the return value of our function:
{% gist https://gist.github.com/richardgrantserverless/a0527ae8799f9400a8582505ce7b3b1f.js %}
One downside of this approach is that we can no longer monitor the “error rate” metric of AWS Lambda to monitor errors. Indeed, the Lambda function will execute successfully in all cases (because we catch errors).

But the upside is that only failed messages will be retried by SQS.

If you want to learn more, [check out the official AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting).
PL/SQL functions defined in SQL queries🤯
Tags: database, sql, performance, programming
Published: 2022-04-07 14:39:33

![PL/SQL function defined in SQL query](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xor7u7wym7kzzs8wvba7.png)

👉PL/SQL functions in the SQL WITH clause: Your PL/SQL function defined in the WITH clause of a subquery! Results in better performance as compared with schema-level functions.🥳

📖Documentation: https://docs.oracle.com/database/121/NEWFT/chapter12101.htm#NEWFT146

💻Gist to reproduce: https://gist.github.com/loiclefevre/ddab41639f92f36cf7b09570d3174812