teleren/devto huggingface dataset:
Multi Auth System in Laravel Breeze #1
Tags: laravel, auth, tutorial, programming
Published: 2023-06-16 06:06:21

**#1 multi auth system in laravel breeze - laravel 10**

_before start the implement of authentication in laravel you should basic concept of laravel should know and how authentication work_ 

be provide you a step by step implementaion of multi auth system in laravel you should follow 

- In the first step to create a laravel project using

`laravel new MultiAuth`

- In the second step to download laravel/breeze inside a MultiAuth folder

`composer require laravel/breeze`

- In the third step to install breeze in MultiAuth

`php artisan breeze:install`

then run the command for start the MultiAuth

1. in first terminal to run

`php artisan serve`

2. in second terminal to run

`npm run dev`

in above three step they create a basic authentication system for default user

> next part for how to create admins part
SNS Email notifications for errors trigged by AWS Lambda functions using CloudWatch Alarms and CDK
Published: 2023-06-16 06:01:07

The following is a [CDK stack](https://docs.aws.amazon.com/cdk/), setup for monitoring errors logged from Lambda functions, to supplement the lack of good examples for achieving this.

It is setup with the following goals but can be customised:

* Measure at 1 minute intervals.
* Trigger alerts if _any_ errors are logged.
* Send to an email address.

```typescript
import * as cdk from "@aws-cdk/core";
import {Duration} from "@aws-cdk/core";
import * as sns from "@aws-cdk/aws-sns";
import * as subs from "@aws-cdk/aws-sns-subscriptions";
import * as cw from "@aws-cdk/aws-cloudwatch";
import {ComparisonOperator} from "@aws-cdk/aws-cloudwatch";
import * as actions from "@aws-cdk/aws-cloudwatch-actions";

export class CloudwatchAlarmsStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const topic = this.createTopic('foo@example.com');
    this.alertOnLambdaProducesAnyError(topic, 'lambda-a');
    this.alertOnLambdaProducesAnyError(topic, 'lambda-b');
  }

  createTopic(notifyEmail: string) {
    const topic = new sns.Topic(this, 'oly-monitoring', {
      displayName: 'OlyServiceMonitoring',
    });
    topic.addSubscription(
        new subs.EmailSubscription(notifyEmail),
    );
    return topic;
  }

  alertOnLambdaProducesAnyError(topic: sns.Topic, lambdaName: string) {
    const alarm = new cw.Alarm(this, `any-errors-${lambdaName}`, {
      alarmName: `any-errors-${lambdaName}`,
      actionsEnabled: true,
      alarmDescription: `Notify for any errors logged for the lambda function ${lambdaName}`,
      threshold: 1,
      evaluationPeriods: 1,
      comparisonOperator: ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,

      metric: new cw.Metric({
        namespace: 'AWS/Lambda',
        metricName: 'Errors',
        dimensionsMap: {
          'FunctionName': lambdaName,
        },
        statistic: 'min',
        period: Duration.minutes(1),
      }),
    });

    alarm.addAlarmAction(new actions.SnsAction(topic));
  }

}
```
CloudWatch Logs Live Tail
Tags: aws
Published: 2023-06-16 05:45:17

CloudWatch Logs Live Tail was released on June 6, 2023.
Until now, CloudWatch Logs did not have the ability to view logs in real time.
When I wanted to see the log in real time, I used to set the display period to something like 1 minute and manually press the refresh button.
CloudWatch Logs Live Tail can automatically display real-time logs like tail -f in Linux.

{% youtube cAJ2PlUjb80 %}
Why Hire Dedicated Laravel Developer
Tags: laravel, laravelframework, laraveldeveloper, dedicateddeveloper
Published: 2023-06-16 05:35:33

When it comes to building robust and scalable web applications, Laravel has emerged as one of the most popular PHP frameworks. To leverage the full potential of Laravel and ensure the success of your project, hiring a dedicated Laravel developer is a wise choice. Here's why:

1. Expertise in Laravel: Dedicated Laravel developers have specialized knowledge and extensive experience working with the framework. They are well-versed in Laravel's best practices, coding standards, and architectural patterns. Their expertise allows them to efficiently develop high-quality applications, utilizing Laravel's powerful features and functionalities.

2. Time and Cost Savings: By hiring a dedicated Laravel developer, you can save valuable time and reduce costs. These developers are focused solely on your project, eliminating the need for additional training or managing multiple resources. They can work efficiently, meeting deadlines and delivering results promptly, ultimately reducing development time and associated costs.
 
3. Customization and Scalability: Laravel provides a solid foundation for building scalable and customizable web applications. A dedicated Laravel developer can tailor your application to meet your specific business requirements, ensuring seamless integration with existing systems and workflows. They can also implement modular and reusable components, making it easier to scale and expand your application in the future.
 
4. Quality Assurance: Hiring a dedicated Laravel developer ensures a higher level of quality assurance for your project. These professionals are well-versed in Laravel's testing capabilities and can implement robust testing strategies to identify and fix any issues early on. They follow industry-standard coding practices and perform regular code reviews to maintain code quality and ensure a stable and secure application.
 
5. Ongoing Support and Maintenance: After the initial development phase, your application will require ongoing support and maintenance. [Dedicated Laravel developers](https://viitorcloud.com/blog/web-stories/how-to-hire-a-laravel-developer/) offer continued assistance, ensuring that your application runs smoothly, remains up-to-date, and addresses any issues that may arise. They can also provide feature enhancements, security updates, and performance optimizations, ensuring the long-term success of your Laravel application.
 
In conclusion, [hiring a Laravel developer](https://viitorcloud.com/hire-laravel-developer) brings numerous benefits, including expertise in the framework, time and cost savings, customization and scalability, quality assurance, and ongoing support. With their specialized skills and focused attention, these developers can help you build a robust, efficient, and successful Laravel application.
Keyboard Counter Using JavaScript
Published: 2023-06-16 05:30:25

Hello Coder! Welcome to the Codewithrandom blog. In this blog, we learn how to create a **[Keyboard Counter](https://www.codewithrandom.com/2023/01/01/keyboard-hit-counter-keyboard-counter-using-html-css-javascript/)**(when the user presses any key from the keyboard its counts and shows on the screen). We use Html, Css, and JavaScript for creating this Keyboard  Counter.

I hope you enjoy our blog so let's start with a basic Html Structure for a Keyboard Hit Counter.

## HTML Code For Keyboard Counter:-
```
<div id="activity">
<img src="http://code.quirkbot.com/assets/images/logo/white-outline.svg" width="30%" alt="">
<h1 id="counter"><span class="hits">0</span>
<h1>Keys Hit</h1>
</div>
```
There is all the Html code for the Keyboard Hit Counter. Now, you can see output without Css and JavaScript. then we write Css and JavaScript for the Keyboard Hit Counter.

## CSS Code For Keyboard Counter:-
```
body {
margin: 0;
font-family: "Open Sans", comic-sans;
position: absolute;
width: 100vw;
height: 100vh;
overflow: hidden;
display: table;
}
#activity {
display: table-cell;
text-align: center;
vertical-align: middle;
}
#activity:before {
content: "Hit Any Key On Your Keyboard";
position: absolute;
top: -1;
left: 0;
width: 100vw;
height: 10vh;
background: rgba(10, 10, 10, 10, 10);
}
#activity:after {
content: "Codewithrandom";
position: absolute;
bottom: 0;
left: 0;
width: 100vw;
height: 12vh;
}
#result {
text-transform: uppercase;
}
a:link,
a:hover,
a:visited,
a:active {
text-decoration: bold;
}
.hits {
font-size: 5.75em;
font-weight: bolder;
}
```
## Keyboard Counter JavaScript Code:-
```
var hits = 0;
var hitElement = document.querySelector(".hits");
document.body.onkeyup = function (e) {
if ((e.keyCode == 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) {
addHit();
}
};
var addHit = function () {
hits++;
renderHits();
};
var renderHits = function () {
hitElement.innerHTML = hits;
};
```
Now we have completed our **[Keyboard Counter](https://www.codewithrandom.com/2023/01/01/keyboard-hit-counter-keyboard-counter-using-html-css-javascript/)**. Hope you like the Keyboard Counter Project. you can see the output video and project screenshots. See our other blogs and gain knowledge in front-end development.

Thank you!

Written by - Code With Random/Anki 

Codepen by - Braxtoony
Python: The Secret Weapon of the Top Fortune 500 Companies
Tags: python, programming
Published: 2023-06-16 05:30:00

Disclaimer: No snakes were harmed in the making of this article. Any resemblance to actual pythons, living or coiled, is purely coincidental.

🐍 *Hiss*! Welcome, brave soul, to the corporate jungle where big businesses are in a constant tussle for supremacy. But wait, what is that? Is that a giant snake wrapped around the Fortune 500 companies? Oh, no my dear reader, don’t be alarmed. That’s not a giant reptile, that's Python! The secret weapon of choice that’s squeezing (pun intended) every ounce of efficiency from the top companies. 

Let's slither through the reasons, shall we?

**1. Ssssspeedy Development:**
Python is known for its simplicity, just like a snake’s diet. Forget the convoluted programming languages that make you feel like you're wrestling an anaconda. Python is easy to learn, which means companies can train their workforce in the art of Python whispering without spending a fortune (500 or otherwise).

**2. The Swiss Army Knife of Programming:**
Whether it’s for data analysis, web development, automation, or training AI to predict the next best dad joke, Python's versatility is as impressive as a snake’s ability to swallow things five times its head size. Python libraries like Pandas, NumPy, and Django are like the venom that gets the job done effectively. Mind-blown, hiss-terically!

**3. Scalable Ssssssuccess:**
Python has a way of helping companies shed their old, inefficient skin and transform into new, agile contenders. Companies like Google, Netflix, and Spotify coil Python around their operations, growing bigger without having to worry about breaking out of their skin!

**4. A Ssssstellar Community:**
If a company ever feels like they’re lost in the jungle, Python's thriving community is there to help. With a simple S.O.S (Save Our Snakes), Pythonistas worldwide will come together to make sure no programmer or company is left hissing in the wind.

Disclaimer: Real snakes don't form communities or save each other. We checked. 

**5. The Great Sssssssupport:**
Like a boa constrictor's grip, Python’s long-term support holds companies tight, providing them with constant updates and security fixes. This ensures that companies don't get bitten by the bugs that lurk in the shadows.

Before we end this serpentine journey, remember, Python is not an actual snake. If you're a CEO reading this, please don’t go to a pet store looking for one to boost your company’s profits. Instead, embrace Python, the programming language, and watch your company slither its way to the top of the Fortune 500.

Don’t forget to explore more about Python, AI, and other technologically slithering subjects on my YouTube channel - [PAIton and Crossovers](https://www.youtube.com/channel/UCzUBm8oODJRZCHYVQtArgyA?sub_confirmation=1). Subscribe and join the Pythonista tribe! 🐍
Creando tu Propio Entorno Local para Desarrollo en HTML, CSS y JavaScript
Tags: javascript, node, español
Published: 2023-06-16 05:03:48

¿Deseas probar y experimentar con tus proyectos web (HTML, CSS y JavaScript) sin depender de una conexión a Internet? Este artículo te orientará en la configuración de un entorno localhost usando NodeJS y http-server, lo cual te permitirá ejecutar tus proyectos web de forma offline.

## Introducción a NodeJS

NodeJS es un entorno de ejecución para JavaScript basado en el motor V8 de Chrome. Te permite ejecutar código JavaScript fuera de un navegador, ideal para desarrollar aplicaciones de servidor, y en nuestro caso, servir archivos web localmente.

## Beneficios de Usar NodeJS para un Entorno Localhost

NodeJS ofrece un módulo HTTP integrado que simplifica la creación de un servidor web, facilitando la prueba y depuración de proyectos web en un entorno local antes de su implementación en un servidor en vivo.

## Instalación de NodeJS y npm

Para verificar si ya tienes NodeJS y npm, abre tu terminal (o CMD en Windows) y ejecuta:

```
node -v
npm -v
```

Si estos comandos muestran números de versión, ya están instalados. Si no, descarga [NodeJS](https://nodejs.org/es) desde su sitio web oficial y sigue las instrucciones de instalación. Luego, verifica la instalación repitiendo los comandos anteriores.

## Configuración de http-server

Con NodeJS y npm ya instalados, puedes instalar `http-server` globalmente. En tu terminal o CMD, ejecuta:

```
npm install -g http-server
```

Esta acción instalará `http-server` de manera global, permitiendo su uso en cualquier directorio.

Para servir tus archivos web, navega en la terminal al directorio de tu proyecto con el comando `cd` y luego inicia el servidor con:

```
http-server
```

Verás un mensaje en la terminal indicando que el servidor está activo.

## Accediendo a tu Proyecto Local

Con el servidor en funcionamiento, abre tu navegador y visita `http://localhost:8080` para ver tu proyecto en acción.

## Conclusión

Configurar un entorno localhost con NodeJS y http-server es esencial para cualquier desarrollador web, ya que te permite probar y depurar proyectos offline. Esta habilidad asegura que tus proyectos funcionen correctamente antes de su despliegue en un servidor en vivo.

Si tienes alguna pregunta o comentario, no dudes en dejarlos en los comentarios.

¡Gracias por leer y nos vemos en el próximo artículo!
Leading with authority vs influence
Tags: career, management, leadership
Published: 2023-06-16 04:31:08

The role of staff engineer is a leadership role in most organisations. Staff engineers don't have direct reports in a people management sense. They lead projects, initiatives, and display leadership in their daily work.

Leading projects and initiatives are examples of leadership from authority. You are in charge of delivering a project, thus you get to tell people what to do! Same goes for a cross-team initiative you're leading to improve developer experience. These are explicit leadership situations. The third case is all about implicit leadership and that's where influence comes in.

What is the difference between the two? and which should you use when?

Continue reading at [https://blackmill.co/blog/lead-with-authority-vs-influence](https://blackmill.co/blog/lead-with-authority-vs-influence?utm_campaign=devto&utm_source=DEVTO&utm_content=auth-vs-influence)
Neural Nets
Published: 2023-06-16 04:25:20

This is week I started my AI course. Needless to say with the boom inside the industry for ML/AI I am pretty excited. Here are my scrappy notes in an attempt to understand Neural Networks before we try to study them in class tomorrow. 

https://docs.google.com/document/d/1meCQbEHHogZOUXMKyk25lzUIZOW-aH-_JAJZ0Da9uy4/edit?usp=sharing

Hope it helps you to get a understanding of different types of Neural Networks
Add Jira ID and branch name in commit message
Tags: git, jira
Published: 2023-06-16 04:20:15

Create a file name `.git/hook/prepare-commit-msg` with following content.
.git/hook/prepare-commit-msg:
```shell
#!/bin/sh

# Not used for now
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3

if [ -z "$EXCLUDED_BRANCHES" ]; then
  # 이 템플릿을 사용하지 않을 브랜치 설정
  EXCLUDED_BRANCHES=(main release master develop)
fi

BRANCH_NAME=$(git symbolic-ref --short HEAD)

# 브랜치 이름을 분해한다.
BRANCH_PATTERN="(.*)/([A-Z0-9]{2,5}-[0-9]{1,4}){0,1}[-_/]*(.*)"
[[ $BRANCH_NAME =~ $BRANCH_PATTERN ]]
BRANCH_TYPE=${BASH_REMATCH[1]}
JIRA_ID=${BASH_REMATCH[2]}
BRANCH_DESC=`echo ${BASH_REMATCH[3]} | tr '-' ' '`

# 템플릿 미사용 조건들
IS_EXCLUDED_BRANCH=$(printf "%s\n" "${EXCLUDED_BRANCHES[@]}" | grep -c "^$BRANCH_NAME$")
BRANCH_OCCURRENCES_IN_COMMIT=$(grep -c "\[$BRANCH_NAME\]" $1)

if [ -n "$BRANCH_NAME" ] && ! [[ $IS_EXCLUDED_BRANCH -eq 1 ]] && ! [[ $BRANCH_OCCURRENCES_IN_COMMIT -ge 1 ]]; then
  sed -i.bak -e "1s|^|[$JIRA_ID] $BRANCH_TYPE: $BRANCH_DESC\nSolves [$JIRA_ID] $BRANCH_TYPE: $BRANCH_DESC\n|" $1
fi
```

If you commit, the hook add two lines automatically.
Ex) A branch
```
feature/JIRA-123_this-is-a-description
```
makes a commit message
```
[JIRA-123] feature: this is a description
Solves [JIRA-123] feature: this is a description
{commit message}
```
100 Days Coding Challenge - Day 28: FreeCodeCamp JavaScript Algorithms and Data Structures Certification
Tags: webdev, javascript, programming, 100daysofcode
Published: 2023-06-16 03:48:49

I finished the course/ yeeei :D now I will start with Front End Development Libraries on freecodecamp, JavaScript in the end, it wasn't very funny for me, I like more python, but idk, I has much to learn still


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ug954rhmqw7jnx0g9lwl.png)
Catatan belajar golang
Tags: go, beginners
Published: 2023-06-16 03:34:28

- get req params
```golang
ctx.Param("id")
```
- get req query
```golang
c.Query("lastname")
```
- get req body
```golang
ctx.Bind(&fruit)
//or
name := c.PostForm("name")
```
.

[doc](https://github.com/gin-gonic/gin/blob/master/docs/doc.md)
Thiên môn bổ phổi Bình Đông 280ml
Tags: bophoi
Published: 2023-06-16 03:30:31

Phổi là cơ quan rất quan trọng trong cơ thể người, có vai trò chính là trao đổi khí – mang O2 từ không khí vào tĩnh mạch phổi và đưa CO2 từ động mạch phổi ra bên ngoài. Ngoài ra, Phổi còn có chức năng chuyển hóa một số chất, lưu trữ máu và lọc các độc tố trong máu. 

Trong Đông Y, Phổi tương ứng với Tạng Phế, được chia thành Phế âm và Phế dương. Khi Phế suy yếu sẽ dẫn đến tình trạng ho khan, ho có đờm, ho về đêm, ho lâu ngày, cơ thể mệt mỏi và khó thở. Vì vậy, bổ phổi là điều rất cần thiết để chúng ta duy trì sức khỏe tốt.

[Thiên Môn Bổ Phổi Bình Đông](https://www.binhdong.vn/gian-hang/bo-phoi-bido/thien-mon-bo-phoi.10.html) kế thừa tinh hoa của nền Y học cổ truyền Việt Nam và là sự kết hợp của những vị thuốc Đông Y gồm: Thiên Môn Đông, Trần Bì, Bình Vôi, Kinh Giới, Bạc Hà, Gừng, Bách Bộ, Tang Bạch Bì và Atiso giúp bổ phổi, giảm ho hiệu quả và hỗ trợ giảm các triệu chứng ho khan, ho gió, ho có đờm, ho lâu ngày, ho về đêm, viêm họng, viêm phế quản,… Với thành phần thảo dược cực kỳ an toàn và lành tính, đây chính là thực phẩm bảo vệ sức khỏe chất lượng mà bạn không thể bỏ qua.

*Lưu ý:

          – Sản phẩm này không phải là thuốc và không có tác dụng thay thế thuốc chữa bệnh.

          – Tùy vào cơ địa mỗi người mà thời gian sản phẩm phát huy tác dụng sẽ khác nhau.

Thiên Môn Bổ Phổi là một sản phẩm cực kỳ chất lượng đến từ công ty Dược Bình Đông. Hãy liên hệ ngay với chúng tôi qua hotline (028)39 808 808 để được tư vấn, hỗ trợ và đặt hàng nhanh chóng.
Xem thêm: [https://duocbinhdong.food.blog/thien-mon-bo-phoi/](https://duocbinhdong.food.blog/thien-mon-bo-phoi/)
10 Ways to Use ChatGPT for Better Coding (With examples)
Tags: webdev, javascript, python, devops
Published: 2023-06-16 03:30:00

WANNA SKIP THE BLOG AND EXPLORE CODING AI TOOLS?
[VISIT](https://www.aiforme.wiki/?category=Coding)

Whether you're a beginner or an experienced developer, harnessing the power of ChatGPT can enhance your coding skills and streamline your development process.

**Code Assistance:** ChatGPT can provide real-time suggestions, catch syntax errors, and offer alternative code snippets to improve your coding efficiency.
Example: "Hey ChatGPT, I'm trying to write a Python function to calculate factorial. Can you help me with the syntax?"

**Debugging Help:** When you encounter bugs, ChatGPT can assist in identifying the root cause and suggest potential solutions.
Example: "ChatGPT, I'm getting an 'index out of range' error in my code. How can I fix it?"

**Language Syntax:** ChatGPT can help you understand complex language syntaxes and provide examples of their usage.
Example: "Can you explain the difference between 'map' and 'filter' functions in JavaScript?"

**Algorithmic Challenges:** ChatGPT can guide you through solving algorithmic problems, providing insights and hints along the way.
Example: "I'm stuck on a dynamic programming challenge. Can you help me devise an optimal solution?"

**Best Practices:** ChatGPT can offer coding best practices, design patterns, and optimization techniques to improve your code quality.
Example: "What are some best practices for writing clean and maintainable code?"

**API Integration:** ChatGPT can assist you in integrating APIs into your code, explaining their usage and helping you retrieve desired data.
Example: "How can I use the Twitter API to fetch recent tweets based on a specific hashtag?"

**Framework Guidance:** ChatGPT can provide guidance on using popular frameworks and libraries, helping you navigate their documentation and understand their core concepts.
Example: "I'm new to React. Can you guide me through setting up a basic component?"

**Code Review:** ChatGPT can review your code, identify potential improvements, and suggest optimizations.
Example: "Could you review my Python script and suggest any optimizations or potential issues?"

**Learning Resources:** ChatGPT can recommend books, tutorials, and online resources to enhance your coding skills and stay up-to-date with the latest technologies.
Example: "What are some recommended resources to learn machine learning in Python?"

**Project Ideas:** ChatGPT can generate creative project ideas and help you brainstorm innovative solutions.
Example: "I need a project idea to practice my web development skills. Any suggestions?"

By leveraging the power of ChatGPT, you can significantly enhance your coding journey. Whether you need assistance with syntax, debugging, best practices, or project ideas, ChatGPT can be your reliable coding companion. Embrace this advanced language model, and witness your coding skills reach new heights. Happy coding!

WANNA LOOK AT THE TOOLS ALREADY?
[VISIT](https://www.aiforme.wiki/?category=Coding)