Skip to content

Instantly share code, notes, and snippets.

@gpapadopg
gpapadopg / php-cs-fixer-hook
Last active January 11, 2019 14:55 — forked from pespantelis/php-cs-fixer-hook
PHP-CS-Fixer Git pre commit/push hook
#!/bin/sh
# if the script is running from a terminal, show colors
if [ -t 1 ]; then
STYLE_END="\033[m"
BLUE="\033[34m"
GREEN="\033[32m"
RED="\033[41m"
YELLOW="\033[43m\033[34m"
fi
@gpapadopg
gpapadopg / back-res.sh
Last active August 29, 2015 14:23 — forked from zekus/back-res.sh
#!/bin/bash
version="0.9.4 from 2010-09-13"
# Always download the latest version here: http://www.eurosistems.ro/back-res
# Thanks or questions: http://www.howtoforge.com/forums/showthread.php?t=41609
#
# CHANGELOG:
# -----------------------------------------------------------------------------
# version 0.9.4 - 2010-09-13
# --------------------------
# Small fix: - Corrected small bug replaced tar with $TAR in the recovery line
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author: Nilton OS blog.linuxpro.com.br
## http://blog.linuxpro.com.br/posts/instalando-ispconfig3-no-ubuntu-1404.html
## http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3-p2
dpkg-reconfigure dash
service apparmor stop
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author: Nilton OS blog.linuxpro.com.br
## http://blog.linuxpro.com.br/posts/instalando-ispconfig3-no-ubuntu-1404.html
## http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3-p2
dpkg-reconfigure dash
service apparmor stop
#!/bin/bash
#
# Debian GNU/Linux Installation Script for LAMP + ISPConfig3
# Script written by Aris S Ripandi (riespandi@gmail.com) 15/01/2012
#
# Referensi:
# - http://www.howtoforge.com/how-to-run-your-own-name-server-with-ispconfig-3-and-fast-hosts
# - http://www.howtoforge.com/perfect-server-debian-squeeze-with-bind-and-courier-ispconfig-3
# - http://www.howtoforge.com/installing-mydns-ng-and-mydnsconfig-on-debian-squeeze
# - http://www.howtoforge.com/how-to-run-your-own-name-server-with-ispconfig-3-and-fast-hosts
@gpapadopg
gpapadopg / styles.less
Last active August 29, 2015 14:08 — forked from alairock/styles.less
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name

Magento Snippets

Find all dispatched event observers

grep -r Mage::dispatchEvent /path/to/your/Magento/* > events.txt

Find all translatable strings

@gpapadopg
gpapadopg / my.cnf
Last active August 29, 2015 13:56 — forked from sr75/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
<?xml version="1.0"?>
<project name="waferthin.com" description="Targets for maintaining and deploying the waferthin.com web site." default="deploy">
<!-- See book here: http://www.packtpub.com/expert-php-5-tools/book -->
<!-- initialize timestamp that will be used in naming of various files & directories -->
<tstamp/>
<target name="deploy" depends="get-env,create-skeleton,svn-export,stamp-config,disp-maint,backup-db,deploy-db,publish-site" description="Deploy the site to the web server and perform necessary build and upgrade tasks.">
</target>
<target name="get-env" description="get the environment for an action">