This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
#!/bin/bash | |
# Generate sample data and trigger Magento2 performance toolkit jMeter test plan. | |
HOST="magento2.loc" | |
BASE_PATH="/" | |
USERS=100 | |
RAMP_PERIOD=300 | |
LOOPS=1 | |
ADMIN_USER="magento2" | |
ADMIN_PASSWORD="magento2" |
<?php | |
/** | |
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version); | |
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all | |
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info() | |
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems. | |
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento | |
* @author Magento Inc. | |
*/ |
#!/bin/sh | |
echo "Generate dump?(yes)" | |
read godump | |
if [ $godump = 'yes' ] || [ $godump = 'y' ]; then | |
read -p "mysql user: " YOUR_USER | |
read -p "mysql password: " YOUR_PASSWORD | |
read -p "mysql host: " YOUR_HOST |
<?php | |
/** | |
* Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically | |
*/ | |
// All customer group ids | |
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds(); | |
// SalesRule Rule model | |
$rule = Mage::getModel('salesrule/rule'); |
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
apt-get install php5-mcrypt | |
mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/ | |
php5enmod mcrypt | |
service apache2 restart | |
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl | |
sudo service apache2 restart | |
defmodule Example do | |
def main(args) do | |
args |> parse_args |> process | |
end | |
def parse_args(args) do | |
options = OptionParser.parse(args, switches: [help: :boolean], | |
aliases: [h: :help]) | |
case options do |
echo "* Updating system" | |
apt-get update | |
apt-get -y upgrade | |
echo "* Installing packages" | |
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
id -u deploy &> /dev/null | |
if [ $? -ne 0 ] | |
then |