Posts

Showing posts from February, 2023

How make money from a blogger platform

  There are several ways to make money from a blogger platform, some popular methods include: AdSense: You can display ads from Google AdSense on your blog and earn money every time someone clicks on the ad. Affiliate Marketing: You can promote other people's products or services on your blog and earn a commission for every sale or lead you generate. Sponsored Content: You can accept payment from companies or businesses to write reviews or promote their products or services on your blog. Selling Your Own Products: You can sell your own products or services on your blog, such as an ebook, course, or consulting services. Donations: You can ask your readers to donate money to support your blog if they find it valuable and enjoy your content. Offer Premium Content: You can offer premium content to your readers for a fee, such as exclusive articles, tutorials, or newsletters. Remember that making money from a blog takes time and effort, so it's important to focus on creating high-qu...

To use Amazon S3 as the backend of your WordPress website

  To use Amazon S3 as the backend of your WordPress website, you can use a plugin such as Amazon Web Services (AWS) S3 and CloudFront. Here are the steps to set it up: Install the plugin: Go to the WordPress dashboard, navigate to the “Plugins” section and click on “Add New.” Search for “Amazon Web Services (AWS) S3 and CloudFront” and install the plugin. Connect the plugin to your S3 account: After installation, navigate to the “Settings” section of the plugin and enter your AWS Access Key ID and Secret Access Key. Set up a new S3 bucket: In your Amazon S3 account, create a new bucket and make note of the bucket name. Configure the plugin: In the plugin settings, enter the name of the S3 bucket you just created and configure any additional settings, such as file uploads and backups. Enable CloudFront: You can also enable Amazon CloudFront to serve your files from multiple locations and improve the loading time of your website. To do this, simply follow the instructions in the plug...

How to create GitLab merge request

To create a merge request in GitLab, you can follow these steps: Go to your GitLab project and switch to the branch you want to merge into your default branch (usually master ). Click the "Create merge request" button, or click the "Merge Requests" tab and then the "New merge request" button. On the "New merge request" page, select the source branch and target branch. The source branch should be the branch you just checked out, and the target branch should be your default branch (usually master ). Fill in the merge request title and description. Make sure to include enough information so that other people can understand what changes you are proposing. Click the "Submit merge request" button to create the merge request. Your merge request will be reviewed by the project maintainers, who will then either merge your changes or request additional changes. Note: If you are using GitLab.com, you need to have permissions to create merge reques...

GitLab CI/CD pipeline that runs only when a tag is created from the master

You can set up a GitLab CI/CD pipeline to run only when a new tag is pushed to the master branch by using the only keyword in the .gitlab-ci.yml file. Here's an example of how you can do this: stages:   - build   - deploy build:   stage: build   script:     # build commands   only:     refs:       - tags     changes:       - "master" deploy:   stage: deploy   script:     # deploy commands   only:     refs:       - tags     changes:       - "master" In this example, the build and deploy jobs will only run when a new tag is pushed to the master branch. The only keyword specifies that the job should only run under certain conditions. The refs value of tags specifies that the job should only run when a new tag is created. The changes value of master specifies that the job should only run when changes are pushed to the master branch.

Unable to publish npm package

The error npm ERR! code E404 indicates that the package you are trying to publish to the npm registry could not be found. There could be several reasons for this error, some of which are: Incorrect package name: Make sure you are publishing the correct package by verifying the name in the package.json file. Package already exists: If a package with the same name and version already exists in the npm registry, you will not be able to publish it again. In this case, you need to change the version number in the package.json file and try publishing again. Incorrect login credentials: The error could also occur if you are not logged in to npm with the correct credentials. Make sure you are logged in to the correct npm account before running the npm publish command. Network or proxy issues: Sometimes, network or proxy issues can prevent the npm client from accessing the registry. Try running the commands from a different network or disabling any proxies that might be in place. npm registry U...

Robot Framework pipeline with GitLab CI / CD

 Yes, it is possible to run your Robot Framework tests automatically once a day. To achieve this, you can use GitLab's Continuous Integration (CI) system and write a pipeline definition in a .gitlab-ci.yml file. Here is a basic example of what your .gitlab-ci.yml file could look like to run your tests once a day: image: python:3.8 stages:   - test test:   stage: test   script:     - pip install robotframework     - robot --outputdir output tests/   only:     - schedules schedules:   - cron: "0 0 * * *"     name: daily test In this example, the pipeline uses the Python 3.8 image from Docker Hub and installs the Robot Framework package using pip. The actual tests are then run with the robot command, which outputs the results to the output directory. The only section specifies that the pipeline should only run when triggered by the schedules rule. The schedules section sets a cron schedule to run the pipeline once a day ...

S3 blocked by CORS policy

The error message you're encountering is due to Cross-Origin Resource Sharing (CORS) policy. The issue occurs because the client (your Angular application running on localhost) is making a request to a different domain (your S3 bucket), which is not permitted by the browser's security policy. To resolve this issue, you can add a CORS policy to your S3 bucket that explicitly allows requests from your client's origin ( http://localhost:4200 ). Here's how: Open the Amazon S3 console Select your bucket Click on the Permissions tab Click on the CORS Configuration button Enter the following configuration: <CORSConfiguration>   <CORSRule>     <AllowedOrigin>http://localhost:4200</AllowedOrigin>     <AllowedMethod>GET</AllowedMethod>     <MaxAgeSeconds>3000</MaxAgeSeconds>     <AllowedHeader>Authorization</AllowedHeader>   </CORSRule> </CORSConfiguration> Save the changes Th...