Skip to content

Instantly share code, notes, and snippets.

<?php
class PathMappingTest
{
public function testMergeDirectParent()
{
$root = __DIR__.'/Fixtures/dir5';
$this->store->set('/', null);
$this->store->set('/webmozart', array($root));
$this->store->set('/webmozart/sub', null);
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@barryvdh
barryvdh / .phpstorm.meta.php
Last active October 20, 2021 22:16
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@Ocramius
Ocramius / BrutalForeignKeyDisablingMySQLPurger.php
Created March 4, 2015 09:55
Brutal ORM Purger for doctrine/data-fixtures
<?php
namespace FixturesStuff
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\ORM\EntityManagerInterface;
/**
* @TODO this has to go once we implement correct purging of entities
*/
@hkhamm
hkhamm / installing_cassandra.md
Last active November 8, 2023 15:53
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@jeremyfelt
jeremyfelt / open-source-search-compare.md
Last active July 19, 2023 01:28
Comparing open source search solutions
@kibao
kibao / ApiUploadedFile.php
Last active February 22, 2022 15:14
Symfony2 Form Component. Support upload file through API call (e.g. in json, xml, etc.) as base64 encoded content .
<?php
namespace Infun\HttpFoundation\File;
use Symfony\Component\HttpFoundation\File\File;
class ApiUploadedFile extends File
{
public function __construct($base64Content)
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 4, 2024 21:33
A badass list of frontend development resources I collected over time.
@danvbe
danvbe / 1-Explanations.md
Last active April 21, 2023 15:39
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.