teleren/devto huggingface dataset:
Build a Google Drive Clone with Laravel, PHP, and Vue.js
Tags: laravel
Published: 2023-08-21 21:24:29

---
title: Build a Google Drive Clone with Laravel, PHP, and Vue.js
published: true
date: 2023-08-21 14:48:11 UTC
tags: Laravel
canonical_url: https://www.freecodecamp.org/news/build-a-google-drive-clone-with-laravel-php-vuejs/
---

Building file manager application is a great way to learn many important programming concepts. We just posted a 14-hour course on the freeCodeCamp.org YouTube channel that will teach you how to build and deploy a feature-rich file manager application using Laravel (the PHP framework), Inertia, and Vue.js. This comprehensive course
Dividing audio clips or splitting them using Python and moviepy
Tags: python, coding, moviepy
Published: 2023-08-21 14:42:51

## Hi 🙂🖐

Today, I will show you how to divide audio clips or split them using Python and moviepy.

## step 1

install moviepy `pip install moviepy`


## step 2

Choose any audio file to test the code. I will choose my favorite song for this test. 🤗

```python

import moviepy.editor as mp

audio_path = 'Dirty Backseat - S.S.S (feat. AZZI).mp3'


def split_audio(audio_path, every = 10):
    audio = mp.AudioFileClip(audio_path)
    
    for index, i in enumerate(range(0, int(audio.duration) - every, every)):
        out_audio = audio.subclip(i, i + every)
        out_audio.write_audiofile(f"out/audio-{index}.mp3")

split_audio(audio_path)

```

## Result

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


**Now we're done 🤗**

**Don't forget to like and follow 🙂**

**Support me on PayPal 🤗**
https://www.paypal.com/paypalme/amr396
How to Use the JavaScript at() Array Method
Tags: javascript
Published: 2023-08-21 21:23:58

---
title: How to Use the JavaScript at() Array Method
published: true
date: 2023-08-21 14:41:05 UTC
tags: JavaScript
canonical_url: https://www.freecodecamp.org/news/javascript-at-method/
---

One of JavaScript's most exciting new features is the at() method. The at() method is a new addition to the Array prototype in JavaScript. You can use this method to access elements in an array using a numeric index. The at() method takes an integer value and returns the
Intro to Python: Day 14 - OOP - Method signatures in polymorphism
Published: 2023-08-21 14:32:04

*Hi there 👋 I'm a New York City based web developer documenting my journey with React, React Native, and Python for all to see. Please follow my dev.to profile or [my twitter](https://twitter.com/stonestwebdev) for updates and feel free to reach out if you have questions. Thanks for your support!*

