teleren/devto huggingface dataset:
Laravel 11 : Custom package does not generate CSRF token.
Tags: laravel, csrf, package
Published: 2024-05-08 13:31:02

I encountered this problem while trying to generate csrf token in form on a laravel 11 based custom package. 

The routes in my custom package already included the default web middleware but still it was not generating the needed csrf token for routes and views which belonged to the custom laravel package.

The solution was to include `StartSession` and `VerifyCsrfToken` middleware manually inside the `app.php` file to be used as a global middleware.

```
<?php

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->append(\Illuminate\Session\Middleware\StartSession::class);
        $middleware->append(\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })->create();

```
zap log level codes
Tags: go
Published: 2024-05-08 13:29:07

Uber Zap logger level codes:

| Name          | Value  |
| ------------- |--------|
| Debug         | -1     |
| Info          |   0    |
| Warn          | 1      |
| Error         | 2      |
| DPanic        | 3      |
| Panic         | 4      |

For details check: https://github.com/uber-go/zap/blob/cf2f580374cbb923a87d62449ce50d7712b75fa1/level.go#L30
Unveiling the Melodies: Exploring the Soul of Lyrics with Musix Clan
Published: 2024-05-08 13:28:23

In a world where words and music intertwine, there exists a sacred realm where melodies echo the whispers of the soul, and lyrics paint vivid landscapes of emotion. Welcome to Musix Clan, your digital sanctuary for all things lyrical. In this bustling hub of musical fervor, we invite you to embark on a journey where every note strikes a chord within your heart, and every verse resonates with your deepest emotions.

Musix Clan isn't just another song lyrics website; it's a haven for music enthusiasts, lyric aficionados, and anyone who finds solace in the power of words set to melody. Whether you're seeking the anthems that define generations, the ballads that tug at heartstrings, or the beats that make you want to dance till dawn, Musix Clan is your compass in the vast ocean of musical expression.

Dive into our expansive library, where you'll discover a treasure trove of lyrics spanning genres, eras, and cultures. From timeless classics to the latest chart-toppers, we've meticulously curated a collection that celebrates the diversity and beauty of musical artistry. Whether you're a die-hard fan of rock 'n' roll, a devotee of hip-hop culture, or a connoisseur of indie melodies, Musix Clan welcomes you with open arms.

But Musix Clan isn't just about lyrics; it's about the stories they tell and the emotions they evoke. Behind every song lies a narrative waiting to be unraveled—a tale of love, heartbreak, triumph, or defiance. Through our blog, we delve deeper into the meaning behind the music, exploring the rich tapestry of human experience woven into each lyric and melody.

Join us as we dissect the poetic nuances of your favorite songs, unravel the mysteries behind elusive metaphors, and uncover the hidden gems that make each track a masterpiece in its own right. From lyrical analyses to artist spotlights, our blog is your backstage pass to the inner workings of the music industry, where creativity knows no bounds, and inspiration knows no limits.

