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
<?php | |
$ch = curl_init(); | |
// set URL and other options | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_SSLVERSION, '1'); | |
curl_setopt($ch, CURLOPT_URL, "https://developer.paypal.com/"); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
$result = curl_exec($ch); |
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
SET @DATABASE = 'magento'; | |
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
WHERE `information_schema`.TABLES.table_schema = @DATABASE |
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
RewriteEngine On | |
# If the user is asking for the fullsite, set a cookie, remove the query, and stop. | |
RewriteCond %{QUERY_STRING} ^fullsite$ | |
RewriteRule ^/?(.*)$ http://domain.com/$1? [L,CO=fullsite:yes:.domain.com] | |
# If the user is asking for the mobilesite, set a cookie, remove the query, redirect and stop. | |
RewriteCond %{QUERY_STRING} ^mobilesite$ | |
RewriteRule ^/?(.*)$ http://m.domain.com/$1? [L,CO=fullsite:no:.domain.com] |
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
after 'deploy:update_code', 'magento-snapshot:initialize' | |
namespace :magento-snapshot do | |
desc "Initialize snapshot directories" | |
task :initialize, :roles => [:app] do | |
# Create snapshot directory | |
run "mkdir -p #{shared_path}/snapshot" | |
# Remove existing snapshot dir in case it is in the release path |
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
#/bin/sh | |
#################################################################################### | |
# Magento Auto Snapshot | |
# | |
# Shell script that makes a backup of Magento's database and media directories. | |
# Intended for use on development environments. Bring new developers up to speed | |
# quickly. | |
# Makes some assumptions regarding Capistrano style deploy path. | |
# | |
# You are responsible for your own security!!!!! |