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
#!/bin/bash | |
if test $# != 1; then | |
echo "Usage: $0 vm_name" | |
exit 0 | |
fi | |
VMNAME=$1 | |
vboxmanage createvm --name $VMNAME --ostype Debian_64 --register | |
vboxmanage modifyvm $VMNAME --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nictype1 virtio --cpus 2 --cpuhotplug on | |
vboxmanage createhd --filename ~/VirtualBox\ VMs/testvm/$VMNAME-disk01.vdi --size 4096 --variant Standard | |
vboxmanage storagectl $VMNAME --name SATA controller --add sata |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: confluence | |
# Required-Start: $local_fs $remote_fs $network $syslog nginx | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts confluence server | |
# Description: starts confluence using start-stop-daemon |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: bamboo | |
# Required-Start: $local_fs $remote_fs $network $syslog nginx | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts bamboo server | |
# Description: starts bamboo using start-stop-daemon |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: jira | |
# Required-Start: $local_fs $remote_fs $network $syslog nginx | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts jira server | |
# Description: starts jira using start-stop-daemon |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* create_magento_admin_user.php | |
* | |
* Place this file to utils folder, one folder | |
* up from your web root. If your web root is something | |
* else than htdocs then change the path below accordingly. | |
* | |
* This script creates Magento admin user to current |
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
class Extension_A_Model_Product extends Mage_Catalog_Model_Product | |
public function doSomethingImportant(){ | |
//does something important | |
} | |
public function transformProductDescription(){ | |
//transforms product descripton to something else | |
} | |
} |
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
class Extension_B_Model_Product extends Mage_Catalog_Model_Product{ | |
public function isAvailable(){ | |
//does some complex calculations or check's for availability in real time... | |
} | |
public function fixSomethingByProduct(){ | |
//fix something by product that needs to be fixed | |
} | |
} |
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
class My_Custom_Model_Product extends Mage_Catalog_Model_Product{ | |
public function doSomethingCustomerSpecific(){ | |
//here we do smth customer specific | |
} | |
public function getSomethingFromSomewhere(){ | |
//here we get something from somewhere | |
} | |
} |
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
<models> | |
<mycustom> | |
<class>My_Custom_Model</class> | |
</mycustom> | |
<catalog> | |
<rewrite> | |
<product>My_Custom_Model_Product</product> | |
</rewrite> | |
</catalog> | |
</models> |
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
class My_Custom_Model_Product extends Mage_Catalog_Model_Product{ | |
use My_Custom_Trait_Extension_A_Model_Product, My_Custom_Trait_Extension_B_Model_Product; | |
public function doSomethingCustomerSpecific(){ | |
//here we do smth customer specific | |
// AND now it's possible to use methods from traits - | |
// it means - from Extension_A and Extension_B Product models | |
$this->fixSomethingByProduct(); | |
} | |
public function getSomethingFromSomewhere(){ |