Skip to content

Instantly share code, notes, and snippets.

View gfazioli's full-sized avatar
🏠
Working from home

Giovambattista Fazioli gfazioli

🏠
Working from home
View GitHub Profile
@gfazioli
gfazioli / gist:3718141
Last active October 10, 2015 16:27
Object Combine
<?php
/**
* Do a merge/combine between two object tree.
* If the old version not contains an object or property, that is added.
* If the old version contains an object or property less in last version, that is deleted.
*
* @brief Object delta compare for combine
*
* @param mixed $last_version Object tree with new or delete object/value
* @param mixed $old_version Current Object tree, loaded from serialize or database for example
@gfazioli
gfazioli / guru-meditation.js
Last active January 6, 2019 18:08
Tribute to Amiga - Software failure / Guru Meditation
/**
* Tribute to Amiga - Software failure / Guru Meditation
* Usage: GuruMeditation.display( 'Your custom message' );
*
* @class GuruMeditation
* @author =undo= <[email protected]>
* @copyright Copyright (C) 2012-2013 wpXtreme Inc. All Rights Reserved.
* @date 2014-02-04
* @version 1.0.2
*/
@gfazioli
gfazioli / shortcode-sample-1.html
Last active December 18, 2015 01:09
Bannerize HTML markup
[wpx_bannerize random="1"]
@gfazioli
gfazioli / catch-actions-and-filters.php
Created June 20, 2013 09:45
Print action or filters in WordPress
<?php
// Put on top in do_action() and apply_filters()
if( !isset( $GLOBALS['abcdefg'][$tag] ) ) {
$GLOBALS['abcdefg'][$tag] = true;
?><pre><?php printf( '-> %s', $tag ) ?></pre><?php
}
@gfazioli
gfazioli / mailchimp-widget.php
Last active December 30, 2015 03:29
Patch for MailChimp Widget
<?php
/*
Plugin Name: MailChimp Widget
Plugin URI: https://github.com/kalchas
Description:
Author: James Lafferty
Version: 0.8.12
Author URI: https://github.com/kalchas
License: GPL2
*/
@gfazioli
gfazioli / animate-add.css
Last active January 4, 2016 09:09
Animate.css jQuery Plugin
/* Use this additional style to hide element at start */
.animate
{
visibility : hidden;
}
.animated
{
visibility : visible;
}
@gfazioli
gfazioli / old_version_event.js
Last active October 28, 2024 16:21
WordPress: Actions & Filters in Javascript
/**
* This is the old version build by jQuery trigger event.
*
* DO NOT USE
*
*/
if ( typeof window.wpdk_add_action === 'undefined' ) {
/**
{
"personal_info" : {
"first_name" : "Giovambattista",
"last_name" : "Fazioli"
},
"emails" : [
"[email protected]",
],
"social" : {
"twitter" : "https://twitter.com/gfazioli",
@gfazioli
gfazioli / react-class.jsx
Last active February 10, 2016 12:54
React Class Template
/**
* $CLASS_DESCRIPTION$
*
* @class $CLASS_NAME$
* @author =undo= <[email protected]>
* @date $DATE_NOW$
* @version 1.0.0
*/
var $CLASS_NAME$ = React.createClass( {
@gfazioli
gfazioli / products.json
Created November 13, 2023 16:50
Sample of product list
[
{
"id": 1,
"name": "Men's Ski Jacket",
"description": "A high-performance ski jacket for men",
"price": 299.99,
"image": "https://source.unsplash.com/random/300×300",
"category": "Ski",
"brand": "The North Face",
"sku": "TNF-SKI-MJ01",