Skip to content

Instantly share code, notes, and snippets.

View erickcomp's full-sized avatar

Erick de Azevedo Lima erickcomp

  • Fundação CECIERJ
  • RJ - Brazil
  • 13:23 (UTC -03:00)
View GitHub Profile
@mithicher
mithicher / tom-select.blade.php
Last active October 25, 2024 19:29
Tom Select Livewire Blade Component
/* Component Usage
// Data for options
$users = \App\User::limit(6)->get()->transform(fn($user) => [
'id' => $user->id,
'title' => $user->name,
'subtitle' => $user->email
]);
// Usage in view
@cmtickle
cmtickle / magento2-removed-payment-stub.md
Last active January 11, 2025 10:31
Magento 2 - Enable viewing of orders which contain a removed payment method.

Magento 2

Unable to view historical orders if a payment method is removed.

If you remove a payment method in Magento 2 you will be unable to view orders which have been placed using that payment method in the admin and customer dashboard.

The error logs will show a message similar to the below:

[2020-01-23 10:27:34] main.CRITICAL: Class Magenest\Stripe\Model\StripePaymentMethod does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magenest\\Stripe\\Model
StripePaymentMethod does not exist at /var/www/vhosts/some_customer/vendor/magento/framework/Code/Reader/ClassReader.php:19
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@MacDada
MacDada / ShowBlogPostsController.php
Last active April 9, 2022 21:38
PHP: Use Case architecture example
<?php
class ShowBlogPostsController
{
/**
* @param ShowBlogPostUseCase
**/
private $useCase;
/**
@manuholiveira
manuholiveira / CID10.SQL
Last active March 28, 2025 12:20
Carga para inserir todos os registro do CID10
This file has been truncated, but you can view the full file.
INSERT INTO CID10 VALUES ('A00.0','Cólera devida a Vibrio 01, biótipo ');
INSERT INTO CID10 VALUES ('A00.1','Cólera devida a Vibrio 01, biótipo El Tor');
INSERT INTO CID10 VALUES ('A00.9','Cólera não especificada');
INSERT INTO CID10 VALUES ('A01.0','Febre tifóide');
INSERT INTO CID10 VALUES ('A01.1','Febre paratifóide A');
INSERT INTO CID10 VALUES ('A01.2','Febre paratifóide B');
INSERT INTO CID10 VALUES ('A01.3','Febre paratifóide C');
INSERT INTO CID10 VALUES ('A01.4','Febre paratifóide não especificada');
INSERT INTO CID10 VALUES ('A02.0','Enterite por salmonela');

Some HTML:

<html>
<head>
  <title>Book-O-Rama - New Book Entry</title>
</head>

<body>