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 | |
/** | |
* | |
* This script will load the Magento 2 Object Manager, after which you | |
* can execute anything you want. "One time" scripts, just to fool | |
* around with Magento's functionality or to debug stuff. | |
* | |
* Place this file in the root folder of the Magento instance and execute: | |
* php magento2-bootstrap.php |
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
## | |
# Magento 2 | |
## | |
$HTTP["host"] == "example.com" { | |
server.document-root = "/var/www/example/" | |
setenv.add-environment = ( | |
# default Disables static file caching, provides verbose logging, | |
# automatic code compilation, enhanced debugging. | |
# |
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
Update composer.json and add following: | |
{ | |
... | |
"require": { | |
"magento/framework": "~1.0.0-beta", | |
"magento/sample-data": "1.0.0-beta", | |
"magento/sample-data-media": "~0.42.0-beta2" | |
}, | |
"repositories": [ |
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 | |
# | |
# Lighttpd bash script to toggle between HHVM and PHP. | |
# | |
# Place the file in a shared bin directory so the file can be executed as root | |
# ex. /usr/local/bin/toggle-hhvm | |
# | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 |
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
$HTTP["host"] =~ "example.domain.com" { | |
server.document-root = "/var/www/example/" | |
setenv.add-environment = ( | |
"LARAVEL_ENV" => "dev" | |
) | |
url.rewrite-once = ( | |
"^/(plugins|modules/(system|backend|cms))/(([\w-]+/)+|/|)assets/([\w-]+/)+[-\w^&'@{}[\],$=!#().%+~/ ]+\.(jpg|jpeg|gif|png|svg|swf|avi|mpg|mpeg|mp3|flv|ico|css|map|js|woff|ttf|eot)(\?.*|)$" => "$0", | |
"^/(system|themes/[\w-]+)/assets/([\w-]+/)+[-\w^&'@{}[\],$=!#().%+~/ ]+\.(jpg|jpeg|gif|png|svg|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf|eot)(\?.*|)$" => "$0", |
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
#!/usr/bin/env bash | |
set -eu | |
declare -a file_patterns=('app/code/core' 'app/Mage.php$' '^index.php$') | |
exit_status=0 | |
while read x file; do | |
for file_pattern in ${file_patterns[@]}; do | |
if [[ $file =~ $file_pattern ]]; then |