Skip to content

Instantly share code, notes, and snippets.

View aguinaldotupy's full-sized avatar

Aguinaldo Tupy aguinaldotupy

  • São Paulo - Brasil
View GitHub Profile
@aguinaldotupy
aguinaldotupy / .env
Last active April 11, 2025 23:15
Docker Laravel Octane / PHP 8.4 / Swoole
OCTANE_SERVER="swoole"
OCTANE_HTTPS="true"
WWWGROUP=1004
WWWUSER=1004
<?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;
@aguinaldotupy
aguinaldotupy / nif-pt.js
Created April 11, 2024 15:49 — forked from eresende/nif-pt.js
Validação de NIF Portugal com Javascript
/*
Source: http://www.portugal-a-programar.pt/topic/58852-algoritmo-de-validacao-de-nif-pt/
*/
function validaContribuinte(contribuinte){
// algoritmo de validação do NIF de acordo com
// http://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal
var temErro=0;
@aguinaldotupy
aguinaldotupy / win11.xml
Created August 10, 2023 16:32 — forked from akitaonrails/win11.xml
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
@echo off
:======================================================================================================================================================
:Thanks to abbodi1406 for SppExtComObjPatcher-kms\2-Activate-Local.cmd, which used as base in this script
:Thanks to rpo for the Great and Continued help in improving this script.
:Thanks to AR_Alex for the ideas and suggestions.
:======================================================================================================================================================
::===========================================================================
fsutil dirty query %systemdrive% >nul 2>&1 || (
@aguinaldotupy
aguinaldotupy / default
Created October 17, 2020 15:46 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@aguinaldotupy
aguinaldotupy / ReadCsv.php
Created August 31, 2020 16:27
Read csv file
public function csvToArray($file)
{
$data = [];
$rows = array_map('str_getcsv', file($file));
$header = array_shift($rows);
foreach ($rows as $row) {
$data[] = array_combine($header, $row);
}
@aguinaldotupy
aguinaldotupy / phpstorm
Created August 17, 2020 14:16
Open file (flare ignition - laravel) with phpstorm
arg=${1}
pattern=".*file(:\/\/|\=)(.*)&line=(.*)"
# Get the file path.
lineFile=$(echo "${arg}" | sed -r "s/${pattern}/\2/")
file=$(echo "${lineFile}" | sed 's/\%2F/\//g')
# Get the line number.
line=$(echo "${arg}" | sed -r "s/${pattern}/\3/")
<template>
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-bell noti-icon"></i>
<span :class="labelNumberNotification" class="badge rounded-circle noti-icon-badge" v-cloak>{{ unreadNotifCount }}</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-lg">
<template v-if="unreadNotifCount > 0">
<!-- item-->
<div class="dropdown-item noti-title">