Month: December 2024

EC2 Security Group Fix

User The solution to the issue was to check the security group associated with the EC2 instance and remove a TCP rule that allowed all ports to be open from 0 onwards. This was likely causing a security breach, which was preventing AWS from reaching the instance and resulted in the "Instance reachability check failed" […]

EC2 Instance Reachability Issues

User after setting yarn run dev auto run at amazon ec2 we find it frequently gives error of Instance reachability check failed Assistant The "Instance reachability check failed" error on your EC2 instance indicates that the AWS system is unable to communicate with your instance. This issue is unrelated to the `yarn run dev` command […]

Laravel Route Naming

User Route::resource('posts', FrontUserPostController::class); add userarea.posts.index Assistant To name a route in Laravel when using `Route::resource`, you can use the `names` option to provide a custom name for specific routes. Here's how you can name the `index` route as `userarea.posts.index`: ### Updated Code Route::resource('posts', FrontUserPostController::class)->names([ 'index' => 'userarea.posts.index', ]); ### Explanation – The `names` array lets […]

Gmail SMTP Laravel Setup

User use gmail smtp in laravel env Assistant To use Gmail SMTP for sending emails in your Laravel application, update your `.env` file with the following configuration: MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=your_gmail_address@gmail.com MAIL_PASSWORD=your_gmail_app_password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=your_gmail_address@gmail.com MAIL_FROM_NAME="${APP_NAME}" ### Steps: 1. **Generate an App Password in Gmail:** – Ensure 2-step verification is enabled for your Google account. – […]

Run Queue Laravel Guide

User run queue laravel Assistant To run a queue in Laravel, follow these steps: — ### 1. **Set Up the Queue Driver** Ensure your `QUEUE_CONNECTION` in the `.env` file is set up. For example: – **Sync (default)**: Runs the job immediately. – **Database**: Stores jobs in the database for later processing. – **Redis, SQS, etc.**: […]

CSS Variables in Tailwind

User @tailwind base; @tailwind components; @tailwind utilities; add css vairiables for coloe Assistant To add CSS variables for colors in your Tailwind CSS setup, you can define them in the `:root` selector within your CSS file. Here's an example of how you can achieve this: @tailwind base; @tailwind components; @tailwind utilities; /* Add custom CSS […]

Download DB from Remote

User in remote ssh other than aws we have dumped db into databse-backup-folder Now I want to dowload it locally to ubuntu dowloads fidler Assistant To download a database dump file from a remote server to your local Ubuntu machine, follow these steps: ### 1. Locate the File on the Remote Server Ensure you know […]

Download file via SSH

User download any file remote ssh to our system Assistant To download a file from a remote system via SSH to your local system, you can use the `scp` (secure copy) command. Here's how you can do it: ### Syntax for `scp` scp [user]@[remote_host]:[remote_path_to_file] [local_path] ### Example If your remote system details are: – **Username:** […]

MySQL Table Dump Command

User mysql dump particular table Assistant To dump a particular table in MySQL, use the `mysqldump` command with the table name. Here's the syntax: mysqldump -u [username] -p [database_name] [table_name] > [output_file].sql ### Explanation: – **`-u [username]`**: Your MySQL username. – **`-p`**: Prompts for the password. – **`[database_name]`**: The name of the database containing the […]

Run Yarn Dev on Boot

User AWS ec2 ubunutu add yarn run dev command to run every time Assistant To automatically run the `yarn run dev` command whenever your AWS EC2 Ubuntu instance starts, you can set it up as a **systemd service**. This approach ensures that your command starts on boot and restarts automatically if it crashes. Here's how […]