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/bash | |
URL='domain.com' | |
wget --quiet http://$URL/sitemap.xml --no-cache --output-document - | egrep -o "http://$URL[^<]+" | while read line; do | |
time curl -A 'Cache Warmer' -s -L $line > /dev/null 2>&1 | |
echo $line | |
done |
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
<?php | |
/** | |
* Clear cache via CLI | |
* | |
* @category MageBR | |
* @author Eric Cavalcanti <[email protected]> | |
* @license MageBR License | |
* @link https://www.magebr.com | |
*/ |
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
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE; | |
SET @SALT = "ms"; | |
SET @PASSWORD = "password"; | |
SET @PASS = CONCAT(MD5(CONCAT( @SALT , @PASSWORD) ), CONCAT(":", @SALT )); | |
SET @FIRSTNAME = "firstname"; | |
SET @LASTNAME = "lastname"; | |
SET @EMAIL = "[email protected]"; | |
SET @USERNAME = "myusername"; | |
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL; |
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
select | |
# Change the interval based on UTC to show on specific timezone | |
date_format(date_sub(o.created_at, interval 7 hour), "%l:%i %p") `Time in PST`, | |
count(*) OPM | |
from sales_flat_order o | |
# Time from the DB | |
where o.created_at > '2018-07-16 16:00:00' | |
and o.created_at < '2018-07-16 19:00:00' | |
# Inform store ID below or remove for all stores | |
and o.store_id='1374' |
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
# use a desktop user-agent string | |
#user-agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1" | |
# use a mobile user-agent string | |
#user-agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3" | |
# When following a redirect, automatically set the previous URL as referer. | |
#referer = ";auto" | |
referer = "http://domain.com" |
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
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
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
$ cd ~ | |
$ sudo curl -sS https://getcomposer.org/installer | sudo php | |
$ sudo mv composer.phar /usr/local/bin/composer | |
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
then you can run | |
$ sudo composer install |
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
SELECT COUNT(total_qty_ordered) 'Total Orders' FROM sales_flat_order o | |
# Time is in UTC | |
where o.created_at > '2018-10-25 07:00:00' | |
# This is the store view ID. | |
and o.store_id='123'; |
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
awk '{ print $1}' /var/log/httpd/access.log | sort | uniq -c | sort -nr | head -n 10 |
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
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Copyright © 2016 Magento. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
--> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<!-- Remove unwanted account navigation links --> |