Skip to content

Instantly share code, notes, and snippets.

View roman204's full-sized avatar
🎯
Focusing

Roman Hutterer roman204

🎯
Focusing
View GitHub Profile
@roman204
roman204 / install-magento-1.9
Last active August 29, 2015 14:03 — forked from RasdyCute/gist:8929851
shell script for install a new magento 1.9
mkdir demo
cd demo
sudo wget http://www.magentocommerce.com/downloads/assets/1.9.0.1/magento-1.9.0.1.tar.gz
sudo wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
tar -zxvf magento-1.9.0.1.tar.gz
tar -zxvf magento-sample-data-1.9.0.0.tar.gz
rsync -a magento-sample-data-1.9.0.0/media/* magento/media/
mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
<?php
$attribute_value = Mage::getResourceSingleton('catalog/product')->getAttributeRawValue($productId, 'attribute_code', Mage::app()->getStore());
echo $attribute_value;
rsync \
--verbose \
--progress \
--stats \
--compress \
--rsh=/usr/bin/ssh \
--recursive \
--times \
--perms \
--links \
#!/bin/bash
dir1="/tmp/dir1"
dir2="/tmp/dir2"
IFS=$'\n'
for file in $(grep -Ilsr -m 1 '.' "$dir1"); do diff -q --exclude="cache" "$file" "${file/${dir1}/${dir2}}" 2> /dev/null; done
#!/bin/sh
# usage:
# ./modman-generator module-dir-name
cd $1
echo "Generating magento modman file in $1"
rm modman
find * -type f -not -iwholename 'modman' -exec echo {} {} >> modman \;
@roman204
roman204 / installphp7.sh
Created December 5, 2015 21:46 — forked from tronsha/installphp7.sh
Install PHP7 to Ubuntu
#!/bin/bash
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7
cd /tmp
git clone https://github.com/php/php-src.git --depth=1
cd php-src
./buildconf
@roman204
roman204 / orderexport.php
Created September 8, 2016 07:58 — forked from ivanproskuryakov/orderexport.php
Magento orders export
$file = __DIR__.’/orders/orders.xml’;
if (file_exists($file)) {
exit();
}
set_time_limit(0);
ini_set(‘memory_limit’, ’1024M’);
include_once “../app/Mage.php”;
umask (0);
//Mage::app(‘default’);