Skip to content

Instantly share code, notes, and snippets.

View edisoncosta's full-sized avatar

Edison Costa edisoncosta

View GitHub Profile
@edisoncosta
edisoncosta / gist:8a85384a2c126e2a15bb4c77208fd5f9
Last active March 8, 2024 19:19
Correção pagarme (woocommerce-pagarme/includes/class-wc-pagarme-api.php)
public function ipn_handler() {
@ob_clean();
$ipn_response = ! empty( $_POST ) ? $_POST : false;
$valid_ip = '34.231.60.225';
$remote_ip = $_SERVER['REMOTE_ADDR'];
// Verifica se a resposta IPN não está vazia e se o IP do remetente é igual ao IP válido
if ( $ipn_response && $remote_ip == $valid_ip ) {
@edisoncosta
edisoncosta / readme.md
Created March 27, 2016 17:54 — forked from rahul286/moved.md
woo-commerce fastcgi-cache session-conflict solution (attempt)

You can jump to code directly

How it works?

1. Cache product pages

Following line does't have /products.* page. This tells Nginx to cache all product pages by default.

Idea is fast loading product pages will improve scalability of a store and also conversion.

@edisoncosta
edisoncosta / hhvm.conf
Created December 11, 2015 00:19 — forked from pjv/hhvm.conf
Ubuntu 14.04 upstart script for HHVM
# hhvm - HipHop VM
#
# The HipHopVM server provides a high performance PHP stack and web server.
# modified by pjv from original found here: http://stackoverflow.com/questions/19013516/upstart-script-for-hhvm-hiphop
description "HHVM server"
author "pjv https://gist.github.com/pjv/2e9ab32d8d9884bf79a4"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]