Skip to content

Instantly share code, notes, and snippets.

Andrey Yatsenco anyt

Block or report user

Report or block anyt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anyt
anyt / AppBundle.php
Last active May 17, 2018
Translate Task Priority field
View AppBundle.php
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}
View RemoveAssociatedContacts.php
<?php
namespace Demo\Bundle\CalendarBundle\Migrations\Schema\v2_3;
use Doctrine\DBAL\Schema\Schema;
use Oro\Bundle\EntityExtendBundle\Tools\ExtendDbIdentifierNameGenerator;
use Oro\Bundle\MigrationBundle\Migration\Extension\NameGeneratorAwareInterface;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
View usr\local\etc\php\7.1\conf.d\ext-xdebug.ini
[xdebug]
;zend_extension="/usr/local/opt/php71-xdebug/xdebug.so"
xdebug.max_nesting_level = 1000
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=On
xdebug.remote_connect_back=ON
xdebug.remote_port=9001
xdebug.remote_autostart=1
#xdebug.remote_log=/Users/anyt/Sites/logs/xdebug.log
@anyt
anyt / doctrine
Last active Nov 3, 2016
cloc statistic
View doctrine
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
PHP 981 19853 60748 73262
XML 58 217 18 1418
Markdown 20 500 0 1400
YAML 56 138 3 1012
XSD 3 116 17 973
JSON 13 0 0 516
Twig 2 67 2 391
@anyt
anyt / fooButton.html.twig
Created Sep 19, 2016
Add button to "More Actions" dropdown
View fooButton.html.twig
{{ UI.clientButton({
'dataUrl': path(
'acme_demo_foo_route', {
entityClass: oro_class_name(entity, true),
entityId: entity.id
}),
'aCss': 'no-hash',
'iCss': 'icon-comment-alt',
'dataId': entity.id,
'label': 'acme_demo.contact.action.foo'|trans,
View titles_update.yml
layout:
actions:
- @add:
id: meta_title
parentId: head
blockType: meta
options:
name: 'title'
content: '=data["navigation_title"].getTitle()'
View app_with_phpversions.php
<?php
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
// Use APC for autoloading to improve performance
// Change 'sf2' by the prefix you want in order to prevent key conflict with another application
/*
@anyt
anyt / .bash_profile
Last active Jun 16, 2016
My dev env
View .bash_profile
#############
# Colors #
#############
export PS1=" \[\e[32;1m\]\u\[\e[0m\]\[\e[32m\]@\h\[\e[36m\]\w \[\e[33m\]\$ \[\e[0m\]"
#export PATH=/usr/local/bin:$PATH
#export PATH=/Applications/MAMP/bin/php/php5.6.2/bin/:$PATH
#export ORO_PHP_PATH=/Applications/MAMP/bin/php/php5.6.2/bin/
#export PATH=/usr/local/php5/bin:$PATH
#export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"
View Resources\services\block_types.yml
services:
orob2b_checkout.layout.block.type.abstract_transition_button:
abstract: true
parent: oro_layout.block_type.abstract_configurable
calls:
- [setOptions, [{transitionData: {required: true}, checkout: {required: true}}]]
View layout_update.yml
checkout_information:
blockType: container
options:
vars:
workflowStep: { '@value': $data.workflowStep }
stepOrder: '-'
You can’t perform that action at this time.