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 / deploy.sh
Last active February 3, 2026 11:48
Laravel 10 Deployment Gist
#!/bin/bash
#===============================================================================
# Laravel Deployment Script
# Version: 1.0
# Description: Automated deployment script for Laravel 10 applications
#===============================================================================
# Colors for output
RED='\033[0;31m'
@arif98741
arif98741 / ublock install.txt
Last active August 1, 2025 11:38
Ublock Origin Adblock installation process for Chrome
How is it Working ?
I Haven't done any of it !!
You can still use this extension! If you want to manually load this version, here are the instructions from the developer:
1. Enter chrome://flags in chrome's URL input
2. Search for "Allow legacy extension manifest versions"
3. Enable it and relaunch browser
4. Download the latest zip file of ublock version from github: (the following is the link of the latest releases) https://github.com/gorhill/uBlock/releases/latest
5. Download the chromium zip and extract it
6. Enter chrome://extensions in chrome's URL input to open the extension page in chrome, click the "Load Unpacked" button on top left side load (enable Developer Mode in the top right if it doesn't appear), then select the extracted file. Show less
@arif98741
arif98741 / ssh github action pipeline.txt
Created July 27, 2025 05:16
SSH Github action Deployment pipeline
name: Deployment to SSH Server
on:
push:
branches:
- dev
- production
pull_request:
branches:
- dev
# Nginx.conf
# Project 1(Path: /var/www/msdsl/shipment, Url: http://192.168.0.132)
# Project 2(Path: /var/www/msdsl/restora, Url: http://192.168.0.132/restora)
# Project 3(Path: /var/www/msdsl/tposreport, Url: http://192.168.0.132/tposreport)
server {
# Listing port and host address
# If 443, make sure to include ssl configuration for the same.
listen 80;
listen [::]:80;
@arif98741
arif98741 / getfile.php
Created January 30, 2025 06:55
get file
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Response;
function getFile($fileName)
{
// Check if the user is logged in
if (!Auth::check()) {
return response('Unauthorized', 401); // Return an unauthorized response
}
@arif98741
arif98741 / attendance_query.sql
Last active January 30, 2025 06:00
Attendance Table view QUery by Column and Row MySQL
SET @sql = NULL;
SET SESSION group_concat_max_len = 1000000;
SELECT
GROUP_CONCAT(DISTINCT
CONCAT(
'max(CASE WHEN ca.date = ''',
date_format(date, '%Y-%m-%d'),
''' THEN coalesce(p.status, ''P'') END) AS `',
date_format(date, '%Y-%m-%d'), '`'
@arif98741
arif98741 / PostTest.php
Created January 12, 2025 13:12
PostTestCase File
<?php
namespace Tests\Unit;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Models\Post;
class PostTest extends TestCase
{
@arif98741
arif98741 / social share
Created November 5, 2024 14:25
Gist for Social Share
<div class="row">
<div class="col-md-12">
<!-- Social Media Share Buttons -->
<div class="mt-2">
<h4>Share this post:</h4>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode(url()->current()) }}" target="_blank" class="btn btn-primary btn-sm my-2 btn-social">
<i class="fab fa-facebook-f"></i>&nbsp;Facebook
</a>
<a href="https://api.whatsapp.com/send?text={{ urlencode($singlePost->title . ' ' . url()->current()) }}" target="_blank" class="btn btn-success btn-sm btn-social">
<i class="fab fa-whatsapp"></i>&nbsp;WhatsApp
@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 / combination-2-dimention.js
Created March 21, 2024 18:19
Print Combination using Javascript using two dimentional array
let colorsSizes = [["Red","Blue","Black"],["M","L","XL"]];
for (let i = 0; i < colorsSizes[0].length; i++) {
for (let j = 0; j < colorsSizes[1].length; j++) {
console.log(colorsSizes[0][i] + " - " + colorsSizes[1][j]);
}
}
Red - M
Red - L
Red - XL