Month: November 2024

Use jQuery in WP

User use jquery worpdress Assistant If you want to use jQuery in your WordPress theme or plugin, WordPress already includes jQuery by default. However, it may not always be loaded automatically in the frontend, depending on the theme or plugin setup. Here's how you can properly include and use jQuery in WordPress. ### 1. Enqueue […]

Delete session on logout

User delete this session on logout Session::put('is_admin',1); Assistant If you want to delete the session key `is_admin` when a user logs out, you can achieve this by explicitly removing it in the `logout` method of your authentication controller. Here’s how you can do it in Laravel: ### Option 1: Using `forget()` in the Logout Method […]

Optimizing EC2 Build Time

User Npm run build command is slow on Amazon ec2 free tier Assistant The slowness of the `npm run build` command on an Amazon EC2 free tier instance is common due to limited resources. The free tier provides a micro instance (like `t2.micro` or `t3.micro`), which only has 1 vCPU and 1 GB of RAM. […]

Improving EC2 Build Speed

User npm run build is veryslow in aws ec2 free tier Assistant The slow build process on an AWS EC2 free tier instance could be due to several factors such as limited CPU power, memory, and disk I/O speed. Here are some ways to improve the speed of the build process: ### 1. **Increase Swap […]

Optimizing NPM Build EC2

User npm run build is very slow ec2 aws free tier Assistant If your `npm run build` is slow on an EC2 instance, especially on the AWS Free Tier, here are several things you can try to improve the build speed: ### 1. **Instance Type and Resources**: – **Free Tier Limitations**: AWS Free Tier instances […]

Slow npm Build Optimization

User npm run build very slow on aws ec2 Assistant If `npm run build` is running slowly on your AWS EC2 instance, there are several factors that could be causing this issue. Here are some potential solutions and optimizations you can try: ### 1. **Use More Powerful EC2 Instance** Ensure that your EC2 instance has […]

Vite Build Optimization Tips

User npm run build command is bvery slow vite.config Assistant If your `npm run build` command using Vite is running very slowly, there are several optimizations you can make to your `vite.config.js` and project setup to improve build performance. Here's a checklist of potential optimizations: ### 1. **Enable `build.sourcemap` Only for Development** If source maps […]

Check Bitbucket Code EC2

User How to check that bitbucket code has been pushed to ec2 instances Assistant To check if your Bitbucket code has been pushed to your EC2 instance, you can follow these steps: ### 1. **SSH into your EC2 instance** First, you need to SSH into your EC2 instance using the terminal or an SSH client. […]

Install Yarn Ubuntu

User install yarn ubuntu Assistant To install Yarn on Ubuntu, follow these steps: 1. **Update package list**: sudo apt update 2. **Install prerequisites**: Install `curl` if it's not already installed: sudo apt install curl 3. **Add Yarn's official APT repository**: Import the Yarn GPG key: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo tee /etc/apt/trusted.gpg.d/yarn.asc Add the Yarn […]

EC2 Build Optimization

User npm run build on aws ec2 taking time Assistant If running `npm run build` on your AWS EC2 instance is taking longer than expected, here are a few possible reasons and optimizations you can consider: ### 1. **Instance Size and Resources** – Ensure that your EC2 instance has enough resources (CPU, memory) to handle […]