Skip to content

Instantly share code, notes, and snippets.

@Hailong
Hailong / 000 - Magento .gitignore
Created December 11, 2018 03:27 — forked from dfelton/000 - Magento .gitignore
.gitignore for Magento 1.9 projects
##
# Magento stuff.
##
downloader/.cache/*
downloader/cache.cfg
downloader/connect.cfg
maintenance.flag
media/*
media/**
var/*
@Hailong
Hailong / gist:c705a490d6e1eb31f3402bb19286a16a
Created November 22, 2016 06:10
Set up Mautic dev environment quickly.
#!/bin/bash
# 1. Check out the latest code from https://github.com/mautic/mautic
# 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.
my_linux_account="root"
web_daemon_account="apache"
@Hailong
Hailong / gist:2f0b4dfc983dab2b73358716eb7d1220
Created September 6, 2017 18:34 — forked from elebescond/gist:1433137
Generate a pot template from a wordpress theme - xgettext
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
Hailong / README.md
Last active August 29, 2015 14:27 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh | 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.

Alternatively,

curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@Hailong
Hailong / makeapp.sh
Last active August 29, 2015 14:26 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"