$ uname -r
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
# ref: https://github.com/prasmussen/gdrive | |
# prerequisite: | |
# In google drive, setup your folder for storing the backups | |
# Then grab the code from the url e.g. https://drive.google.com/drive/folders/xxxxx where xxxxx is the code | |
# This code will be used later in the cron command, keep it secret, keep it safe | |
# install gdrive sync for backups | |
wget https://drive.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA -O /usr/local/bin/gdrive | |
chmod 755 /usr/local/bin/gdrive |
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
check process hhvm with pidfile /var/run/hhvm/pid | |
group hhvm | |
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds | |
stop program = "/usr/sbin/service hhvm stop" | |
if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
if mem > 400.0 MB for 1 cycles then restart | |
if 5 restarts with 5 cycles then timeout |
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
<?php | |
/** | |
* Created by PhpStorm. | |
* Author: Anis Ahmad <anisniit@gmail.com> | |
* Date: 5/11/14 | |
* Time: 10:44 PM | |
*/ | |
namespace Your\CoreBundle\Traits; | |
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
$installer = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
$entityTypeId = $installer->getEntityTypeId('catalog_product'); | |
// replace <my_attribute_code> with your attribute code | |
$idAttribute = $installer->getAttribute($entityTypeId, '<my_attribute_code>', 'attribute_id'); | |
$installer->updateAttribute($entityTypeId, $idAttribute, array( | |
'backend_type' => 'varchar' | |
)); | |
// let's see if it worked | |
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', '<my_attribute_code>'); |
These set of scripts are for Magento 1. For Magento 2, see this Gist.