Skip to content

Instantly share code, notes, and snippets.

View aleduca's full-sized avatar

Alexandre Eduardo Cardoso aleduca

View GitHub Profile
@aleduca
aleduca / rules.neon
Created May 21, 2024 17:34
rules.neon
rules:
- Symplify\PHPStanRules\Rules\ForbiddenExtendOfNonAbstractClassRule
- Symplify\PHPStanRules\Rules\Explicit\ExplicitClassPrefixSuffixRule
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule
- Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenSameNamedNewInstanceRule
- Symplify\PHPStanRules\Rules\NoAbstractMethodRule
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
- Symplify\PHPStanRules\Rules\NoEmptyClassRule
- Symplify\PHPStanRules\Rules\NoMissingDirPathRule
@aleduca
aleduca / powershell.txt
Last active May 6, 2024 03:47
Powershell - oh my posh
- Baixar o powershell: https://learn.microsoft.com/pt-br/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#winget
- NerdFont: https://www.nerdfonts.com/font-downloads
- Oh My Posh: https://ohmyposh.dev/
- Criar arquivo de config: .$PROFILE ou code $PROFILE
- Instalar PSReadline: Install-Module PSReadLine -AllowPrerelease -Force
- Instalar icones: Import-Module -Name Terminal-Icons
- Apelido para comandos:
function executeArtisanCli {
php artisan $args
}
@aleduca
aleduca / two-fonts-vscode.css
Created March 20, 2024 13:29
vscode with two fonts
.type.storage,.type.storage.declaration, .storage.class.modifier, .mtki {
font-family: 'Victor Mono';
font-size: 1.1em;
}
.type.storage.arrow.function {
font-family: 'JetBrains Mono'
}
.decorator.name, .decorator.punctuation:not(.block), .import.keyword {
{
"terminal.integrated.profiles.windows": {
"Cmder": {
"path": ["${env:windir}\\System32\\cmd.exe"],
"env": {
"CMDER_ROOT": "C:\\tools\\cmder"
},
"args": ["/k", "%CMDER_ROOT%\\vendor\\bin\\vscode_init.cmd"]
}
},
.cursors-layer .cursor {
/* background: linear-gradient(to bottom, #3edd04, #a1ff54); */
background: linear-gradient(to bottom, #c906ff, #ffd607);
}
{
"editor.cursorWidth": 5,
"vscode_custom_css.imports": ["file:///c:/tools/vscode/customCursors.css"],
}
<?php
namespace PHPSTORM_META;
override(
\PHPUnit\Framework\TestCase::createMock(0),
map(['' => "@&\PHPUnit\Framework\MockObject\MockObject"])
);
override(
\PHPUnit\Framework\TestCase::createStub(0),
<?php
$db = \Config\Database::connect();
$db->transStart();
$builder = $db->table('users');
$builder->where('id', 1);
$builder->update([
'firstName' => 'Alexandre'
]);
Listagem de clientes:
<!-- Content Row -->
<div class="row">
<div class="col-lg-12">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">CPF / CNPJ</th>
var numscore = [
{score: 100, resultados: [1,2,3]},
{score: 200, resultados: [4,5,6]}
]
var results = numscore.find(function(value,index){
return value.resultados.includes(3);
});
console.log(results.score);