Skip to content

Instantly share code, notes, and snippets.

View guifavere's full-sized avatar

Guilherme de Favere guifavere

View GitHub Profile
@guifavere
guifavere / script.php
Created May 31, 2022 17:51
Flush magento 1.9 database
<?php
include_once('app/Mage.php');
// customers
function destroyAllCustomers() {
function destroyCustomer($customerId) {
Mage::getModel("customer/customer")->load($customerId)->delete();
}
@guifavere
guifavere / .php-cs-fixer.dist.php
Created April 22, 2022 13:00 — forked from tabacitu/.php-cs-fixer.dist.php
PHP-CS-Fixer Configuration File for the Laravel Code Style
<?php
/**
-----------------------------------------------------
Enforce the Laravel Code Style using PHP CS Fixer 3.x
-----------------------------------------------------
Credits go to Laravel Shift & Andreas Elia.
https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
@guifavere
guifavere / phpmd-ruleset.xml
Last active October 22, 2020 11:18 — forked from slayerfat/phpmd-ruleset.xml
php mess detector ruleset for laravel and similar frameworks
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Laravel and similar phpmd ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Inspired by https://github.com/phpmd/phpmd/issues/137
using http://phpmd.org/documentation/creating-a-ruleset.html
</description>
@guifavere
guifavere / scheme.css
Last active March 2, 2020 14:44
JsonView color scheme
body {
background-color: #1a1a1a;
color: #fff;
font-family: 'Ubuntu Mono';
font-size: 16px;
line-height: 1;
}
.property {
font-weight: bold;