Skip to content

Instantly share code, notes, and snippets.

View helios-ag's full-sized avatar
🐈
On the internet nobody knows you're a cat

Al Ganiev helios-ag

🐈
On the internet nobody knows you're a cat
View GitHub Profile
@helios-ag
helios-ag / ConfigurationReader.php
Created July 11, 2015 16:26
ConfigurationReader short
<?php
namespace AppBundle\Service;
use FM\ElfinderBundle\Configuration\ElFinderConfigurationReader;
use FM\ElfinderBundle\Model\ElFinderConfigurationProviderInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
class ConfigurationReader extends ElFinderConfigurationReader
@helios-ag
helios-ag / config.yml
Created July 11, 2015 16:11
config.yml
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: elfinder.yml }
# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
@helios-ag
helios-ag / services.yml
Created July 11, 2015 16:09
services.yml
# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
# parameter_name: value
services:
my_elfinder_configurator:
class: AppBundle\Service\ConfigurationReader
arguments: ["%fm_elfinder%", "@request_stack", "@service_container"]
@helios-ag
helios-ag / elfinder.yml
Created July 11, 2015 16:08
elfinder.yml
fm_elfinder:
configuration_provider: my_elfinder_configurator
instances:
ckeditor:
locale: %locale%
editor: ckeditor # other choices are tinymce or simple
include_assets: true
relative_path: true
connector:
roots: # at least one root must be defined
@helios-ag
helios-ag / User.php
Created July 11, 2015 15:46
User.php
<?php
namespace AppBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
@helios-ag
helios-ag / ConfigurationReader.php
Created July 11, 2015 15:46
ConfigurationReader.php
<?php
namespace AppBundle\Service;
use FM\ElfinderBundle\Configuration\ElFinderConfigurationReader;
use FM\ElfinderBundle\Model\ElFinderConfigurationProviderInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
class ConfigurationReader extends ElFinderConfigurationReader
@helios-ag
helios-ag / gist:2abd77f3d6e02d0ea8ab
Created June 9, 2015 04:51
Tinymce/Elfinder configuration
stfalcon_tinymce:
include_jquery: true
tinymce_jquery: true
selector: ".tinymce"
theme:
simple: ~
advanced:
plugins:
- "advlist autolink lists link image charmap print preview hr anchor pagebreak"
- "searchreplace wordcount visualblocks visualchars code fullscreen"
@helios-ag
helios-ag / config.yml
Created February 24, 2015 02:23
Custom emoticons
fm_bbcode:
filter_sets:
my_default_filter:
strict: false # if you want to parse attr values without quotes
locale: en
xhtml: false
filters: [ default, block, code, email, image, list, url ]
hooks: [emoticon]
emoticon:
resource: %kernel.root_dir%/config/emoticons.yml
@helios-ag
helios-ag / config.yml
Created September 8, 2014 05:09
Monolog loggger configuration for Graylog2 (Symfony2)
services:
gelf.udp.transport:
class: Gelf\Transport\UdpTransport
gelf.publisher:
class: Gelf\Publisher
arguments: [@gelf.udp.transport]
monolog.gelf_handler:
class: Monolog\Handler\GelfHandler
arguments: [@gelf.publisher]
@helios-ag
helios-ag / 0_reuse_code.js
Created July 23, 2014 02:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console