Skip to content

Instantly share code, notes, and snippets.

View giappv's full-sized avatar
💭
Drive Digital Transformation with HexaSync Integration Platform

Phan Vu Giap giappv

💭
Drive Digital Transformation with HexaSync Integration Platform
View GitHub Profile
@giappv
giappv / snippet.js
Created March 7, 2018 12:59 — forked from necolas/snippet.js
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
@giappv
giappv / magento-nginx.conf
Created January 19, 2018 05:49 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@giappv
giappv / magento-ee-customer-balance-to-amasty-store-credit.sql
Last active September 30, 2017 18:02
magento-ee-customer-balance-to-amasty-store-credit
insert into amasty_storecredit_customer_balance
select balance_id, customer_id, website_id, amount, null as base_currency_code, 0 as subscribe_updates
from enterprise_customerbalance;
truncate table amasty_storecredit_customer_balance_history;
insert into amasty_storecredit_customer_balance_history
select
history_id,
balance_id,