This file contains hidden or 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
//Create easy readable var_dump on any web page | |
function pretty_var_dump($var) | |
{ | |
$dump = ''; | |
$dump .= '<div style="width: 60%; height: 60%; display: block; border: 1px solid #000000; outline: 5px solid #ff0000;overflow: scroll;position: fixed;z-index:100;top: 20%;left: 20%;background-color: #ffffff;">'; | |
$dump .= '<p style="font-family: Arial;font-size: 15px;color: #000000;font-weight: 400;line-height: 1.5em;">'; | |
if(is_array($var)||is_object($var)){ | |
$output_arr=var_export($var,true); | |
$output_arr= preg_split('/[\,]+/',$output_arr); | |
foreach($output_arr as $arr_var): |
This file contains hidden or 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
#!/bin/sh | |
#log file for finished copies | |
log=logs/logwp.txt | |
wordpressFileName=wordpress-3.4 | |
wordpressPath="$wordpressFileName" | |
#path to sites config settings file | |
sitesConfigSettingsPath=domains.txt | |
#destination directory - the only path that you | |
# have to change from hosting to hosting | |
path=/var/chroot/home/content/46/9148346/html/d |
This file contains hidden or 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
#!/bin/sh | |
dbPath=wpdb.sql | |
fDomainsPath=domains.txt | |
logFile=logdb.txt | |
dirName=dbes | |
#END DECLARATION | |
if [ -f "$fDomainsPath" -a -f "$dbPath" ]; then | |
if [ ! -d $dirName ]; then | |
mkdir "$dirName" | |
else |
This file contains hidden or 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
#!/bin/sh | |
#Import list of databases to MySQL | |
#Start vars declaration | |
importPath=dbes | |
dbList=domains.txt | |
importLog=import_log.txt | |
#End vars declaration | |
if [ -d "$importPath" -a -f "$dbList" ]; then | |
if [ -f "$importLog" ]; then | |
rm "$importLog" |
This file contains hidden or 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
#!/bin/sh | |
./wp_dbcopy.sh | |
./importDB.sh & | |
./wpcopy.sh & | |
./apache_config.sh & |
This file contains hidden or 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
for file in `find . -iname "*.jpg" -or -iname "*.png" -or -iname "*.jpeg"`;do | |
ext=${file##*.} | |
if [ -n "$ext" ]; then | |
if [ "$ext" = "jpg" ]; then | |
echo "optimizing ${file} as jpeg file with jpegtran" | |
jpegtran -copy none -optimize -perfect -outfile temp_abracadabra_filename.jpg $file | |
mv -f temp_abracadabra_filename.jpg $file; | |
fi | |
if [ "$ext" = "jpeg" ]; then | |
echo "optimizing ${file} as jpeg file with jpegtran" |
This file contains hidden or 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
#!/bin/sh | |
#Start vars declaration | |
dbList=domains.txt | |
logQuery=logquery.txt | |
query=query.txt | |
#End vars declaration | |
if [ -f "$dbList" ]; then | |
if [ -f "$logQuery" ]; then | |
rm "$logQuery" | |
fi |
This file contains hidden or 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
#!/bin/sh | |
#Start vars declaration | |
dbList=domains.txt | |
dropLog=droplog.txt | |
#End vars declaration | |
if [ -f "$dbList" ]; then | |
if [ -f "$dropLog" ]; then | |
rm "$dropLog" | |
fi | |
touch "$dropLog" |
This file contains hidden or 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
#!/bin/sh | |
#Start vars declaration | |
#default domains.txt format used as input file: | |
#domain_name database_name user_name password hosting_url | |
dbList=domains.txt | |
createLog=logs/create_log.txt | |
rootUser="root" | |
rootPass="win7" | |
#on some vds set user@"%" | |
rootHost="localhost" |
This file contains hidden or 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
#!/bin/sh | |
#log file for settings done | |
log=logs/log_apache_settings.txt | |
#path to sites config settings file | |
sitesConfigSettingsPath=domains.txt | |
#destination directory - the only path that you | |
# have to change from hosting to hosting | |
path=test | |
#apache settings file path | |
apache_path=C:/wamp/bin/apache/Apache2.2.21/conf/extra/httpd-vhosts.conf |
OlderNewer