Recent Posts

Featured image for How to Install PHP on Windows and Enable Modules

How to Install PHP on Windows and Enable Modules

In this guide, we will walk you through the process of installing PHP on a Windows machine using Chocolatey (choco) package manager. We will also show you how to enable the necessary modules in the php.ini configuration file to run popular PHP applications like the Laravel framework.

Prerequisites

Before you begin, make sure you have the following prerequisites in place:

Featured image for Maven Could Not Detect Google Cloud SDK on Eclipse

Maven Could Not Detect Google Cloud SDK on Eclipse

If you’re encountering an issue where Maven cannot detect the Google Cloud SDK on Eclipse, there are a few solutions you can try to resolve the problem. In this blog post, we will explore three different solutions that you can use to fix this issue.

Solution 1: Use Automator Script

The first solution involves using an Automator script to set the GOOGLE_CLOUD_SDK_HOME environment variable before launching Eclipse. Follow the steps below:

Featured image for Setting Up Environment Variables on macOS Yosemite Using Launch Agent

Setting Up Environment Variables on macOS Yosemite Using Launch Agent

In previous releases of macOS (Mavericks, Mountain Lion, Lion, …), configuring environment variables required editing the /etc/launchd.conf file. However, starting from macOS Yosemite, this method is no longer effective. To successfully configure environment variables on Yosemite and later versions, follow these steps:

  1. Create a Launch Agent Property List (plist) File: Create a plist file named my.startup.plist in the ~/Library/LaunchAgents/ directory. This directory is specific to user-based launch agent configurations.

  2. Define the Plist Structure: The content of the my.startup.plist file should adhere to the XML-based property list format. This format is used to specify various attributes that dictate the behavior of launch agents.

  3. Configure Plist Keys and Values:

    • Use the <key> and <string> elements to define keys and string values within the plist.
    • Utilize the Label key to assign a unique identifier to the launch agent, such as my.startup.
    • Under the ProgramArguments key, provide an array of strings representing the shell command to be executed.
      • The first string, sh, indicates that the subsequent command should be executed by the shell.
      • The second string, -c, signals that a command will follow.
      • The third string contains the actual command responsible for setting the environment variable using the launchctl setenv command.
  4. Set Environment Variables: Use the launchctl setenv command to set environment variables. This command requires two arguments: the name of the variable ($VARIABLE_NAME) and its corresponding value ($VARIABLE_VALUE). The shell will execute this command when the Launch Agent is loaded.

  5. Enable Execution at Login: Set the RunAtLoad key to <true/> within the plist. This ensures that the Launch Agent is executed when the user logs in.

Featured image for Docker Command Remove / Clean Up

Docker Command Remove / Clean Up

When working with Docker, it’s essential to clean up unused containers, images, and other resources to free up disk space and keep your system tidy. Here are three options for cleaning up Docker resources:

Option 1: Using docker-clean

You can use a third-party tool called docker-clean to help you clean up Docker resources more efficiently. This tool provides a simple command to remove stopped containers, dangling volumes, and unused images.

Featured image for Solving Laravel HTTPS to HTTP Proxy Issue

Solving Laravel HTTPS to HTTP Proxy Issue

When you’re dealing with a setup where a client communicates with an SSL load balancer over HTTPS, and the load balancer talks to a backend server over HTTP, you might encounter issues with Laravel generating URLs with an http:// schema. To address this issue, you can implement the following workaround:

Step 1: Modify routes.php

Open your Laravel project’s routes.php file and add the following code snippet at the top of the file:

Featured image for Understanding Docker Run Arguments: -i, -t, and --attach

Understanding Docker Run Arguments: -i, -t, and --attach

When working with Docker, you often use various command-line arguments to customize the behavior of containers when they are launched. Three commonly used arguments are -i, -t, and --attach. These arguments are often used together, and they serve different purposes in controlling how your container interacts with the terminal and user input.

-i - Interactive Mode

The -i flag stands for “interactive.” When you include this flag in your docker run command, it tells Docker to keep STDIN (standard input) open, allowing you to interact with the container’s command or application. Here’s what it means in more detail: