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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Capslock check</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<style> |
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
# Force SSL, but only for a certain domain | |
# At the same time, redirect http non-www ad www to https://www | |
# Replace example\.com and example.com with your domain | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ | |
RewriteRule (.*) https://www.example.com/$1 [R=301,L] |
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
# Canonical redirect - force www. prefix on domain | |
RewriteCond %{HTTP_HOST} ^mydomain\.nl$ [NC] | |
RewriteRule ^(.*)$ https://www.mydomain.nl/$1 [R=301,L] |
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
###################################################################### | |
## Word to the wise ## | |
## It is best to keep your htaccess files as clean as possible ## | |
## and set as many specs in your Apache config as you can. ## | |
## Htaccess slows down Apache. ## | |
## Review the entire file before use, especially the TODO sections. ## | |
###################################################################### | |
Options -MultiViews | |
Options +FollowSymLinks |
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
############ Project specific rules ############### | |
# Project specific rules go here... | |
# To ignore a folder, add asterix -> folder/* | |
# This way, unignored files like .keep and .gitkeep will still be added to git | |
################# Global rules #################### | |
## Never ignore .gitignore | |
!.gitignore | |
## Dependencies |
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
# Force trailing slash for SEO purposes | |
RewriteEngine On | |
# For GET and HEAD requests only. We do not want to redirect posted forms and such, or we'll lose all POST data! | |
RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$ | |
# Not for actual files. We do not want to redirect urls like test.jpg to test.jpg/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# Redirect to trailing slash if no slash is present in URI |
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
# Echo Magento version number | |
cd /path/to/magento/webroot | |
php -r "include 'app/Mage.php'; echo 'Magento version is: ', Mage::getVersion(); " |
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
# purge varnish cache in Varnish 3 | |
varnishadm "ban.url ." | |
# purge varnish cache in Varnish 4 | |
varnishadm "ban req.url ~ /" |
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
# This command removes any sql.gz SQL backup file from history, even if it was committed a few commits ago. | |
# Handy for big files that throw an error when trying to push. As always, rewriting git history is a | |
# dangerous action! Do not rewrite for commits that have already been fetched by fellow developers. | |
git filter-branch --prune-empty -d /path/to/tmp/scratch/dir --index-filter "git rm --cached -f --ignore-unmatch *.sql.gz" --tag-name-filter cat -- --all |
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
-- Foreign key check will cascade-delete all related data | |
-- Delete all products | |
DELETE FROM catalog_product_entity; | |
-- Reset the autoincrement for products | |
ALTER TABLE catalog_product_entity AUTO_INCREMENT = 1; | |
-- Delete all categories | |
DELETE FROM catalog_category_entity WHERE `entity_id` > 2; |