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 / 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 / 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
@arif98741
arif98741 / index.html
Last active January 27, 2024 07:44
soemthign
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
@arif98741
arif98741 / supervisor-install.txt
Created December 11, 2023 07:51
Install Supervisor for Running Laravel Background Job
sudo apt-get install supervisor
sudo systemctl stop supervisor
sudo systemctl start supervisor
sudo systemctl status supervisor
sudo nano /etc/supervisor/conf.d/laravel-queue-project1.conf
[program:laravel-queue-project1]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/project1/artisan queue:work --queue=default --sleep=3 --tries=3 --max-time=3600
@arif98741
arif98741 / gitlab-runner.yml
Created September 11, 2023 11:52
Gitlab Runner
stages:
- build
- test
- deploy
variables:
APP_NAME: "your-app-name"
SERVER_USER: "your-server-user"
SERVER_HOST: "your-server-host"
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@arif98741
arif98741 / laravel root composer.json for packge dev
Last active September 19, 2023 10:29
Laravel Root Package Composer.json
//////////project composer.json////////////
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"repositories": {
"demo-package": {
@arif98741
arif98741 / ContactController.php
Last active March 22, 2023 18:45
Add Custom Column to Yajra Datatable
/**
* @return JsonResponse
* @throws \Exception
*/
public function index(Request $request)
{
if ($request->ajax()) {
$data = Contact::with(['user'])->where('created_by', self::getUserId())
->orderBy('created_at', 'desc');
return Datatables::of($data)
@arif98741
arif98741 / curly brace sms template.php
Created March 19, 2023 13:30
Curly Brace Sms Template PHP
$template = "I am {{name}}, and I work for {{company}}. I am {{age}} years old.";
# Your template tags + replacements
$replacements = array(
'name' => 'Jeffrey',
'company' => 'Microsoft Inc Pvt Ltd.',
'age' => 27
);
function bind_to_template($replacements, $template) {
@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": "provider1@gmail.com",
"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,