Skip to content

Instantly share code, notes, and snippets.

View tarikmanoar's full-sized avatar
🎯
Focusing On Web Development

Tarik Manoar tarikmanoar

🎯
Focusing On Web Development
View GitHub Profile
@tarikmanoar
tarikmanoar / claude-switch.md
Created September 1, 2026 09:46
Claude Account Switch Guide

Claude officially stores the active login in:

/home/manoar/.claude/.credentials.json

with permissions 0600, so swapping that file can change which Claude account is active. ([Claude][1])

The one important detail is: don’t treat credentials-work.json and credentials-personal.json as permanent static backups. Claude refreshes OAuth tokens and can rewrite .credentials.json. If you later restore an old copy, its refresh token may already be stale. Recent Claude Code reports specifically show refresh-token rotation/stale-token problems around this file. ([GitHub][2])

@tarikmanoar
tarikmanoar / WebhookController.php
Created January 3, 2025 09:23
Courier Webhook Example
<?php
namespace App\Http\Controllers\Api\V2;
use App\Models\Order;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Actions\Order\DeliveryStatus;
class WebhookController extends Controller
@tarikmanoar
tarikmanoar / github-ci-cd-using-ftp.yml
Created December 25, 2024 14:19
Deploy Laravel Project using Github action to shared hosing
name: 🚀 Deploy to cPanel
on:
push:
branches:
- main
jobs:
FTP-Deploy-Action:
name: 🎉 Deploy
runs-on: ubuntu-latest
@tarikmanoar
tarikmanoar / github-ci-cd.yml
Last active April 9, 2025 03:34
This gist help you to deploy laravel application from github to your server using ssh
name: 🎉 Laravel Deploy
on:
push:
branches: [master]
workflow_dispatch: # Allow manual triggering
jobs:
deploy:
runs-on: ubuntu-latest
This file has been truncated, but you can view the full file.
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 15, 2024 at 02:18 PM
-- Server version: 10.6.7-MariaDB-2ubuntu1.1
-- PHP Version: 8.2.7
@tarikmanoar
tarikmanoar / laravel-server-setup.sh
Created September 21, 2024 15:47
This script help you to setup laravel prodcution ready by one click
#!/bin/bash
# Colors for output
GREEN='\033[0;32m'
NC='\033[0m'
# Function to update and upgrade system
update_system() {
echo -e "${GREEN}Updating and upgrading the system...${NC}"
sudo apt update -y && sudo apt upgrade -y
@tarikmanoar
tarikmanoar / DownCommand.php
Created August 20, 2024 02:03
Laravel php artisan down command
//vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
<?php
namespace Illuminate\Foundation\Console;
use App\Http\Middleware\PreventRequestsDuringMaintenance;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Foundation\Events\MaintenanceModeEnabled;
@tarikmanoar
tarikmanoar / vs_code_customization.md
Last active December 11, 2024 05:27
Customize VS code Interface

First Install Custom CSS and JS Loader

"vscode_custom_css.imports": [
  "file:///home/ds/vscode.css",
  "file:///home/ds/vscode.js"
]
@tarikmanoar
tarikmanoar / .htaccess
Last active June 4, 2024 02:03
Helpful .htaccess
// .htaccess for park main domain to a dir
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dir/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ dir/ [L]
@tarikmanoar
tarikmanoar / composer.json
Created March 20, 2024 08:50
Inserting Images (Like prothomalo.com)
Install Latest "intervention/image": "3.5.0",
composer require intervention/image 3.5.0