Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Klein docteurklein

View GitHub Profile
View SomeScreenSpec.php
<?php
class SomeScreenSpec
{
function it_should_definitly_allow_to_add_something_via_a_form()
{
$this->mink->doSomeStuff()->and()->assertSomeStuff();
}
}
View gist:07e88acf95277d484bba
### Keybase proof
I hereby claim:
* I am docteurklein on github.
* I am docteurklein (https://keybase.io/docteurklein) on keybase.
* I have a public key whose fingerprint is 3D72 A8B7 E58D 01F7 72CD 17D7 962C 67BE E5C3 F3FC
To claim this, I am signing this object:
View 404
HTTP/1.1 404 Not Found
Content-Length: 5
Nope
@docteurklein
docteurklein / Bundle.php
Created Oct 2, 2014
bundle is its own compiler pass
View Bundle.php
<?php
class App extends Bundle implements CompilerPassInterface
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass($this);
}
public function process(ContainerBuilder $container)
{
View -
SELECT
a.*,
COUNT(c.comment_id) OVER (PARTITION BY c.article_id, _r.associated_article_id) nb_comments,
COUNT(_r.weight) OVER (PARTITION BY _r.associated_article_id, _r.article_id) nb_associated_articles,
c.*,
r.*,
_r.weight
FROM article a
LEFT JOIN comment c USING (article_id)
LEFT JOIN relates_to _r ON a.article_id = _r.article_id
View fig.yml
api:
build: fig/php
ports:
- '8000:8000'
working_dir: /src
volumes:
- backend:/src
entrypoint: [php, '-dextension=gearman.so', '-ddate.timezone=UTC']
command: '-S 0.0.0.0:8000 -t web'
links:
@docteurklein
docteurklein / controller.php
Created Jul 29, 2015
how to make the selected offer checked?
View controller.php
$data = [
'offer' => new OfferForCustomer($ticket->getCustomer(), $ticket->getOffer(), 0, 0, 0),
];
$form = $this->createForm('season_ticket', $data, [
View gist:344728
propel.targetPackage = lib.model
propel.packageObjectModel = true
propel.project = sfShop
propel.database = mysql
propel.database.driver = mysql
propel.database.url = mysql:dbname=###;host=localhost
propel.database.user = ###
propel.database.password = ###
propel.database.encoding = utf8
View README
HOW TO :
- Déclarer les composants dans modules.yml
- Créer une page (form) et y ajouter le widget Form.
- Créer une sous-page ( edition) de celle citée juste au dessus et y ajouter le widget Edit.
- aller a l'URL : /form/edition?id=1
View update_vendors
git submodule update --recursive \
&& git submodule foreach git checkout master \
&& git submodule foreach git fetch \
You can’t perform that action at this time.