Multiselect Options Text
To render the text-values of an multiselect in a BE-grid: <?php /** * * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * It is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * * * @category AskSheldon * @package AskSheldon_Adminhtml * […]
Htaccess Auth for wget and curl
You can download files protected by Basic Htaccess Auth via wget like that: $> wget –http-user=USERNAME –http-password=PASSWORD http://nice.file.url Or via curl like that: $> curl -u USER:PASSWORD http://www.caplantic.de
Redirect all traffic to another URL via htaccess
To redirect all traffic to another URL, you can use the following Redirect-declaration in your .htaccess file. Redirect 302 / https://de.linkedin.com/in/langemarcel For example this redirects all calls to my profile domain http://www.marcel-lange.info to my linkedin account.
Image resizer
Just a testscript to test the quality of Magento’s image processing: <?php /** * * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * It is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * * * @category AskSheldon * @package AskSheldon_FeaturedProducts […]
Resize Virtual Disk (vdi)
$> VBoxManage modifyhd VirtualBox\ VMs/Winows\ 7\ Professional/Windows\ 7\ Professional.vdi –resize 20240
HDD to Virtual Box Image
$> sudo cat /dev/disk2 | VBoxManage convertfromraw stdin PATH/FILENAME.vdi IMAGESIZEINBYTE
Get your public IP via shell
To get your public IP you can use websites like www.whatismypublicip.com/ or just google for it (http://lmgtfy.com/?q=public+ip) But you can also get your public IP via the following Linux shell  command (the smart way :-D): $> curl ifconfig.me/all This gives you an output like that: ip_addr: 31.18.198.134 remote_host: ip123456.dynamic.kabel-deutschland.de user_agent: curl/7.35.0 port: 47745 lang: connection: keep_alive: encoding: […]
Run a DynDNS client under Raspbian
For a home automation project I have to setup a local DynDNS client on my Banana Pi running with Raspian. Here are the steps I’ve taken to run a DynDNS client under Raspbian (will work on other Debian based Linux distributions too): Install ddclient package: $>sudo apt-get install ddclient This command installs the package and starts the DynDNS […]
Create your own Backend theme
When developing Magento Backend functionalities, sometimes you need to add own layout files or templates. In these cases it is a good idea to create a new Backend theme under adminhtml and to modify the Magento configuration to lookup layout files and templates in this new theme before searching in the default one. Therefore you have to create […]