Run through the following steps to setup this project on your local environment. These instructions assume you're using the standard Classy Llama devenv.
Use the following to connect to stage.
# rsync with sudo | |
rsync -av \ | |
--rsync-path="sudo -u www-data rsync" \ | |
-e 'ssh -o StrictHostKeyChecking=no' | |
path_to_local_data/ user_name@example.com:/var/www/ | |
# rsync media between two remotes that can not talk to each other | |
# this creates a port (50000) on the origin server that establishes a tunnel between the origin and destination through | |
# your computer, as long as your computer can access both servers you can rsync the files between the two |
#!/bin/bash | |
# This script crawls all urls in a /sitemap.xml file and loads them, effectively priming the cache | |
# Usage: ./warm_cache.sh www.example.com | |
time wget --quiet https://$1/sitemap.xml --output-document - | \ | |
egrep -o "https?://[^<]+" | \ | |
grep $1 | \ | |
grep -v "jpg" | \ | |
xargs -i -d '\n' curl --output /dev/null --silent --write-out '%{http_code} %{time_total}ms %{url_effective} \n' {} |
# You can find the current list of casks on github, and the one for vagrant here: | |
# https://github.com/Homebrew/homebrew-cask/blob/master/Casks/vagrant.rb | |
# From there you may be able to load the history of that file and lookup previous versions of | |
# the cask which would be related to previous versions of vagrant as indicated in the cask definition file. | |
# If the github history of the file fails you can search through recent commit history and find a commit prior | |
# to the version change you are trying to avoid and get the commit hash before the change and use it to locate | |
# a previous version of the cask file. | |
# current (master branch) casks: |
# TODO: Update this with appropriate url | |
Sitemap: https://www.example.com/sitemap.xml | |
User-agent: * | |
# Paths (clean URLs) | |
Disallow: /index.php/ | |
Disallow: /catalog/product_compare/ | |
# Need to allow these urls paths to be indexed, since M2 commonly includes these links in sitemap.xml | |
# Disallow: /catalog/category/view/ |
#!/bin/bash | |
# stop on errors | |
set -e | |
# turn on debugging if running into issues | |
#set -x | |
# This script sends a nightly email, showing errors, grouped and sorted by count. | |
# Getting these errors emailed can be especially useful for the first few weeks after launching a new Magento site. | |
# Assumptions: |
#!/bin/bash | |
# stop on errors | |
set -e | |
# turn on debugging if you're running into issues | |
#set -x | |
# Static variables | |
ENVIRONMENT=$1 | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color |
# Set admin login to 6 days | |
bin/magento -q config:set admin/security/session_lifetime 518400 | |
# Allow admin logins to be bookmarked | |
bin/magento -q config:set admin/security/use_form_key 0 | |
# Set customer login to 4 hours | |
bin/magento -q config:set web/cookie/cookie_lifetime 14400 | |
# Misc dev settings | |
bin/magento -q config:set dev/css/merge_css_files 0 | |
bin/magento -q config:set dev/js/merge_files 0 | |
bin/magento -q config:set dev/js/enable_js_bundling 0 |
SET @utc_offset = 6; | |
-- Orders Per Year -- | |
SELECT period_date, CONCAT("UTC-", @utc_offset) AS utc_offset, order_count, gross_revenue, ROUND(gross_revenue / order_count, 2) AS gross_aov | |
FROM ( | |
SELECT | |
COUNT(*) AS order_count, | |
ROUND(SUM(base_grand_total), 2) AS gross_revenue, | |
date_format(date_sub(o.created_at, INTERVAL @utc_offset HOUR), "%Y") AS period_date | |
FROM sales_order o |
Run through the following steps to setup this project on your local environment. These instructions assume you're using the standard Classy Llama devenv.
Use the following to connect to stage.
# List the composer home directory | |
# Typically /Users/<user>/.composer or /home/<user>/.composer or C:\Users\<user>\AppData\Roaming\Composer | |
echo $COMPOSER_HOME | |
# List files in the composer home | |
ls -la $COMPOSER_HOME | |
# View auth.json in composer home used when no local ./auth.json exists in the directory executed from | |
cat $COMPOSER_HOME/auth.json |