Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Hailong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Hailong / my.cnf
Created Jun 29, 2019 — forked from kenelliott/my.cnf
16CPU / 16GB My.cnf
View my.cnf
nice = -15
max_binlog_size = 256M #max size for binlog before rolling
expire_logs_days = 1 #binlog files older than this will be purged
## Per-Thread Buffers * (max_connections) = total per-thread mem usage
thread_stack = 256K #default: 32bit: 192K, 64bit: 256K
sort_buffer_size = 1M #default: 2M, larger may cause perf issues
Hailong / Index.php
Last active May 9, 2019
Fix ShipStation plugin for Magento 2.3
View Index.php
namespace Auctane\Api\Controller\Auctane;
use Exception;
use Magento\Framework\App\CsrfAwareActionInterface;
use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\RequestInterface;
class Index extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface
Hailong / 000 - Magento .gitignore
Created Dec 11, 2018 — forked from dfelton/000 - Magento .gitignore
.gitignore for Magento 1.9 projects
View 000 - Magento .gitignore
# Magento stuff.
Hailong / gist:2f0b4dfc983dab2b73358716eb7d1220
Created Sep 6, 2017 — forked from elebescond/gist:1433137
Generate a pot template from a wordpress theme - xgettext
View gist:2f0b4dfc983dab2b73358716eb7d1220
find . -iname "*.php" > /tmp/my_theme_file_list.txt
# new template
xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
# update template
xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
Hailong / gist:c705a490d6e1eb31f3402bb19286a16a
Created Nov 22, 2016
Set up Mautic dev environment quickly.
View gist:c705a490d6e1eb31f3402bb19286a16a
# 1. Check out the latest code from
# 2. Run 'composer install' in the root directory as described in the README file.
# 3. Run the following script to set the folder permissions correctly. NOTE: change the "my_linux_account" and "web_daemon_account" properly according your sever.
Hailong / default.vcl
Last active Nov 25, 2018
Varnish 4 VCL for Prestashop 1.6 (*** This is still under development, don't use it directly! ***)
View default.vcl
# This is an example VCL file for Varnish.
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
# See the VCL chapters in the Users Guide at
# and for more examples.
Hailong /
Last active Aug 29, 2015 — forked from nicerobot/
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.


curl -ksO
chmod +x ./
Hailong /
Last active Aug 29, 2015 — forked from demonbane/
Create a Fluid-style app launcher for single-window Chrome instances on OSX
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
echo "What is the url (e.g."
read inputline
You can’t perform that action at this time.