But [Musix Clan](https://www.musixclan.com) is more than just a platform—it's a community. A place where music lovers from every corner of the globe come together to share their passion, exchange insights, and forge meaningful connections. Whether you're a budding songwriter looking for feedback, a seasoned musician seeking collaboration, or simply a fan eager to discuss the latest hits, Musix Clan is your virtual hangout spot, where friendships are forged over a shared love for music.

So, whether you're here to find the lyrics to your favorite song, uncover the stories behind the music, or connect with like-minded individuals who share your passion, Musix Clan invites you to join our ever-growing family. Together, let's celebrate the universal language of music and revel in the boundless beauty of lyrical expression. Welcome to Musix Clan—where every song has a story, and every lyric has a soul.
I coded for 100 days and documented it on YouTube...
Tags: 100daysofcode, webdev, coding, frontend
Published: 2024-05-08 13:20:55

Last year in December(2023), I decided to create a YouTube channel (well, I already had an account but I never posted any videos) and I wanted to teach web development to beginners. 

So in January, I posted my very first video which was just a short overview of my channel, and then I started making basic tutorials in HTML, CSS, and GitHub. I was very proud of my work because I put many hours into it and I consider myself a shy person, so this was a big step for me.

At the same time, I was doing daily coding challenges on [iCodeThis](https://iCodeThis.com/?ref=virag) to practice my frontend skills and at the end of January, I came up with the idea to do the 100 days of coding challenge and document it on my channel. So I created a playlist called *100 Days Of Code Challenge* and every day I picked a challenge from the iCodeThis platform and recorded my screen while coding it.

In the first few weeks, I had a lot of energy but eventually, I started getting tired, and around *Day 72* I almost gave up, but I had a lot of supporting people who encouraged me to keep going. So most of my challenges are written in HTML and CSS because it was much easier for me, but a few of them have some JavaScript in it as well (on those days I had more energy).

These challenge videos don't have any commentary, they are fast and have background music as well, but in each video description you can find the source code for the challenges, or you can just check the whole repository out on my [GitHub](https://github.com/virag-ky/100DaysOfCode-Challenge).

So by doing these challenges every day, my *coding* got faster, I don't know how else I can express this, but basically, my thinking or problem-solving skills became more efficient and I also learned quite a few new things about HTML, and CSS.

I see many people *doing* the 100 Days of Code challenge, but not many document it on YouTube, so overall I'm proud of myself that I accomplished this and it was a great journey to enhance my skills.

Here is the 100 Days Of Code playlist: https://www.youtube.com/playlist?list=PLjMZRyJvyMLZvMUees7Mo893VQJzbZZ4n

Feel free to leave me some good/bad feedback on my videos so I can learn from them.
Tech Talk !🚀
Tags: webdev, javascript, beginners, programming
Published: 2024-05-08 13:16:54

"Explore Coding Excellence with Knowvation Learnings and Code Combats"

Embark on an exciting coding adventure tailored for high school students above Grade 12 with Knowvation Learnings and Code Combats. Dive deep into Python, web development, and more as you unlock your potential and shape the future of technology. Enroll now to access expert-led courses designed to propel you towards coding mastery. Don't miss out – join us on this exhilarating journey today! [](https://www.knowvationlearnings.in/)
PDF Triumph: Conquer Pass 2 Dumps
Published: 2024-05-08 13:15:13


<a href="https://pass2dumps.com/">Best Exam Dumps Websites Free</a>  the selection of exam dump sites is a critical step in the preparation journey for any examination. The best exam dump sites offer a balance of comprehensive, accurate, and up-to-date content, alongside a user-friendly interface and robust support systems. However, candidates must navigate this choice with a discerning eye, taking into account factors such as the credibility <a href="https://pass2dumps.com/">Pass 2 Dumps</a> , safety, and legality of the platform. Evaluating these aspects requires diligent research, including the examination of user reviews and testimonials, to gauge the site's reputation and effectiveness. Additionally, the decision between free versus paid platforms hinges on individual needs and financial considerations, with each option presenting its own set of advantages and drawbacks.

Making an informed decision on which exam dump site to use is not only about enhancing study efficiency but also about safeguarding one's personal information and adhering to ethical standards. By <a href="https://pass2dumps.com/adobe-test-and-target-certification/">Adobe Test and Target Certification</a> carefully weighing these considerations, candidates can select a resource that best supports their exam preparation goals while maintaining integrity and security. Ultimately, the right exam dump site can be an invaluable ally in achieving certification success.


Click here more info: >>>>>>>>>> https://pass2dumps.com/
Get Upto 60% Off >>>>>> https://pass2dumps.com/adobe-test-and-target-certification/
30-day Learning Challenge: Day 3— Stepping outside of tech
Tags: learning, selling, nutrition, comfortzone
Published: 2024-05-08 13:06:36

Welcome back to the learning challenge that I’ve set out for myself, where I aim to document something new that I’ve learnt every single day for 30 days!

Being a software engineer, particularly a good one, requires one to also be proficient in other parts of our lives, not just coding alone. This goes for other jobs as well.

## What we should COPY from the best in the field(s)
I once heard in a podcast (can’t quite remember which exact one, there’s so many!) that the best, most capable people in their respective fields, all do one thing in common — they aim to take care of their health as best they can! On top of that, they tend to place significant emphasis on the concept of learning, and the knowledge is not limited to the field they are in.

## My Current Topics of Interest
Gearing myself for the future, I thought of some knowledge and skills that I personally would find myself interested in. After reflecting, I decided to pick up a new read on nutrition, as it’s something that I’ve always wanted to know more about. On top of that, one skill I’ve always wanted to better is my ability to sell and influence. These 2 things have no direct relation to my prowess as a software engineer, but at least for the nutrition side, bettering my knowledge on that front will increase my longevity as a proficient developer!

## Book Recommendations
Here are the 2 books I’m currently on for these topics:

1. **The Science of Selling: Proven Strategies to Make Your Pitch, Influence Decisions, and Close the Deal**, by David Hoffeld
2. **Gentle Nutrition — A Non-Diet Approach to Healthy Eating**, by Rachael Hartley

Remember, no matter what field we are in, we must always remember to put our health before anything. Without being healthy, how can we expect to give our all, and function at our 100% every day? Without being healthy, how can we expect to live our lives to the fullest and enjoy our breaks and holidays? Selling and influencing is another topic that I’m incredibly stoked about exploring, and I hope to share more of these and what I’ve started learning from these books and more in the upcoming articles!

If anyone has any recommendations for other books regarding these topics, or just any interesting books in particular, do leave a comment down below or simply get in touch with me through my [email](mailto:kervynwork@gmail.com)!

As usual, do join me on this journey as well, and begin documenting your daily attempts at learning something new everyday. Trust me, you’ll shock yourself when you look back at how far you’ve come!
30-day Learning Challenge: Day 2— Learning AWS S3
Tags: aws, s3, awslambda, javascript
Published: 2024-05-08 13:04:47

Welcome back to the learning challenge that I’ve set out for myself, where I aim to document something new that I’ve learnt every single day for 30 days!

Today, I decided to take a short break from learning Figma from my day 1 adventures, and have engaged in some work on AWS.

## For my tasks today:
- Work with uploaded files in an S3 bucket that would then be utilised in a script that I had written on my local machine few weeks prior.
- Learn how to implement S3 bucket object creation triggers for my Lambda functions. Overall, an exciting day!

This was my first time experimenting with accessing S3 via Javascript, and I had quite a bit of looking up to do. After searching online, and going down the dreaded rabbit hole of AWS documentation, I finally got it to work through the use of the AWS SDK, and the folks over on StackOverflow (thanks guys).

## Learning links
Here are some of the links that helped me get this done, in case you happen to be on the same stumbling block!


### Accessing S3 buckets in Javascript (JS)

1. https://stackoverflow.com/questions/62606136/how-to-access-s3-bucket-through-javascript
2. https://stackoverflow.com/questions/27299139/read-file-from-aws-s3-bucket-using-node-fs
3. https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-examples.html

### Creating specific S3 bucket event triggers for Lambda functions
1.https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#:%7E:text=and%20other%20APIs.-,Safe%20characters,-The%20following%20character

In the upcoming days, weeks and months, I hope to get even more comfortable with AWS and the different services it provides. Personally, after experimenting with different learning methods, I find that knowledge still sticks the best through trying our hand and attempting a practical. Nothing beats practicing the skill by actually utilising it for your code, work or internship, as there’s only so much know-how you can gain from purely reading about what AWS provides.

Drop a comment if you’d like to hop on a similar journey, and feel free to share with me what your goals are and who knows, we could get started on something together in the foreseeable future!

Have a great day ahead!
30-day Learning Challenge: Day 1 — Learning Figma
Tags: figma, learning, webdesign, challenge
Published: 2024-05-08 13:01:14

School’s out, and summer’s begun! As a software engineer who’s constantly looking for ways to improve, I started feeling a little empty after my finals ended last week. After spending some time reflecting, it boiled down to 2 things that seem to contradict each other:

- Having many things that I want to learn over the summer break 

- Yet feeling a burnout just from looking at the list!

## Tackling burnout!
We’ve all had that moment in life, where we’re so excited to do things we’re interested in, but at the same time, lack the motivation all of a sudden! Through trial and error, I have discovered that _personally_, what works best for me is to **force myself to TAKE ACTION**. A lot of times, we fail to take action, and end up wasting quite a bit of time that could’ve gone to doing the things we wanted to do. Whether it is burnout, being overwhelmed by the amount of things to do, jotting down these commitments and starting to tackle them one by one seems to work best for myself, try it out the next time you’re feeling this way!

## Start of learning journey: Day 1 — Figma!
Today marks the first day of my journey, and for today, I started to peer into using **Figma**, something that I had been putting off since last year!

I started to look online for basic crash courses on Figma, as well as the certain uses of it that are more fine tuned for my use case as a developer!

(Shh, I could somehow never figure out how to use Figma intuitively, I think it’s a me problem)

After looking around, I went with one of my favourite coding YouTubers out there — Net Ninja! (Here is a link to his course, shout out to Shawn!)

[](https://www.youtube.com/watch?v=jyjScZWgzIg&list=PL4cUxeGkcC9hZm9NYpd4G-jhoeEk0ls--&t=1s)

I’ve been following Shawn for close to 3 years, since the beginning of my development journey, have really enjoyed his videos, and this one is actually a collaboration with Chris Pennington, another great teacher in the YouTube coding space.

For today, as it was the first day in the journey, I took it slow and just learnt some of the basics of:

- Installing and using Figma on the desktop
- Implementing a basic design system in Figma
- Using Frames, creating custom styles that can be reused throughout the different parts of the design file
- Using a Type Scale to better visualize our font sizes while designing! https://typescale.com/

These were nice eye-openers to myself as a fledging developer and it has been a great experience so far. Design has been a field that I haven’t taken to naturally, and I am excited to learn more about Figma and contribute to my future team, job and clients with it! To the start of the journey of learning new skills/quirks for the next 30 days!

Drop a comment if you’d like to hop on a similar journey, and feel free to share with me what your goals are and who knows, we could get started on something together in the foreseeable future!

Have a great day ahead!
Nice Froala colour palette
Tags: froala
Published: 2024-05-08 12:57:43

Hi!
I'd like to share a reasonable palette for the color picker of the Froala HTML editor component with you.
It has twelve hues with five different brightnesses each, and all are fully saturated. Furthermore it has a greyscale from white to black with three intermediate shades of grey. I like it much more than the default.

Just add this to the object in the second parameter when calling "new FroalaEditor()"

```
colorsBackground: [
  '#FECCCC','#FEEBCC','#FEFECC','#F2FECC','#CCFECC','#CCFEEE','#CCFEFE','#CCEDFE','#CCCCFE','#EECCFE','#FECCFE','#FECCE5','#FFFFFF',
  '#FF8A8A','#FFD38A','#FEFF8A','#E1FF8A','#8AFF8A','#8AFFD8','#8AFEFF','#8AD8FF','#8A8AFF','#D88AFF','#FF8AFE','#FF8AC4','#D9D9D9',
  '#FF0000','#FF9F00','#FEFF00','#BFFF00','#00FF00','#00FFAA','#00FEFF','#00A9FF','#0000FF','#AA00FF','#FF00FE','#FF007F','#9F9F9F',
  '#BF0000','#BF7700','#BFBF00','#8FBF00','#00BF00','#00BF7F','#00BFBF','#007FBF','#0000BF','#7F00BF','#BF00BF','#BF005F','#5F5F5F',
  '#6A0000','#6A4200','#6A6A00','#4F6A00','#006A00','#006A46','#006A6A','#00466A','#00006A','#46006A','#6A006A','#6A0035','#000000',
  'REMOVE'
],
colorsText: [
  '#FECCCC','#FEEBCC','#FEFECC','#F2FECC','#CCFECC','#CCFEEE','#CCFEFE','#CCEDFE','#CCCCFE','#EECCFE','#FECCFE','#FECCE5','#FFFFFF',
  '#FF8A8A','#FFD38A','#FEFF8A','#E1FF8A','#8AFF8A','#8AFFD8','#8AFEFF','#8AD8FF','#8A8AFF','#D88AFF','#FF8AFE','#FF8AC4','#D9D9D9',
  '#FF0000','#FF9F00','#FEFF00','#BFFF00','#00FF00','#00FFAA','#00FEFF','#00A9FF','#0000FF','#AA00FF','#FF00FE','#FF007F','#9F9F9F',
  '#BF0000','#BF7700','#BFBF00','#8FBF00','#00BF00','#00BF7F','#00BFBF','#007FBF','#0000BF','#7F00BF','#BF00BF','#BF005F','#5F5F5F',
  '#6A0000','#6A4200','#6A6A00','#4F6A00','#006A00','#006A46','#006A6A','#00466A','#00006A','#46006A','#6A006A','#6A0035','#000000',
  'REMOVE'
],
tableColors: [
  '#FECCCC','#FEEBCC','#FEFECC','#F2FECC','#CCFECC','#CCFEEE','#CCFEFE','#CCEDFE','#CCCCFE','#EECCFE','#FECCFE','#FECCE5','#FFFFFF',
  '#FF8A8A','#FFD38A','#FEFF8A','#E1FF8A','#8AFF8A','#8AFFD8','#8AFEFF','#8AD8FF','#8A8AFF','#D88AFF','#FF8AFE','#FF8AC4','#D9D9D9',
  '#FF0000','#FF9F00','#FEFF00','#BFFF00','#00FF00','#00FFAA','#00FEFF','#00A9FF','#0000FF','#AA00FF','#FF00FE','#FF007F','#9F9F9F',
  '#BF0000','#BF7700','#BFBF00','#8FBF00','#00BF00','#00BF7F','#00BFBF','#007FBF','#0000BF','#7F00BF','#BF00BF','#BF005F','#5F5F5F',
  '#6A0000','#6A4200','#6A6A00','#4F6A00','#006A00','#006A46','#006A6A','#00466A','#00006A','#46006A','#6A006A','#6A0035','#000000',
  'REMOVE'
],
colorsStep: 13,
tableColorsStep: 13,
```

Cheers!
Boto3 and DynamoDB: Integrating AWS’s NoSQL Service with Python
Tags: boto, dynamodb, aws, sql
Published: 2024-05-08 12:49:51

AWS Boto3 is the Amazon Web Services (AWS) SDK for Python, which provides an interface to interact with various AWS services, including DynamoDB, a fully managed NoSQL database service. Using Boto3 with DynamoDB allows developers to programmatically create, read, update, and delete data in DynamoDB tables. Here's an overview of working with [AWS Boto3 DynamoDB](https://cloudastra.co/blogs/aws-boto3-dynamodb-integrating-awss-nosql-service):

Setting Up Boto3

Install Boto3: Use pip to install Boto3 if you haven't already:

pip install boto3

Configure AWS Credentials: Ensure that AWS credentials (access key ID and secret access key) are configured either through environment variables, AWS CLI configuration, or IAM roles (for running on AWS services).

Working with DynamoDB using Boto3

Import Boto3 and DynamoDB Client:

import boto3

# Create a DynamoDB client
dynamodb = boto3.client('dynamodb')

CRUD Operations:

Create Table:

response = dynamodb.create_table(
    TableName='YourTableName',
    KeySchema=[
        {
            'AttributeName': 'primaryKey',
            'KeyType': 'HASH'  # Partition key
        }
    ],
    AttributeDefinitions=[
        {
            'AttributeName': 'primaryKey',
            'AttributeType': 'S'  # String
        }
    ],
    ProvisionedThroughput={
        'ReadCapacityUnits': 5,
        'WriteCapacityUnits': 5
    }
)

Put Item (Insert Data):

response = dynamodb.put_item(
    TableName='YourTableName',
    Item={
        'primaryKey': {'S': 'Value1'},
        'attribute1': {'N': '123'},
        'attribute2': {'S': 'Value2'}
    }
)

Get Item (Retrieve Data):

response = dynamodb.get_item(
    TableName='YourTableName',
    Key={
        'primaryKey': {'S': 'Value1'}
    }
)
item = response.get('Item')

Update Item:

response = dynamodb.update_item(
    TableName='YourTableName',
    Key={
        'primaryKey': {'S': 'Value1'}
    },
    UpdateExpression='SET attribute1 = :val1',
    ExpressionAttributeValues={
        ':val1': {'N': '456'}
    }
)

Delete Item:

response = dynamodb.delete_item(
    TableName='YourTableName',
    Key={
        'primaryKey': {'S': 'Value1'}
    }
)

Query and Scan Operations:

Query:

response = dynamodb.query(
    TableName='YourTableName',
    KeyConditionExpression='primaryKey = :val',
    ExpressionAttributeValues={
        ':val': {'S': 'Value1'}
    }
)

Scan:

response = dynamodb.scan(
    TableName='YourTableName',
    FilterExpression='attribute1 > :val',
    ExpressionAttributeValues={
        ':val': {'N': '100'}
    }
)

Handling Responses

Boto3 DynamoDB methods return a response dictionary containing the operation result.

Check for 'ResponseMetadata' and 'HTTPStatusCode' in the response to ensure the operation was successful.

Error Handling

Use try-except blocks to handle exceptions, such as ClientError, that may occur during DynamoDB operations.

By following these examples and guidelines, you can leverage AWS Boto3 to interact with DynamoDB programmatically from your Python applications.