Recent Posts

Featured image for Creating A Bash Alias For Php Artisan

Creating A Bash Alias For Php Artisan

In Bash, you can create aliases to simplify and automate common commands. The alias you want to create is for the php artisan command, which is often used in Laravel projects. Here are the steps to create a Bash alias for php artisan:

  1. Open Your Bash Configuration File:

    To create a system-wide alias that applies to all users, you should modify the /etc/bashrc or /etc/bash.bashrc file. You’ll typically need root or superuser privileges to edit these files. Use a text editor to open the file, for example:

    bash
    1
    
    sudo nano /etc/bashrc

    Alternatively, you can use any text editor you prefer, such as vim, emacs, or gedit.

  2. Add the Alias:

    Inside the configuration file, add your alias definition. In this case, you want to create an alias called artisan for the php artisan command. Add the following line:

    bash
    1
    
    alias artisan='php artisan'

    Your /etc/bashrc file should now include this alias.

  3. Save and Exit:

    Save the changes you made to the configuration file and exit the text editor.

  4. Apply the Changes:

    To apply the changes immediately, you can either restart your terminal or run the following command:

    bash
    1
    
    source /etc/bashrc

    This will reload the Bash configuration, and your artisan alias will be available for all users on the system.

Featured image for Fixing Seed Class not found Exception in Laravel 5

Fixing Seed Class not found Exception in Laravel 5

When working with Laravel 5 and attempting to run a database seed, you may encounter a “Seed Class not found” exception. This error typically occurs when Laravel is unable to locate the specified seed class. However, there is a straightforward solution to this problem. In this blog post, we will explore the steps to resolve the “Seed Class not found” exception in Laravel 5.

Step 1: Run Composer Dump-Autoload

The first step is to run the following command in your project’s root directory:

Featured image for Troubleshooting Ativ Smart PC Pro USB Detection Issue When Booting to Device

Troubleshooting Ativ Smart PC Pro USB Detection Issue When Booting to Device

If you’re encountering issues with your Ativ Smart PC Pro not detecting USB devices when trying to boot from them, one potential solution is to disable the Fast BIOS setting in the BIOS Advanced Menu. This guide will walk you through the steps to resolve this issue.

Background

The Fast BIOS setting, also known as Fast Boot or Quick Boot, is designed to reduce the time it takes for your computer to boot into the operating system by skipping certain hardware checks and initialization processes. While this can speed up the boot process, it may also cause compatibility issues with certain USB devices when trying to boot from them.

Featured image for How to Build an Android Jar Library

How to Build an Android Jar Library

To build an Android Jar library, you can follow these steps:

  1. Create a build.xml file with the following content:
xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<project name="AndroidUtils" default="dist" basedir=".">
    <description>Android Sample Library</description>
    
    <!-- Setting global properties for this build -->
    <property name="src" location="src" />
    <property name="bin" location="bin" />

    <target name="dist">
        <jar destfile="android-utilities-v1.jar" basedir="bin/classes">
            <!-- Use ** to include the directory recursively -->
            <include name="android/**" />
            <exclude name="android/utilities/v1/R.class" />
            <exclude name="android/utilities/v1/R$*.class" />
        </jar>
    </target>
</project>
  1. Save the build.xml file in the root directory of your Android library project.

  2. Install Apache Ant on your system if you haven’t already. Ant is a build tool that can compile and package your Java code into a Jar file. You can download Ant from the Apache Ant website.

  3. Open a command prompt or terminal and navigate to the root directory of your Android library project.

  4. Run the following command to build the Jar file using Ant:

Featured image for Merging Git Without History and Resolving Conflicts Using Theirs

Merging Git Without History and Resolving Conflicts Using Theirs

When merging Git branches, it is sometimes desirable to combine the changes from one branch into another without preserving the commit history of the merged branch. Additionally, conflicts may arise during the merge process that need to be resolved using the “theirs” strategy, which means accepting the changes from the branch being merged in.

Here’s a step-by-step guide on how to perform such a merge:

Step 1: Perform the Merge with Squash

To merge the changes from one branch into another without preserving the commit history, you can use the --squash option with the git merge command. The --squash option condenses all the commits from the merged branch into a single commit in the target branch.