Skip to content

Instantly share code, notes, and snippets.

View rajibbinalam's full-sized avatar
🎯
Focusing

Rajib Bin Alam rajibbinalam

🎯
Focusing
View GitHub Profile
@rajibbinalam
rajibbinalam / zsh and oh my zsh setup.md
Last active January 14, 2025 07:16
zsh and oh my zsh for MacOS, Linux ( oh my zsh )

Install ZSH

sudo apt update
sudo apt install zsh -y
zsh --version

Install OH MY ZSH

curl:	  sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget:	  sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@rajibbinalam
rajibbinalam / install laravel valet and mysql on macOS.md
Created September 21, 2024 17:55
Install Laravel Valet and mysql on macOS

Laravel Valet Setup (Mac)

This will get you setup with Laravel & Valet on your Mac. Quentin Watt has a good video tutorial on getting setup here as well

Install Homebrew

Go to https://brew.sh/ and copy the command and run in your terminal

It will be something like this...

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@rajibbinalam
rajibbinalam / Install PHP, MySQL, nginx and Valet on macOS.md
Last active September 21, 2024 17:39
Install PHP, MySQL, nginx and Valet on macOS

Install HomeBrew if Needed

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install PHP

brew install php

Install Composer

@rajibbinalam
rajibbinalam / backup valet.md
Created August 15, 2024 05:33
Backup Databaes if MySql Error on MACBOOK => Resolve

Sometimes PHP or MySql having isssue or Errors, And then if web reinstall mysql all of old databaes will banish

Backup Before reinstall MySql

Step-1: goto /usr/local/var/mysql

using Terminal:

cd /usr/local/var/mysql
open .
@rajibbinalam
rajibbinalam / referral users with level.md
Created August 14, 2024 07:42
Refarral users with level

1. User have multiple refer users and each of refer users have multiple refer users as like Tree

Like:

Screenshot 2024-07-24 at 9 14 03 PM

2. User Model:

    public $allusers = [];
    
    public function referral(){
        return $this->belongsTo(User::class, 'referral_id');
@rajibbinalam
rajibbinalam / install apache php mysql phpmyadmin.md
Last active October 10, 2024 07:54
Install Apache, MySQL, PHP, Phpmyadminon on Linux
Note: # mean -> optional / Comment for a condition

INSTALL APACHE

sudo apt update
sudo apt install apache2
# sudo ufw app list
sudo ufw allow in "Apache"
# sudo ufw status
@rajibbinalam
rajibbinalam / install lamp on centOS server.md
Created November 26, 2023 19:05
Install LAMP (Linux, Apache, MySQL, PHP) stack On CentOS 7

Step 1 — Installing the Apache Web Server

sudo yum install httpd

sudo systemctl start httpd

to know your server’s public IP

ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
@rajibbinalam
rajibbinalam / install lamp.md
Last active November 26, 2023 19:12
How To Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7
@rajibbinalam
rajibbinalam / install multiple php in Linux.md
Last active January 5, 2025 11:12
Setup Multiple PHP on Linux (Zorin OS)

To install PHP 8.1 alongside PHP 7.4 on Zorin OS without uninstalling the existing version, you can follow these steps:

  1. Add Repository:

    sudo add-apt-repository ppa:ondrej/php

    This command adds the PHP repository maintained by Ondřej Surý, who provides up-to-date PHP packages for Ubuntu-based systems.

  2. Update Package List: