Skip to content

Instantly share code, notes, and snippets.

View hadl's full-sized avatar

Andreas von Bibow hadl

View GitHub Profile
@hadl
hadl / Default Logrotation
Created January 21, 2014 10:07
Default Logrotation
# place in /etc/logrotate.d/
{DIR}*.log {
daily
rotate 7
compress
delaycompress
notifempty
}
@hadl
hadl / imagemagick extend image canvas
Last active January 2, 2016 11:49
Extend Icon-Files to 20x20px and preserve colors
mogrify -background transparent -gravity center -extent 20x20 -format png -colorspace sRGB -define png:color-type=6 -path resized *.png
@hadl
hadl / Magento Fix Sendfriend Mail Sender
Created April 16, 2014 09:48
Magento: Fix Sendfriend Mail Sender. You can't send mails from your server with eg. gmail.com as sender mail address!
<?php
/**
* Mds_MagentoExtender_Model_Sendfriend_Sendfriend for our extension. Use your own name.
*/
class Mds_MagentoExtender_Model_Sendfriend_Sendfriend extends Mage_Sendfriend_Model_Sendfriend {
public function send()
{
if ($this->isExceedLimit()){
Mage::throwException(Mage::helper('sendfriend')->__('You have exceeded limit of %d sends in an hour', $this->getMaxSendsToFriend()));
// good old times
http://www.youtube.com/watch?v=S1ULpM-lTMY