Skip to content

Instantly share code, notes, and snippets.

View mssoylu's full-sized avatar
🏠
Working from home

Mehmet Soylu mssoylu

🏠
Working from home
View GitHub Profile
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%2~%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
study(title="E4", overlay=true)
shortes1 = ema(close, 7)
shortest = ema(close, 20)
short = ema(close, 50)
longer = ema(close, 100)
longer2 = ema(close, 150)
longest = ema(close, 200)
longest3 = ema(close, 250)
# config/services.yaml
Foo: ~
Bar:
decorates: Foo
decoration_on_invalid: ignore
arguments: ['@.inner']
# config/services.yaml
Foo: ~
Bar:
decorates: Foo
decoration_priority: 5
arguments: ['@.inner']
Baz:
decorates: Foo
# config/services.yaml
services:
App\Mailer: ~
App\DecoratingMailer:
decorates: App\Mailer
# pass the old service as an argument
arguments: ['@.inner']
@mssoylu
mssoylu / aa.yaml
Last active February 8, 2021 16:07
# config/services.yaml
services:
App\Mailer: ~
App\DecoratingMailer:
# App\Mailer servisi override edilir
# fakat eski servis hala ".inner" icinde tutulmakta
decorates: App\Mailer
# config/services.yaml
services:
App\Mailer: ~
# this replaces the old App\Mailer definition with the new one, the
# old definition is lost
App\Mailer:
class: App\NewMailer
<?
// src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
namespace Acme\HelloBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
class AcmeHelloExtension extends ConfigurableExtension
{
<?
// ...
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
public function load(array $configs, ContainerBuilder $container)
{
$loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
$loader->load('services.xml');
<!-- src/Acme/SocialBundle/Resources/config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="acme.social.twitter_client" class="Acme\SocialBundle\TwitterClient">
<argument></argument> <!-- will be filled in with client_id dynamically -->