teleren/devto huggingface dataset:
TomatoPHP - Laravel Admin Panels
Tags: laravel, php, splade, tomatophp
Published: 2023-04-08 20:47:05

"TomatoPhp, the cutting-edge framework designed to revolutionize the way you build web applications." - [tomatophp.com](tomatophp.com).

I use **TomatoPHP** as CRUD generator, which has an admin panel and also has many features, the documentation mentions some of its excellent features:

- SPA App With Blade
- CURD Generator Web / API
- Support HMVC Architecture
- Authentication & User Manager
- Responsive UI Using Filament Template
- RTL/Dark Mode Support
- Ready to Use Breeze Tool Kit Support RTL/Dark Mode
- Ready to Use Arabic / English Translations
- Easy To use Menu With Provider

TomatoPHP use `Splade` and `Breeze` for backend and `VueJS`, `Tailwind CSS`, `Vite JS` and `inertia JS` for frontend.

You can go through the [documentation page](https://docs.tomatophp.com) to learn more about all TomatoPHP features.

Here are some commands i used to try this package:

```
$ composer create-project tomatophp/tomato laravel_tomato
$ cd laravel_tomato
    # Update `.env` file:
    # -1- edit your APP_URL and APP_HOST
    # -2- edit your DB configuration
$ yarn install
$ yarn run build
$ php artisan key:generate
$ php artisan config:cache
$ php artisan migrate
```

To run the web:
```
$ yarn run dev

# or, if you have valet:
$ valet link
  
# then open your browser, go to:
http://{your-web-domain-or-ip}/admin/login
```

Login with **admin@admin.com** using password **QTS@2022**

Building customers CRUD:

`When I wrote this blog, TomatoPHP was still using Laravel version 9, so we have to use correct laravel modules.`

```
$ composer require nwidart/laravel-modules "9.*"
$ php artisan make:migration create_customers_table
  # -1- edit `\database\migrations\{create_customers_table}.php` file
$ php artisan migrate
$ php artisan tomato:generate
$ php artisan config:cache
  # -1- edit `composer.json` file, add modules folder:
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Modules\\": "Modules/", <<===<<
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
$ composer dump-autoload
$ yarn run build
```

Resources:
- TomatoPHP documentation ([here](https://docs.tomatophp.com/get-started/install))
- Laravel Modules ([here](https://github.com/nWidart/laravel-modules))
Laravel Notes
Tags: laravel, php, notes, webdev
Published: 2023-04-08 20:19:22

From now on i will share my lesson notes when i learn Laravel Framework. Most notes i will write are commands and script modifications i did on my script, which might come in handy when I repeat the procedure again or you might want to use it later.

## 1. Start install Laravel
### # Without Docker
```
composer create-project laravel/laravel example-app
cd example-app
php artisan serve
```
### # With Docker (using Laravel Sail)
```
curl -s "https://laravel.build/example-app" | bash

# -- OR -- install mysql, redis & devcontainer too
curl -s "https://laravel.build/example-app?with=mysql,redis&devcontainer" | bash

cd example-app
./vendor/bin/sail up
```
## 2. Setup Laravel
### With config file
I set my timezone and local in `config/app.php` file
### With environment file
I set my site or database profile within `.env` file
More CSS Easter Eggs
Tags: css, frontend
Published: 2023-04-08 20:16:47

Alvaro Montoro post's "Drawing an egg with CSS" had a tip to make the eggs look more egg like. I took his advice to modify the oval I used in previous egg posts. [CSS Eggs are Back](https://dev.to/jarvisscript/css-easter-eggs-are-back-2fpi)

{% embed https://dev.to/alvaromontoro/drawing-an-egg-with-css-m17 %}

After reading his post I changed the Border radius which made the egg look more like an egg. See the code changes. 

```CSS
.egg {

	background: 
	height: 364px;
	width: 225px;


    border-top-right-radius: 51%;
	border-top-left-radius: 51%;
	border-bottom-left-radius: 40%;
	border-bottom-right-radius: 40%;
}

```
Changed to this.

```CSS
.egg {

	border-radius: 100% / 125% 125% 80% 80%;
}

```

Changes these eggs...

![four colorful Easter eggs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uo5xrbnq7spkkxcp5027.jpg)


..to this. That gave them a more realistic slope.


![four colorful Easter eggs with a more realistic shape.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f31uia22720sws141e28.jpg)

## Time to paint the eggs

Looks like I need to paint some more. I stated at the end of my last post I should have used the same gradient through out the article. That's what I'm doing here. 

Same gradient Pink, Yellow, Purple, Dark Purple. The only change between eggs, is the direction of the gradient. 

Starting at default of top to bottom and moving clockwise around the egg.

```html
<div class="character">

		<div class="egg egg_gradient_bottom"></div>

		<div class="egg egg_gradient_right"> </div>

		<div class="egg egg_gradient_top"> </div>

		<div class="egg egg_gradient_left"></div>

	</div character>
```

```CSS
.egg_gradient_bottom {
  background: linear-gradient(
  	var(--Pink), 
  	var(--Yellow), 
  	var(--Purple), 
  	var(--DarkPurple));
}

.egg_gradient_right { 
  background: linear-gradient(to right,
   var(--Pink), 
   var(--Yellow), 
   var(--Purple),
   var(--DarkPurple));
}


.egg_gradient_top {
	background: 
	linear-gradient(to top,
       var(--Pink), 
       var(--Yellow), 
       var(--Purple), 
       var(--DarkPurple));
}

.egg_gradient_left {
	background: 
	linear-gradient(to left,
       var(--Pink), 
       var(--Yellow), 
       var(--Purple), 
       var(--DarkPurple));
}

```


![four Easter Eggs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7g3abxukmgvozioplvmw.jpg)

The `linear-gradient(to right,` Changes the direction to flow from left to right and Pink to Dark Purple. The `to direction` controls which way the colors flow. It's where you want the final color to end.

You notice that the first egg is the same gradient as the previous post. 

![Easter Egg colored to look like a sunset.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8gi4sa4i4yx0b8zhvwp.jpg)

This was a nice way to improve my CSS eggs and fix a couples thing I didn't like about the previous post. 

Thanks Alvaro Montoro for the tip.

Thanks for reading.
3 Common Problems while learning to code
Tags: learning, programming, webdev
Published: 2023-04-08 20:06:14

Here are some common problems that people face while learning to code, along with tips on how to avoid them:

## Perfectionism:
Perfectionism can be a significant obstacle to progress when learning to code, or anything else for that matter. If you constantly strive for perfection, you may take longer to acquire new skills or become proficient. Learning is a gradual process, and it takes time to become fluent in any skill. So, instead of trying to achieve perfection from the outset, focus on learning bit by bit. Remember, Rome wasn't built in a day, and neither will your coding skills be!

## Consistency and Discipline:
Maintaining a consistent learning schedule is essential to gaining and mastering a new skill. Often, we tend to put in more hours at the start when our energy is high, but we eventually start taking longer breaks, which can harm our overall performance. Therefore, it is crucial to remain consistent and disciplined when learning to code. Consider setting goals or taking on a challenge to keep yourself motivated and committed to the learning process.

## Celebrate Every Success:
It's essential to take the time to celebrate every success, no matter how small, when learning to code. Enjoying every successful step or achievement towards your goal can help you stay motivated and inspired. For example, when you successfully execute a few lines of code for the first time, take a moment to appreciate your accomplishment. These little moments of happiness can go a long way in keeping you energized and enthusiastic about learning to code.

As programmers and tech enthusiasts, we know that learning to code can be a challenging but rewarding experience. By avoiding the common problems outlined above, you can optimize your learning and progress towards becoming a skilled coder. Remember to be patient, consistent, and celebrate every success along the way. Happy coding!
3 tips for beginners
Tags: beginners, programming, productivity, learning
Published: 2023-04-08 19:55:24

## Persistence

Becoming a proficient programmer takes a lot of time and effort. The path to success can be long, so strive to be consistent even if you only have half an hour a day. Consider joining the #100DaysOfCode challenge to help you stay on track.

Point: Joining the #100DaysOfCode challenge can help you develop consistency.



## Practice

Understanding programming concepts is not enough to create projects. You need to put your knowledge into practice by starting a project or working on an idea that interests you.

Point: Start by working on a project or idea that interests you.




## Use Google Instead of Memorizing

In traditional education, we are taught to memorize everything. However, in programming, it is better to learn concepts and use Google extensively to search for syntax, errors, or how to implement certain things. Don't bother memorizing definitions; focus on understanding and knowing how to use them. Learn to skim through things to take away important messages instead of dictionary meanings.

Point: Later, if you have an interview, you can go through a few articles to learn better ways of describing things or answering questions.
Three JS Examples : 5. Three JS Animation Keyframes
Tags: css, threejs, animation, webdev
Published: 2023-04-08 19:54:00

Three.js is a cross-browser JavaScript library and application programming interface used to create and display animated 3D computer graphics in a web browser using WebGL.  

[Three js docs](https://threejs.org/docs/)

---
 

## Three JS Animation Keyframes
---

{% youtube 2V8Gj_DvE1c %}


 ---
### [Source code](https://democoding.netlify.app/threejs/three-js-animation-keyframes)

---

{% gist https://gist.github.com/amitSharma7741/febf0d9ce1fbb143c3f6b290eb031182 %}
 
---
---
## For more information

1. Check my GitHub profile
[https://github.com/amitSharma7741](https://github.com/amitSharma7741)

2. Subscribe my Youtube Channel 
[https://www.youtube.com/@democode](https://www.youtube.com/@democode) 

3. Check out my Fiver profile if you need any freelancing work
[https://www.fiverr.com/amit_sharma77](https://www.fiverr.com/amit_sharma77)

4. Follow me on Instagram
[https://www.instagram.com/fromgoodthings/](https://www.instagram.com/fromgoodthings/)

5. Check out my Facebook Page 
[Programming memes by Coder](https://www.facebook.com/programmingmemesbycoders)

6. Linktree
[https://linktr.ee/jonSnow77](https://linktr.ee/jonSnow77)

 

---
---

{% instagram CoukQjbuwW3 %}
Commercial cleaning company in Springfield, IL
Published: 2023-04-08 19:39:59

Every workplace can gain from a few form of business cleaning. "Janitorial offerings" is an umbrella term that refers to all cleaning, together with customizable maid services, commercial contracts for creation or other specific assignment cleanup, and building protection with facility cleaning services.
**_[Commercial cleaning company in Springfield, IL](https://cleanimpactllc.com/)_**
 These services cowl all bases, and that they accomplish that with a standard agreement of services and agreed phrases for performance of the outlined responsibilities. The responsibilities are standardized in order that customers recognise what to anticipate. The staff is ready via education to accurately and adequately administer cleaning solutions and cleansing equipment unique to surfaces including flooring, upholstery, counters and device observed in an workplace, as an instance. Commercial janitorial offerings pleasure themselves on being capable of offer the satisfactory cleaning in your vicinity; their popularity is everything to the achievement in their business. So they drum up a standard settlement to make sure superb customer service for all the companies for which they offer cleaning overhauls, upkeep and exams to.

When it comes to janitorial services, their popularity is usually of the maximum importance, however there are numerous privately owned businesses that can offer cleansing offerings to your enterprise. So how do pick one over the others?

First, you may create a listing of the necessities you have got for the office offerings you need. Next, you can attempt out several agencies which you trust can provide the pleasant suit in your commercial enterprise. Once you have invited a organisation on your workplaces. They will offer you with a settlement of janitorial offerings that outlines the recurring cleaning, special flooring floor cleansing consisting of carpets, tiles or hardwood, and even unique out of doors window cleansing.

A contract is critical to any enterprise transaction. The info of the settlement are vital. You want if you want to file the cleansing duties, the protocol for office strategies (especially with reference to luxurious home equipment and equipment), the charge, and the length of the contract. All of the personnel from the janitorial company will understand what to do, and any office manager for the duration of the period of the agreement will recognize what to expect. You can in some cases have simplest a verbal agreement, but you may want to have an itemized document that will illustrate what each aspect expects to receive. There isn't any reason to be unclear approximately the settlement for offerings this is made between an awesome cleaning carrier and a smooth, practical office.
"Deploying a Blockchain Application Nextjs / Hardhat on Netlify: A Comprehensive Guide"
Tags: blockchain, nextjs, hardhat, netlify
Published: 2023-04-08 19:16:26


Deploying a blockchain application with two backend and frontend directories can seem like a daunting task, but with platforms like Netlify, the process can be simplified. In this article, we will guide you through the steps to deploy a blockchain application with two directories using Netlify.

Firstly, it's important to ensure that the Application Binary Interface (ABI) of the smart contract is included in the public part of your application. This will allow the user interface to communicate with the smart contract. To do this, you can place the ABI file in the public folder of your frontend.

Next, you need to specify the environment variables in Netlify for your application. This will enable Netlify to recognize the sensitive information that your application needs to function properly. You can add these variables by accessing the "Environment" tab in your Netlify site settings.

In the Build settings of Netlify, you need to specify the runtime, base directory, build command, and publish directory. For a Next.js application, you should specify the runtime as **Next.js** and the base directory as "front". For the build command, you can use **"yarn build"** or **"npm run build"**. 
Finally, the publish directory should be set to **"front/.next"**.


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

Once you have configured all the deployment options, you can push your application to Netlify using your preferred method (such as Git or the command-line interface). Netlify will automatically handle the building and deployment of your application.

In conclusion, deploying a blockchain application on Netlify can seem complicated, but it can be simplified by following the steps outlined above. 
By ensuring that the ABI is included in the public part of your frontend and specifying the environment variables in Netlify, you can ensure the proper functioning of your application. Finally, by configuring the build options correctly, you can safely deploy your application on Netlify.
Python Project - How To Create A Quote Generator In Python
Tags: webdev, python, programming, testing
Published: 2023-04-08 18:56:28

Python is a versatile programming language that can be used to build a wide range of projects, from small scripts to large-scale applications. If you're new to Python, starting with a small project is a great way to get hands-on experience with the language and learn its core concepts. In this post, we'll explore the simple python project which can generate the random quotes.

## Get Started

### Installation 
In Your Terminal
```BASH
pip install pyquotegen
```
### import module in your project
```python
import pyquotegen
```

### Code For Get A Single Quote
```PYTHON 
q=pyquotegen.get_quote()
print(q)
```

### Code For Get The Quote By Category

```python
pyquotegen.get_quote("motivational") #it will give you a random quote on motivational category
```

Creating A Full Project Which Can Take Category From Input And Gives The Quote.

```python 
#import module
import pyquotegen

#gets the category from user input 
c = input("Enter The Category: ")

#Get The Quote
q=pyquotegen.get_quote(c)
print(q)
```

Check More About Pyquotegen On Github [Click Here](https://github.com/Armanidrisi/pyquotegen)

Please Star Us On Github

Thanks For Reading
🚀 Outsmart the AI Revolution: How to Thrive and Profit in a Post-AI World 🌐
Tags: ai, productivity, discuss, career
Published: 2023-04-08 18:48:42

Hey there, tech enthusiasts! Today, we're diving into a topic that's on everyone's mind: how to thrive in a post-AI world. As artificial intelligence continues to advance at breakneck speed, many fear that human skills will become worthless. But, we believe there's still hope for us! Let's explore how leveraging AI can keep us ahead of the curve and even help us create lucrative businesses. 📈

## 🤖 AI as an Employee

Instead of worrying about AI taking over, think of it as your most valuable employee. AI can be used to develop services that solve people's problems by harnessing its incredible computing power and analytical skills. The key is to find creative ways to integrate AI into your business model and let it work for you!

## 🌍 Capitalizing on the AI Revolution

We're still in the early stages of the AI revolution, and now is the perfect time to jump in and capitalize on this opportunity. By creating businesses that leverage AI, you can make a lot of money and secure your future in the rapidly changing world. The sooner you act, the better your position will be when society inevitably adopts Universal Basic Income (UBI).

## 🏠 Investing in Property

One way to stay ahead of the game is to use your AI-driven business profits to invest in property. Since AI is unlikely to own property or businesses, real estate investments can provide you with a stable source of passive income, ensuring your financial security in the long run.

---

So, are you ready to embrace the AI revolution and build an amazing future for yourself? Don't let fear hold you back – now's the time to harness the power of AI and create a world where humans and machines work together for mutual success. If you found this blog post insightful, don't forget to hit that follow button and stay tuned for more engaging content! And, as always, I'd love to hear your thoughts in the comments section below. Let's keep the conversation going! 🎉👇
Vertical Scaling vs Horizontal Scaling
Published: 2023-04-08 18:23:40

**What is Scaling?**
Scalability is the ability of a system to handle an increasing amount of workload without sacrificing the latency.

Suppose, an application take X seconds to respond to a user request, it should take the same X seconds to respond to millions of concurrent user request.

The backend infrastructure of the app should not collapse under a load of a million concurrent requests. It should scale when subjected to a heavy traffic load & maintain the latency of the system.

**Vertical Scaling**
Vertical scaling means adding more power to the server. Suppose your app is hosted by a server with 32 GB of RAM. To handle the increased load you increase the RAM to 64 GB. Now the server is vertically scaled. This is also called scaling up.

![Vertical Scaling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ga4o56dmy9v42hyus044.png)




This should be the first step when the traffic on your app is increasing. This is the simplest way to scale since it doesn’t require any code refactoring or any complex configurations. but there is a limit we can augment on a single server.

**Horizontal Scaling**
Horizontal scaling means adding more hardware to the existing hardware resource pool. This increases the computational power of the system.


![Horizontal  Scaling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvjpc0sox8sky25zdguz.png)



Now the increased traffic can be easily dealt with the increased computational capacity & there is no limit to how much we can scale horizontally.

Horizontal scaling also provides us with the ability to dynamically scale in real-time as the traffic on our website increases & decreases over a period of time as opposed to vertical scaling which requires pre-planning & a stipulated time to be pulled off.
What encryption algorithm to choose for a private key?
Tags: help, security, discuss
Published: 2023-04-08 18:20:01

Hello everyone! 

I am having trouble finding which encryption algorithm to use for my local CA private key storage. I am not sure where to find up-to-date information, since most stack overflow questions have been asked many years ago. 

Based on my research, I am currently deciding between AES-256 and 3DES (des-ede3-cbc). Am I in the right ballpark?

Do you have any resources where I can look up up-to-date recommendations for security related stuff? 

Thank you!
One moment, and all your problems are gone
Tags: cypress, javascript, qa, codequality
Published: 2023-04-08 17:42:01

Hello 🌎! Are you sick of having your Cypress tests fail at random? Do you find it difficult to keep up with the pace of development and achieve deadlines? Fear not, since today we'll be discussing a topic that could perhaps assist you with those issues: time management in Cypress.

> Oh damn... next _agile_ or _scrum_ post? I can read few pages of manifesto myself...

Before you start rolling your eyes and grumbling at the idea of another another time management post, please bear with me. This **isn't** your normal "how to prioritize tasks" or "how to plan your day" advise. Instead, we'll get down to business with managing **system time** in Cypress tests.

So, why is time management sometimes vital in Cypress tests? For starters, time-related defects might be some of the most difficult to find and fix. They can also result in inconsistencies and flaky tests, which can be frustrating for both developers and QAs (and testers :troll-face:). Additionally, you may wish to simulate specific date and time settings in order to test certain functionality or edge cases after you fix some bug related to that.

> But how can we actually manage time in Cypress tests? Are we Doctor Strange with Time Stone?

That's a great question! Although we might not have the Time Stone like Doctor Strange, we do have powerful tool at our disposal to manage time in Cypress tests. To control the system clock during your tests, one typical technique is to use the `cy.clock()` command. Using `cy.clock()` is fairly straightforward - simply call the command with a specific timestamp, and any subsequent time-related commands in your test will use that timestamp as the system clock. For example, you could set the system clock to a specific date and time in the past or future, and then test how your application behaves under those conditions.

Of course, there are potential drawbacks to managing time with Cypress tests, as with any testing technique. It will add additional complexity to your tests and, if not done appropriately, can result in false positives or false negatives. That is why it's critical to assess the benefits and drawbacks and carefully consider whether time management is required for your specific tests.

So there you have it: a quick rundown of time management in Cypress testing. Keep an eye out for future chapters. Have fun playing with `cy.clock()` then. Playing with new techniques and tools is the most important part of any "tutorial" (I'd call it more of an acknowledgment for a brilliant tool)!