Skip to content

Instantly share code, notes, and snippets.

View saade's full-sized avatar
🦒
FilamentPHP evangelist

Guilherme Saade saade

🦒
FilamentPHP evangelist
View GitHub Profile
[
{
"id": 1,
"state_id": 1,
"ibge_code": 1100015,
"name": "Alta Floresta D´oeste"
},
{
"id": 2,
"state_id": 1,
@saade
saade / FilamentServiceProvider.php
Last active April 13, 2025 16:32
My Filament Defaults
<?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;
@saade
saade / settings.json
Created July 30, 2024 00:05
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",
@saade
saade / vapor.Dockerfile
Created May 28, 2024 01:52 — forked from mateusjatenee/vapor.Dockerfile
Vapor Dockerfile to install Ghostscript and Imagick while the PECL package is broken
FROM laravelphp/vapor:php83
ARG IMAGICK_VERSION=3.7.0
RUN apk --update add \
ghostscript && \
rm /var/cache/apk/*
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
@saade
saade / Gov.js
Last active July 4, 2024 14:52
Webview scripts
const observer = new MutationObserver(async () => {
if (window.location.pathname !== '/form') return;
const user = await window.flutter_inappwebview.callHandler("user");
if (!user) {
alert("Você não está logado.");
}
function getReactProps (el) {
@saade
saade / ShadeGenerator.php
Created October 28, 2022 20:39
Tailwindcss Shade Generator PHP
<?php
namespace App\Support;
use Exception;
use Spatie\Color\Hex;
use Spatie\Color\Rgb;
class ShadeGenerator
{
@saade
saade / .bashrc
Created March 18, 2022 17:54
Switch php versions in Laravel Valet
phpv() {
valet stop
brew unlink [email protected] [email protected]
brew link --force --overwrite $1
brew services start $1
composer global update
rm -f ~/.config/valet/valet.sock
valet install
}
@saade
saade / If above does not work.txt
Created February 6, 2022 21:42
Fix WSL ethernet connection.
=============================================================================
FIX WSL2 NETWORKING IN WINDOWS 10
=============================================================================
cmd as admin:
wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
@saade
saade / puntu-export.js
Last active January 3, 2022 13:42
Puntu CSV Export
const controller = new AbortController()
const timeoutId = setTimeout(() => controller.abort(), 1000 * 60)
const date = new Date();
const m = parseInt(prompt('Digite o mês que deseja exportar', date.getMonth() + 1)) - 1;
const y = prompt('Digite o ano que deseja exportar', date.getFullYear());
if( window.location.host !== 'app.puntu.com.br' ) {
prompt('Para usar o script, vá para o Puntu Web.', 'https://app.puntu.com.br');
@saade
saade / gist:666493b9cc05ab28de5f7766e36157ed
Created July 14, 2021 15:02
Delete all workflow runs
user=GH_USERNAME repo=REPO_NAME; gh api repos/$user/$repo/actions/runs \
--paginate -q '.workflow_runs[] | select(.head_branch != "master") | "\(.id)"' | \
xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE