Skip to main content

Welcome to Key2Goal

It's a Tech Blog
hero-image
techoptions-img

Blog Posts

techoptions-img
Wordpress

Using JS is one way we can achieve that,

Firstly add below code into your theme function.php

function add_scripts_editor(){
    wp_enqueue_script('mytheme', get_stylesheet_directory_uri() . '/js/mytheme.js', array('jquery'), '', true );
}
add_action('admin_enqueue_scripts', 'add_scripts_editor');

Then create mytheme.js into your js folder and add the below code into it. Now open any POST/PAGE type and your Back Button is added, you can add any link to it to navigation to your user he want to go back.

techoptions-img
Windows

Hey there,

today I got the interesting issue of symbolic in windows while working on the Drupal project, so I think to share with everyone how I fixed it quickly, so if any one else getting the same he can fix it too..

Let's start....

So, below are the screenshot of what I got as error, Actually I am working on my favorite Drupal project with xampp and installing modules using composer, inbetween somewhere windows required to create the symbolic link and normal command line does not have the access to it so it throw the error.

techoptions-img
AppScript

Hello, today we will see how we can upload the data in a Google spreadsheet using Google App script. So let's start

We need to follow the 5 steps for doing that:

Step 1. Create a spreadsheet on Google Spreadsheet, log in to your account, and create a spreadsheet. Once that is done Copy the URL of the spreadsheet from the address bar that we can use in Step 2.

techoptions-img
Other

Creating a web application involves several steps and considerations. Here's a general algorithmic approach to guide you through the process:

  • Identify Requirements and Scope:

    1. Determine the purpose and goals of your web application.
    2. Define the functionality, features, and target audience.
    3. Consider any technical constraints or limitations.
  • Design the User Interface (UI):

techoptions-img
Javascipt

Creating a for loop and a while loop in JavaScript using below simple example:

// Example: Printing numbers from 1 to 5 using a for loop
for (let i = 1; i <= 5; i++) {
  console.log(i);
}

In this example, the for loop iterates over the values of i from 1 to 5. It prints the value of i in each iteration using console.log().

While Loop:

techoptions-img
Other

Bypassing reCAPTCHA in automation testing is not recommended or encouraged as it goes against the intended purpose of reCAPTCHA, which is to protect websites from automated bots and ensure the security of user interactions. reCAPTCHA serves as a security measure to prevent abuse and maintain the integrity of online systems.

Automation testing should focus on testing the functionality and user experience of a website or application, rather than attempting to bypass security measures. It's important to respect the ethical considerations and follow best practices for testing.

techoptions-img
PHP

Simple calculator program in PHP that performs basic arithmetic operations:

techoptions-img
Python

Below an example of a Python script that checks the battery status on a Windows system:

techoptions-img
Drupal

Set up a multisite configuration in Drupal 9, you can follow these steps:

  1. Prepare the Environment:

    1. Ensure that you have a working Drupal 9 installation.
    2. Set up separate directories for each multisite installation.
    3. Assign a unique database for each multisite.
  2. Configure the Web Server:

techoptions-img
Artificial intelligence

Creating your own artificial intelligence (AI) program involves several steps and considerations. Here is a general guide to get you started:

  1. Define the Objective: Determine the specific problem or task you want your AI program to address. This could include tasks like image recognition, natural language processing, recommendation systems, or autonomous decision-making.

techoptions-img
GIT

Here are ten useful Git commands along with examples:

  1. git init: Initializes a new Git repository in the current directory.

    git init
    
  2. git clone: Creates a local copy of a remote repository.

    git clone <repository_url>
    
  3. git add: Adds file(s) to the staging area for the next commit.

techoptions-img
Server

To configure a load balancer in Google Cloud Platform (GCP), you can utilize the Google Cloud Load Balancing service. Here's a general overview of the steps involved in setting up a load balancer in GCP:

  1. Create Backend Services:

    • Create one or more Backend Services that define the instances or groups of instances serving the traffic behind the load balancer.
    • Specify health checks to monitor the health and availability of the instances.
  2. Configure a Load Balancer:

techoptions-img
Server

Load balancers are devices or software components that distribute incoming network traffic across multiple servers or resources to optimize performance, increase reliability, and ensure high availability of websites or applications. They act as a mediator between clients and servers, efficiently distributing requests to maintain a balanced workload.

Load balancers primarily serve two purposes:

techoptions-img
MySQL

MySQL joins allow you to combine rows from multiple tables based on a related column between them. They are used to retrieve data from multiple tables simultaneously, enabling you to create more complex queries and extract meaningful information. MySQL supports various types of joins, including INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN. Here's a detailed explanation of each join type:

  1. INNER JOIN:

techoptions-img
Xampp

To create a virtual host (vhost) using XAMPP, you'll need to follow these steps:

Step 1: Open the Apache configuration file

  1. Locate the httpd-vhosts.conf file in the XAMPP installation directory. By default, it's located at C:\xampp\apache\conf\extra\httpd-vhosts.conf.
  2. Open the file in a text editor.

Step 2: Configure the virtual host

  1. Add the following code at the end of the file to define your virtual host:

techoptions-img
Python

Hi again, we will see how you can play songs using python code so let's begin

To play songs using Python, you can utilize the pygame library, which provides multimedia capabilities. Here's an example of how you can play a song using pygame:

techoptions-img
DevOps

Hey Guys, 

we are back with the new article, it's not a new topic as terraform is a very popular tool and widely used by many users and developers specifically DevOps developers. we will see how you guys install the terraform on the windows and use it very fast. Just need to follow the steps.
Let's begin ...

Step 1: Install the terraform binary to your machine. for that 

Go to this link https://developer.hashicorp.com/terraform/downloads and download "AMD64"

techoptions-img
GIT

 

Git commands:

1) git init : This command is used to start a new repository

2) git clone : This command is used to obtain a repository from an existing URL

3) git add : This command adds a file to the staging area

4) git commit : This command records or snapshots the file permanently in the version history

5) git push : This command sends the committed changes of master branch to your remote repository.

techoptions-img
Command line

Hey there,

We all know that when we want to delete the extra large folders and folders of programming files from windows is very time-consuming. so today we see how to do that in a fast way. To be honest it will take time but not as much that the normal process will do.

So Let's see that  - 

1. Open that folder on windows files

 image

techoptions-img
Drupal 8

Hey, Drupal 8 or Drupal 9 allow you override the template, so you can able to apply styling and structured the html in better way. So many of the templates override options are available in drupal and you can see here for page template, html twig template, region template, block template, node template etc etc