This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FROM: http://forum.parallels.com/showthread.php?290399-Plesk-11-5-Easy-Install-Script-for-Multiple-PHP-CentOS-6-4-x64 | |
yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel unixODBC-devel pcre-devel sqlite-devel db4-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel | |
phpconfigureflagscommon="--with-libdir=lib64 --cache-file=./config.cache --prefix=/usr/local/php-\$phpversion-\$phptype --with-config-file-path=/usr/local/php-\$phpversion-\$phptype/etc --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-freetype-dir=/usr/local/php-\$phpversion-\$phptype --with-png-dir=/usr/local/php-\$phpversion-\$phptype --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr/local/php-\$ph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start/stop/restart atmail | |
/etc/init.d/atmailserver start | |
/etc/init.d/atmailserver stop | |
/etc/init.d/atmailserver restart | |
# count of messages in queue | |
/usr/local/atmail/mailserver/bin/exim -bpc | |
# list of messages in queue | |
/usr/local/atmail/mailserver/bin/exim -bp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find non alpha numberic characters, excluding _.,- | |
[^a-zA-Z\d\s_.,-] | |
# Find single tag only | |
html - <html\b[^>]*> | |
div - <div\b[^>]*> | |
span - <span\b[^>]*> | |
font - <font\b[^>]*> | |
xml namespace - <\?xml\b[^>]*> | |
xml namespace - <!--\?xml\b[^>]*> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EE Hacksaw | |
# - - - - - - - - - - - - - - - - - - - - - - - - | |
{exp:eehive_hacksaw chars="100" append="…" allow=""}{news_excerpt}{/exp:eehive_hacksaw} | |
# CE Img | |
# - - - - - - - - - - - - - - - - - - - - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# common ssh tasks | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - | |
zip -r filename.zip * | |
chown -R username * | |
chgrp -R group * | |
rm -rf * | |
chmod -R 777 uploads/ | |
scp -r localfolder remotefolder | |
df -h # disk space | |
du -sh /var/ # disk space by folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SQL Like Usage | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - | |
SELECT * FROM asdf WHERE asdf LIKE 'asdf%'; | |
UPDATE asdf | |
SET asdf = "" | |
WHERE asdf LIKE '/images/uploads/asdf%'; | |
UPDATE asdf | |
SET asdf = replace(asdf,'/images/uploads/logos/cropped/ready/','/images/uploads/logos/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handy commands | |
git remote show origin | |
# Removes .DS_store from Git Repo | |
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch | |
# Archive/Export | |
git archive master | tar -x -C /somewhere/else | |
git archive master | bzip2 >source-tree.tar.bz2 | |
git archive --format zip --output /full/path/to/zipfile.zip master |