Skip to content

Instantly share code, notes, and snippets.

@weverson83
weverson83 / congressman.php
Last active September 24, 2018 07:54
Congressman Most Projects proposals
/**
RESULTS
Array
(
[PROFESSOR PACCO] => 2
[VAIDON OLIVEIRA] => 7
[RENATO ANDRADE] => 10
[ROSSONI] => 13
[JARBAS VASCONCELOS] => 13
@weverson83
weverson83 / category_tree.php
Created July 17, 2017 18:10
Category Tree - PHPUnit Test Case
<?php
class CategoryTreeTest extends PHPUnit_Framework_TestCase
{
/**
* @return array
*/
public function getCategories(){
$root = [
'id' => 'root',
<?php
/**
* BSeller Platform | B2W - Companhia Digital
*
* Do not edit this file if you want to update this module for future new versions.
*
* @category Esmart
* @package Esmart_BSellerApi
*
* @copyright Copyright (c) 2016 B2W Digital - BSeller Platform. (http://www.bseller.com.br)
@weverson83
weverson83 / magento_simulate-paypal-ipn.php
Last active October 19, 2017 09:04
Simulates paypal Ipn request for a local Magento store
<?php
// SIMULATE PAYPAL IPN LOCALLY
//
// Sometimes you need to test on your local host and this can be difficult due
// to IP routing issues. Use this code on your local machine to simulate the
// same process that the sandbox IPN simulator does when posting to your URL.
//
// Run this code in command line or via the browser. It will post IPN data just
// like Paypal would. If the code you've written to process your IPN data
// posts back to the sandbox, it should come back as valid.