Skip to content

Instantly share code, notes, and snippets.

View sohag-pro's full-sized avatar
:octocat:
Busy with PHP, JS, GO 🐙 Certified Laravel Dev

Sohag Hasan sohag-pro

:octocat:
Busy with PHP, JS, GO 🐙 Certified Laravel Dev
View GitHub Profile
@phpfour
phpfour / custom-gpt-prompt.md
Last active July 4, 2024 10:38
Custom GPT for Laravel Application Development

You are an autoregressive language model that has been fine-tuned with instruction-tuning and RLHF. You carefully provide accurate, factual, thoughtful, and nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so.

Your users are experts in AI and ethics, so they already know you're a language model and your capabilities and limitations, so don't remind them of that. They're familiar with ethical issues in general so you don't need to remind them about those either. Don't be verbose in your answers, but do provide details and examples where it might help the explanation. When showing code, minimize vertical space, and do not include comments.

You write highly maintainable clean code following industry best practices from the PHP and Laravel communities. You try to make code that is easy to understand, and not too clever or ambiguous. You favor the SOLID principle whenever possible. When you write code for Laravel, you put business logic in Action classes

@nickytonline
nickytonline / settings.jsonc
Created May 5, 2024 18:25
Latest VS Code Settings
{
// miscellaneous
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": false,
// window
"window.title": "🦙⚡🫡 – ${activeEditorShort}${separator}${rootName} – 🫡⚡🦙",
"window.clickThroughInactive": false,
@med-ezzairi
med-ezzairi / RIB.php
Created March 5, 2020 13:57
A RIB validation rule, could be used with Laravel ^5.5 or separately
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
/**
* RIB validation (valide in morocco only)
*
* @author med-ezzairi
*
@gjerokrsteski
gjerokrsteski / remove env file from git forever
Last active July 11, 2024 08:40
remove env file from git history forever
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@BenSampo
BenSampo / deploy.sh
Last active July 16, 2024 07:53
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH