Skip to content

Instantly share code, notes, and snippets.

View joaopaulolndev's full-sized avatar
🎯
Always looking for a good project

João Paulo Leite Nascimento joaopaulolndev

🎯
Always looking for a good project
View GitHub Profile
@joaopaulolndev
joaopaulolndev / AdminPanelProvider.php
Created March 26, 2025 14:41 — forked from afsakar/AdminPanelProvider.php
Filter for navigation items in FilamentPHP
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\View\PanelsRenderHook;
use Illuminate\Support\Facades\Blade;
public function panel(Panel $panel): Panel
{
@joaopaulolndev
joaopaulolndev / git-ssh-error-fix.sh
Created March 1, 2025 16:32 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@joaopaulolndev
joaopaulolndev / README.md
Created October 12, 2024 11:34 — forked from lucacastelnuovo/Filament V3 - Print Pop-Up.md
Filament V3 - Print Pop-Up

Filament V3 - Print Pop-Up

This code allows you to show a pop-up to print a "PDF" (rendered html) without first having to open the PDF viewer and requiring the user to press the print button.

[
{
"id": 1,
"state_id": 1,
"ibge_code": 1100015,
"name": "Alta Floresta D´oeste"
},
{
"id": 2,
"state_id": 1,
@joaopaulolndev
joaopaulolndev / settings.json
Created September 4, 2024 13:48 — forked from saade/settings.json
vscode settings
{
"workbench.iconTheme": "symbols",
"git.autofetch": true,
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [80],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
@joaopaulolndev
joaopaulolndev / tutorial.php
Created September 4, 2024 13:25 — forked from renatofrota/tutorial.php
Seletor de idioma no Filament 3 com auto-detecção de idioma
<?php
// app/providers/Filament/AdminPanelProvider.php
->spa()
->spaUrlExceptions(['*/lang/*'])
->middleware([SetLang::class])
->renderHook(
name: PanelsRenderHook::USER_MENU_PROFILE_AFTER,
hook: fn (): View => view(view: 'filament.hooks.lang-switcher'),
<?php
namespace App\Providers;
use Filament\Actions;
use Filament\Forms;
use Filament\Infolists;
use Filament\Notifications\Notification;
use Filament\Pages;
use Filament\Support\Enums\MaxWidth;