Skip to content

Instantly share code, notes, and snippets.

View oralunal's full-sized avatar

Oral ÜNAL oralunal

View GitHub Profile
@marcofbb
marcofbb / command-varnish.sh
Last active June 13, 2024 18:22
TOP and Logs command varnish 4
# Muestro las URL que se envian al backend
varnishtop -i BereqURL
# Muestro los host de peticiones al back
varnishtop -b -I BeReqHeader:Host
# Muestro todas URL peticionadas
varnishtop -i requrl
# Mostrar peticiones metodo
@renancmfreitas
renancmfreitas / gist:01cb079755c9998c3b0dfd226a16e881
Created July 10, 2016 14:31
WooCommerce Auto Restore Stock (modified) - Add function restore pending order
<?php
/**
* Plugin Name: WooCommerce Auto Restore Stock
* Plugin URI: http://gerhardpotgieter.com/tag/woocommerce-auto-restore-stock
* Description: Auto restore stock when orders are cancelled
* Version: 1.0.1
* Author: Gerhard Potgieter
* Author URI: http://gerhardpotgieter.cim
* License: GPL2
*/
@derekclee
derekclee / default.vcl
Last active June 11, 2024 19:51
Varnish Cache Set CORS headers
sub vcl_deliver {
if (req.url ~ "/fonts/") {
set resp.http.Access-Control-Allow-Origin = "*";
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS";
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token";
}
}