Skip to content

Instantly share code, notes, and snippets.

View arif98741's full-sized avatar
🏠
Actively Working

Ariful Islam arif98741

🏠
Actively Working
View GitHub Profile
@arif98741
arif98741 / lemp_stack.text
Created January 14, 2023 21:27
LEMP Stack Setup PHP 8.1, Nginx, MySQL, Git, Composer
LEMP Stack Setup - Ubuntu
=================================Install Nginx ==========================
sudo apt update
sudo apt install nginx
sudo ufw status
sudo ufw app list
i. sudo ufw allow 'Nginx Full'
ii. sudo ufw allow 'OpenSSH'
@arif98741
arif98741 / providers_list.json
Last active December 19, 2022 17:37
Gist for Providers
{
"id": 22,
"full_name": "Azizul Hakim",
"email": "[email protected]",
"phone": "01711111111",
"gender": "Female",
"role_id": 3,
"user_slug": "provider-1",
"profile_photo": "https://takecare.ltd/storage/uploads/user_file/service1647145932622d73cc4a0a1.jpg",
"speciality_id": 2,
@arif98741
arif98741 / MailConfigServiceProvider.php
Last active December 11, 2022 09:19
Multiple SMTP Configuration for sending mail . The mail purpose of using this is use to send mail using individual smtp for individual user
<?php
namespace App\Providers;
use Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;
class MailConfigServiceProvider extends ServiceProvider
{
@arif98741
arif98741 / file.sql
Created December 6, 2022 09:04
Sql qUERY
/*CREATE TABLE posts (
id int NOT NULL,
title varchar(255) NOT NULL,
PRIMARY KEY (id)
);*/
/*CREATE TABLE view_table (
id int NOT NULL,
post_id int NOT null,
view_col int default 0
<html>
<head>
<title>Disable Back Button in Browser - Online Demo</title>
<style type="text/css">
body, input {
font-family: Calibri, Arial;
}
</style>
<script type="text/javascript">
window.history.forward();
@arif98741
arif98741 / centos7-nginx-laravel-configuration
Created November 26, 2022 21:25 — forked from breekoy/centos7-nginx-laravel-configuration
Configuration steps on CentOS7 server to run Laravel applications + Redis and Node.JS on nginx
==== CENTOS 7 LEMP STACK INSTALLATION ====
0. Make sure the centos 7 server have internet connection
1. Install the EPEL Repository
sudo yum -y install epel-release
2. Install the Remi Repository
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
3. Install Nginx
@arif98741
arif98741 / quarter date carbon.php
Last active November 17, 2022 10:06
This is a file of r & d for starting date of current quarter, ending date of current quarter , starting date of previous quarter , ending date of previous quarter.
<?php
echo "start of current quarter date: ";
$startofQuarter = Carbon::now()->startOfQuarter();
echo $startofQuarter;
echo "\n";
echo "end of current quarter date: ";
$startofQuarter = Carbon::now()->endOfQuarter();
echo $startofQuarter;
echo "\n";
@arif98741
arif98741 / CustomRoute.php
Last active November 9, 2022 07:15
Custom Route Facades in Laravel along with Route.php
<?php
//app/Facades/CustomRoute.php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
/**
* @method static \Illuminate\Routing\PendingResourceRegistration apiResource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Routing\PendingResourceRegistration resource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Routing\Route any(string $uri, array|string|callable|null $action = null)
@arif98741
arif98741 / AuthController.php
Last active November 7, 2022 10:36
Api\AuthController
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
@arif98741
arif98741 / mysql query.sql
Last active November 2, 2022 12:00
query database
show tables;
select * from orders;
select * from orders order by orders_id desc limit 5;
-- MySQL dump 10.13 Distrib 5.7.33, for Win64 (x86_64)
--
-- Host: localhost Database: student
-- ------------------------------------------------------
-- Server version 5.7.33