We're following up on [yesterday's article on polymorphism](https://dev.to/jwhubert91/intro-to-python-day-13-oop-what-is-polymorphism-46fd) with a brief discussion of function and method signatures and best practices in Python inheritance.

As discussed, polymorphism is the ability for multiple different classes, with different methods and data, to inherit from the same parent class. This makes it easier to create new classes that share methods that are on the parent.

In computer programming, a **function signature** is a term for the inputs and outputs of a function. To use the [boot.dev](https://boot.dev) definition in OOP Chapter 5 on Polymorphism:

> A function signature includes the name, inputs, and outputs of a function or method.

In functional programming, each function is recognized to have its own distinct function signature, and there is no inheritance as such. In OOP, inheritance is one of the major benefits.

This means we need to take care though not to confuse users of our code, especially when overriding methods on child classes. So, it is a best practice NOT to change the method signature of a class method which inherits from a parent, even when overriding the method.

**If you like projects like this and want to stay up to date with more, check out my Twitter [@stonestwebdev](https://twitter.com/stonestwebdev), I follow back! See you tomorrow for another project.**
How to build Chat UI with Tailwind CSS Template (3 columns)
Tags: webdev, tailwindcss, html, css
Published: 2023-08-21 14:29:07

Create this **Tailwind CSS CHAT UI in** your application. Follow the step by step tutorial

Super Clean UI Template
Beautiful Chat UI Template
Minimal Chat UI Template
Modern Chat UI Template

HTML & CSS
TAILWIND CSS

This is the original tutorial:

{% youtube x_Tm6vUvi2k %}
What are your goals for the week of Aug 21?
Published: 2023-08-21 14:27:30

## What are your goals for this week?


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?


![a cartoon image of a piece of peppermint candy. It has legs and is smiling. it says. "you got this!" under it is the word encouragement. but the mint is spelled M i n t.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/220n3ffegm17r1pcxxgp.jpeg)

### Last Week's Goals


- [:white_check_mark:] Continue Job Search.
- [:x:] Blog.
- [:white_check_mark:] Code Challenges. Did CSS Challenges. missed a day and lost my daily streak. 
- [:x:]Project work. Just Content updates. no code.
- Events. 
  * [:white_check_mark:]Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.
  * [:white_check_mark:] Other VC events if I can.
  * [:white_check_mark:] Did a user study. This time I was on the user end.
- [:x:] Build some LEGO sets. 
- [:white_check_mark:] Run a weekly Slack thread similar to this post. Gonna motivate the community.
- [:white_check_mark:] Rewatch Rebels before Ahsoka series starts at the end of August. * up to season four.
- [:white_check_mark;] Also read A New Dawn A Rebels related Novel.



### This Week's Goals

- Continue Job Search.
- Blog.
- Code Challenges. 
- Project work
- Events
  * Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.
  * Other VC events if I can.
  * Job Fair Tuesday. 
  * What Chad Stewart on Certified Fresh Events.
- Run a weekly Slack thread similar to this post. Gonna motivate the community.
- Build some LEGO sets. 
- Rewatch Rebels before Ahsoka series starts on Wednesday. 
- Pack for weekend trip. 

### Your Goals for the week


You've read my goals so I'll throw the questions back to you.


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?



```html
-$JarvisScript git push
```
Open Source ABCs: Issues
Tags: opensource, discuss, 100daysofoss
Published: 2023-08-21 14:20:32

---
title: Open Source ABCs: Issues
published: true
description: Join our #100DaysOfOSS blog series as we explore the world of Open Source Software (OSS) from A to Z! Every week, we'll discuss two new letters of the English alphabet. Share your thoughts, ideas, and favorite OSS projects for each letter. Let's celebrate the power of open source together! 
tags: opensource, discuss, 100DaysOfOSS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxwg4ygmybnni1tpwdx3.png
# Use a ratio of 100:42 for best results.
series: 100DaysOfOSS
canonical_url: https://opensauced.pizza/docs/community-resources/open-source-abcs-issues/
---

Welcome to our [#100DaysOfOSS series](https://dev.to/opensauced/100daysofoss-growing-skills-and-real-world-experience-3o5k). Until October 31, we'll be doing  Open Source Software (OSS) terms from A to Z. We'll be diving into a different letter of the English alphabet, uncovering OSS concepts, and sharing our thoughts on them.

Today, we're covering the letter "I" for Issues. 

**Issues**: An issue is a problem, suggestion, or task related to a repository that is tracked and managed using issue tracking systems.

An issue can have a wide range of topics, including:

**Bugs**: A bug report documents when software behaves unexpectedly, crashes, or produces incorrect results. Bug reports help developers identify, replicate, and fix the issues.

**Feature Requests**: Users or contributors can propose new features, enhancements, or changes to the code or software. These requests are used to discuss and prioritize potential additions to the project.

**Enhancements**: Similar to feature requests, these suggestions aim to improve the software's functionality, performance, or user experience. They might not introduce entirely new features but can involve refining existing ones.

**Documentation**: Issues related to improving or clarifying the software's documentation. This could involve fixing errors, adding missing information, or making instructions more understandable.

Now, we want to hear from you! What other OSS terms can you think of that start with the letter "I"? 

Remember to use the hashtag #100DaysOfOSS if you share on social media, and don't forget to tag us [@saucedopen](https://twitter.com/saucedopen) so we can follow along.
Follow up to The Mythical Man-Month
Tags: programming, learning, books, discuss
Published: 2023-08-21 14:04:18

Even though The Mythical Man-Month (by F. Brooks) was written ~50 years ago, it's still very relevant today in it's problematics and solutions.

And outdated in some parts as well.

Would anyone suggest some good reads as a follow up to this book with more up-to-date (or deeper) technique, method and research?

I'd appreciate that!
Laravel money model
Tags: laravel, php
Published: 2023-08-21 14:03:53

In Laravel, "Laravel Money" is not a built-in package or feature. However, you might be referring to handling money-related data in your Laravel application. To handle money values effectively, you can use the Laravel's native Eloquent attributes and mutators. Here's how you can achieve this:

```
namespace App\Models;


class Money
{
    private $cent;

    private function __construct($cent)
    {
        $this->cent = $cent;
    }

    public static function fromCent($cent)
    {
        return new static($cent);
    }

    public function inCurrencyAmount()
    {
        return round($this->cent / 100, 2);
    }

}

```

Using with Service model , deservedAmount column 

```
$deservedAmount = (Money::fromCent(Service::sum('deservedAmount') ?? 0))->inCurrencyAmount();

```

Add seter/geter in Service model  

```
 public function setDeservedAmountAttribute($value)
    {
        $this->attributes['deservedAmount'] = $value * 100;
    }

    public function getDeservedAmountAttribute($value)
    {
        return $value / 100;
    }
```
How to Use JSON Server for Front-end Development
Tags: json
Published: 2023-08-21 21:24:51

---
title: How to Use JSON Server for Front-end Development
published: true
date: 2023-08-21 13:54:28 UTC
tags: JSON
canonical_url: https://www.freecodecamp.org/news/json-server-for-frontend-development/
---

One of the most common responsibilities for front-end developers is handling the data in their front-end applications. You’ll need to be able to retrieve data from an API, manipulate it, and then render it on the screen in a modern web application for user interactions. Efficient communication between the
CDP vs Data Warehouse
Tags: cdp, datawarehouse, datascience
Published: 2023-08-21 13:35:19

As monetizing data becomes important, businesses need efficient data management and analytics solutions to make informed decisions and gain a competitive edge.

Two such solutions that play vital roles in handling and processing data are:

Customer Data Platforms (CDPs) and
Data Warehouses.
While both fall under the umbrella of data management and analytics, they serve distinct purposes and are tailored to address specific data-related challenges.

In this post, I’ll discuss how to think about each of them and where they fit in your enterprise’s data journey.
[CDP vs Data Warehouse](https://datafloq.com/read/cdp-vs-data-warehouse-choosing-the-right-solution-for-your-data-management-needs/)
When i am trying to launch react app ..i am facing error
Published: 2023-08-21 13:29:54

error says ...... opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v20.5.0
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m6ulg1k6v5au473vchqj.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gicozs2dabpi4v09dnao.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6ey83ncapljoo03sur4.png)
Command Line Warrior - filter out non-existing URLs
Tags: commandline, linux, bash, scripting
Published: 2023-08-21 13:20:00

---
title: Command Line Warrior - filter out non-existing URLs
published: true
description: 
tags: commandline, linux, bash, scripting
cover_image: https://www.freecodecamp.org/news/content/images/size/w2000/2022/03/pexels-pixabay-207580.jpg
# Use a ratio of 100:42 for best results.
published_at: 2023-08-21 13:20 +0000
---

# Problem description
Given a file of URLs, how can we filter out any that gives us HTTP 404 Not Found and write the URLs that exist to a new file?

# TL;DR

    cat urls.txt \
      | xargs -I{} sh -c 'curl -sIL {} -w "%{http_code}" -o /dev/null \
        | grep -q -v 404 && echo {}' > ok_urls.txt

# Explanation

First, we pipe the list of URLs to `xargs` using `cat`:

    cat urls.txt | xargs ...

Using `xargs` we read the input from `cat` and execute a shell command for each line. The `-I{}` tells `xargs` that we want to replace the string `{}` with the input (in this case a URL).

Since we need to output the URL we got as an input, we will actually use this twice: once first when checking the URL, second when outputting the URL that was valid.

To run multiple commands for each line, we tell `xargs` to run a shell with another command, as specified with `-c`.

In the next part of the script, we first use `curl` to access the URL, telling it to be silent and don't give us output we don't need with `-s`, only give us the header `-I` and follow any redirects `-L`. To get the status code only, we use `-w "%{http_code}"`. This flag can be used to tailor the output from curl. `-o /dev/null` sends any other output to somewhere it can be discarded.

To filter out 404 Not Found we can use `grep -v` which will match lines that do *not* contain 404, and `-q` makes grep be quiet. This way we can test only on the exit value of `grep`.

If you combine two commands with `&&`, the last one will only be run if the previous command was successful - so by putting `&& echo {}` after grep, the URL will only be printed if `grep` was successful. Remember that `{}` is replaced with the URL by `xargs`!

Finally, we send the list of URLs to a new file, and we're done!

Happy hacking,
Vetle
Announcing the 0.2.0 release of Analog 🎉
Tags: webdev, angular, metaframework
Published: 2023-08-21 13:11:39

After many months of development and testing, we're excited to announce the first stable release of Analog! The `0.2.0` release includes many features that help developers ship applications and websites faster, with Angular.

This release helps us move towards a `1.0` release while giving developers an opportunity to use Analog. Feedback from developers helps us to continue improve and innovate on the project.

# Features ⭐️

Analog is the meta-framework built on top of Angular. Here are some of its features, including:

- First-class support for the Vite ecosystem (Vitest, Playwright, Cypress, and more)
- [Filesystem-based routing](https://analogjs.org/docs/features/routing/overview)
- [Support for markdown](https://analogjs.org/docs/features/routing/content) pages and blogs 
- [Support for API/server routes](https://analogjs.org/docs/features/api/overview)
- Hybrid [SSR](https://analogjs.org/docs/features/server/server-side-rendering)/[SSG](https://analogjs.org/docs/features/server/static-site-generation) with sitemap and RSS feed support
- Supports Angular CLI/[Nx workspaces](https://analogjs.org/docs/integrations/nx)
- Integration with [tRPC](https://trpc.io) for type-safe server interactions
- And more!

## Community 🤓

Thank to you all the [contributors](https://github.com/analogjs/analog#contributors-) to the project, whether its been through code, documentation, tests, or even just trying out the project. 

The project already has close to 1500 stars on GitHub, 300+ members on Discord, 900+ followers on Twitter, and was accepted into the first [GitHub Accelerator Cohort](https://accelerator.github.com/). This only the beginning, as we look forward to continuing to improve the project and grow the community around it.

If you'd like to take Analog for a spin, check out this blog post on [Building a Blog](https://dev.to/analogjs/how-to-build-a-blog-with-analog-and-angular-4pk2) with Analog and Angular. If you want to get involved in the project, check out the [GitHub repo](https://github.com/analogjs/analog).

## Partner with Analog 🤝

We are looking for companies to partner with on the Analog project to support development of the project. Thanks to [Snyder Technologies](https://snyder.tech/) for being an early [adopter and promoter](https://twitter.com/benpsnyder/status/1671389794545328128?s=20) of Analog.

{% tweet 1671389794545328128 %}

Find out more information on our [partnership opportunities](https://analogjs.org/docs/sponsoring) or reach out directly to sponsor[at]analogjs.org. 

## Join the Community 🥇

- Visit and Star the [GitHub Repo](https://github.com/analogjs/analog)
- Join the [Discord](https://chat.analogjs.org)
- Follow us on [Twitter](https://twitter.com/analogjs)

If you enjoyed this post, click the :heart: so other people will see it. Follow [me on Twitter](https://twitter.com/brandontroberts) and subscribe to my [YouTube Channel](https://youtube.com/brandonrobertsdev?sub_confirmation=1) for more content!
Kubernetes Clusters Should Disable Automounting API Credentials
Tags: azure, databricks, azureaks, azurecli
Published: 2023-08-21 13:07:54

As Kubernetes continues to gain popularity in the world of software development, it's important to pay attention to the security measures that need to be in place. One such measure involves disabling automounting API credentials in Kubernetes clusters. While it may seem convenient to have automounting enabled, it can actually pose a significant security risk.

Automounting API credentials allows for easy access to the Kubernetes API server from within a pod. This means that any pod running in the cluster can potentially access sensitive information and make unauthorized changes to the cluster. It's like leaving your front door wide open and hoping no one will walk in.

By disabling automounting API credentials, you can greatly reduce the attack surface of your Kubernetes cluster. This means that even if a pod is compromised, the attacker won't have easy access to the API server or any sensitive credentials. It's like putting a lock on your front door and making sure only authorized individuals have the key.

Now, you might be thinking, "But what if I really need to access the API server from within a pod?" Fear not! There are alternative ways to achieve this without compromising security. One option is to use a Kubernetes service account and mount the necessary credentials into the pod securely. It's like having a secret handshake to gain access to the club.

By manually managing the access to the API server, you have more control over who can access it and what actions they can perform. It's like being the bouncer at the club and only allowing in the cool kids.

So, how do you actually disable automounting API credentials in Kubernetes clusters? It's quite simple. You just need to set the `automountServiceAccountToken` field to `false` in the pod's `spec`. This will prevent the pod from automatically mounting the API credentials. It's like flipping a switch to turn off the lights.

Remember, security should always be a top priority in software development. Disabling automounting API credentials in Kubernetes clusters is a simple yet effective way to enhance the security of your applications. So, don't leave your front door wide open and let anyone walk in. Put a lock on it and only allow the cool kids in!

References:
-----------

*   Kubernetes Documentation: [https://kubernetes.io/docs/concepts/configuration/secret/#service-account-credentials](https://kubernetes.io/docs/concepts/configuration/secret/#service-account-credentials)
*   Cloud Native Computing Foundation: [https://www.cncf.io/blog/2020/04/29/kubernetes-security-101-automounting-api-credentials/](https://www.cncf.io/blog/2020/04/29/kubernetes-security-101-automounting-api-credentials/)
Laravel subdomain specific locale
Tags: laravel, language, locale
Published: 2023-08-21 13:03:10

I needed to change the locale of one of my laravel based projects based on the subdomain. The setup was as follows -

* www.domain.com (en)
* de.domain.com (de)
* es.domain.com (es)

I implemented the following inside AppServiceProvider to get the job done:

```
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        //subdomain specific locale
        $subdomain = current(explode('.', $_SERVER['HTTP_HOST']));
        
        if (in_array($subdomain, ["www","fr","de"])) {
            if($subdomain !== 'www'){
                app()->setLocale($subdomain);
                config('app.url',$subdomain.'.domain.com');
            } else {
                app()->setLocale('en');
                config('app.url','www.domain.com');
            }            
        } else {
            app()->setLocale('en');
            config('app.url','www.domain.com');
        }
    }
}
```
Hope this helps someone in future!
Meet Claude - The AI Assistant That Understands The World Like You Do
Tags: webdev, ai, anthropic, claude
Published: 2023-08-21 13:01:46

Claude is a revolutionary new AI assistant from Anthropic that demonstrates remarkably human-like understanding of the world. This intelligent and friendly AI can read research papers, summarize books, interpret images, and have natural conversations by analyzing text, images, audio, video and other data sources.
Claude supports a wide variety of file formats including:
•	Text: .txt, .pdf, .doc, .md, etc.
•	Images: .jpg, .png, .gif, .bmp, etc.
•	Audio: .mp3, .wav, .wma, etc.
•	Video: .mp4, .mov, .avi, etc.
•	Data: .csv, .json, .xml, etc.
•	Code: .py, .java, .js, etc.
•	Compressed: .zip, .rar, .tar, etc.
It brings together advanced AI techniques like natural language processing, computer vision, speech recognition and more to fully understand the contents of these file types and have meaningful conversations about them. Claude can extract insights and generate human-readable analysis for text, image, audio, video and all kinds of digital content.
For developers, Claude provides developer-friendly tools to make building AI applications easy, including comprehensive documentation, tutorials, SDKs for popular programming languages, and pre-trained models to get started quickly. Claude handles the complex AI capabilities so developers can focus on creating.
Claude also prioritizes ethics and thoughtfully implements safeguards like bias monitoring, toxicity filters, and confidential computing. So you get all the advantages of advanced AI, without harmful or unintended impacts.
Claude represents the future of AI - intelligent, friendly, ethical and accessible. This remarkable assistant understands the world like we do and interacts naturally through language. Claude makes AI understandable and helpful for everyone. Discover the possibilities at anthropic.com.
#AI #anthropic #claude #assistant #NLP #computervision #ethics #future