Skip to content

Instantly share code, notes, and snippets.

Ludwig Ruderstaller rufinus

Block or report user

Report or block rufinus

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
View .docker - apache - apache2.conf
ServerRoot "/usr/local/apache2"
#Listen 12.34.56.78:80
Listen 80
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
@rufinus
rufinus / .gitlab-ci.yml
Last active Jun 14, 2017
Symfony DockerCompose
View .gitlab-ci.yml
stages:
- test
- build
- deploy
cache:
key: 'mailingowl-composer-cache'
paths:
- .composer-cache
@rufinus
rufinus / .gitlab-ci.yml
Created May 31, 2017
gitlab ci selenium.yml
View .gitlab-ci.yml
'E2E tests':
before_script:
- yarn install --force >/dev/null
- /bin/bash -c '/usr/bin/killall -q lite-server; exit 0'
- export DOCKERHOST=$(ifconfig | grep -E "([0-9]{1,3}\\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d ':' | head -n1)
- export E2E_BASE_URL="http://$DOCKERHOST:8000/#."
- lite-server -c bs-config.js >/dev/null &
script:
- node_modules/.bin/protractor ./protractor.conf.js --seleniumAddress="http://localhost:4444/wd/hub" --baseUrl="http://$DOCKERHOST:8000" --browser chrome
- killall lite-server >/dev/null
@rufinus
rufinus / MandatorType <2.6
Last active Aug 29, 2015
Symfony FormType <2.6 what is the >=2.6 way? Without needing OptionsResolverInterface?
View MandatorType <2.6
<?php
namespace Dpanel\Bundle\AdminBundle\Forms;
use Cwd\GenericBundle\Doctrine\EntityRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
View RepositoryUtils
<?php
namespace Cwd\GenericBundle\Repository;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\ObjectManager;
use Gedmo\Exception\InvalidArgumentException;
use Gedmo\Tree\RepositoryUtils as GedmoRepositoryUtils;
class RepositoryUtils extends GedmoRepositoryUtils
View composer installed packages
cilex/cilex 1.1.0 The PHP micro-framework for Command line tools based on the Symfony2 Components
cilex/console-service-provider 1.0.0 Console Service Provider
doctrine/annotations v1.2.0 Docblock Annotations Parser
doctrine/lexer v1.0 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
dompdf/dompdf v0.6.1 DOMPDF is a CSS 2.1 compliant HTML to PDF converter
erusev/parsedown 1.0.1 Parser for Markdown.
jms/metadata 1.5.1 Class/method/property metadata management in PHP
jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers.
jms/serializer 0.16.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
knpla
View gist:1e982d46e6880b084327
1. In twig, what do you use if you want to optimize the size of the generated HTML content?
a. spaceless
b. gzip
c. operators
the spaceless tag
answer is b
really ?
twig supports gzip ?
don't look up
View Mandator.php
<?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Application\Entity\Mandator
*
View gist:5585996
START TRANSACTION
DELETE FROM `milestone` WHERE `milestone_id` = ?
array(1) { [0]=> int(13) } array(1) { [0]=> string(7) "integer" }
DELETE FROM `milestone` WHERE `milestone_id` = ?
array(1) { [0]=> int(14) } array(1) { [0]=> string(7) "integer" }
DELETE FROM `event` WHERE `event_id` = ?
array(1) { [0]=> int(14) } array(1) { [0]=> string(7) "integer" }
View 1-field.php
$this->add(
array(
'type' => 'DoctrineModule\Form\Element\ObjectSelect',
'name' => 'field_id',
'options' => array(
'object_manager' => $em,
'target_class' => 'Application\Entity\Field',
'label_generator' => function($targetEntity) {
return $targetEntity->getName();
},
You can’t perform that action at this time.