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 | |
/** | |
* @param Twig_Environment $env - The Twig Environment - https://twig.symfony.com/api/1.x/Twig_Environment.html | |
* @param $config - Config of `@basalt/twig-renderer` | |
*/ | |
function addCustomExtension(\Twig_Environment &$env, $config) { | |
$env->addExtension(new \Twig_Extension_Debug()); | |
/** |
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
/* eslint-disable no-underscore-dangle,prefer-rest-params */ | |
import Flickity from 'flickity'; | |
(() => { | |
const oldFlickityCreate = Flickity.prototype._create; | |
Flickity.prototype._create = function create() { | |
const that = this; | |
if (this.element.addEventListener) { |
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 | |
/** | |
* Color Input Editable | |
*/ | |
namespace AppBundle\Model\Document\Tag; | |
use Pimcore\Model\Document\Tag\Input; | |
class Color extends Input |
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 | |
/** | |
* TranslateUpdateTrait | |
*/ | |
use Doctrine\DBAL\Schema\Schema; | |
/** | |
* Class TranslateUpdateTrait | |
* |
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
/** | |
* Provides get_localized_links function in the Twig. | |
* | |
* Class LanguageSwitcherExtension | |
*/ | |
class LanguageSwitcherExtension extends \Twig_Extension | |
{ | |
/** | |
* Pimcore documents service which provide needed methods. | |
* |
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
ffmpeg -i file.mp3 -f segment -segment_time 7200 -c copy out%03d.mp3 | |
# -segment_time in seconds |
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
mogrify -strip -interlace Plane -format jpg -colorspace sRGB -quality 85 *.png |
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 | |
/** | |
* 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())); |
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
// good old times | |
http://www.youtube.com/watch?v=S1ULpM-lTMY |
NewerOlder