Skip to content

Instantly share code, notes, and snippets.

/*
* Handle git attributes. See gitattributes(5) for a description of
* the file syntax, and attr.h for a description of the API.
*
* One basic design decision here is that we are not going to support
* an insanely large number of attributes.
*/
#include "cache.h"
#include "config.h"
@symball
symball / backend_eslint.js
Last active December 6, 2019 05:33
style_guidelines
module.exports = {
root: true,
env: {
node: true,
mocha: true,
},
extends: [
'airbnb-base',
],
plugins: [
@symball
symball / gist:3d275671f9fa3ea10e65354ab0c3e1f4
Last active June 14, 2017 13:46
python-sphinx-php PKGBUILD
# Maintainer: Simon Ball <contact@simonball.me>
pkgname=('python-sphinx-php-git')
pkgrel=1
pkgdesc="Sphinx Extensions for PHP and Symfony"
url="https://github.com/fabpot/sphinx-php/"
pkgver=v1.0.10.r1.g7312ecc
depends=('python')
makedepends=('git' 'python-setuptools')
license=('MIT')
arch=('any')
@symball
symball / Test.php
Last active April 3, 2017 06:21
PHPUnit test
<?php
namespace Tests\AppBundle\Functional\Process;
/* The kernel test case we'll be using */
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use AppBundle\Entity\Post;
use AppBundle\Repository\PostRepository;
@symball
symball / gist.php
Last active March 10, 2016 06:31
Sonata Admin DataGrid filter trying to use foreign text index
<?php
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
/* Get the filtered tags */
$repo = $this->getConfigurationPool()->getContainer()->get('repository.tag');
$temp = $repo->findByType('job-role---buy-side');
/* Work the results in to a choice compatible array */
$choices = array();
foreach ($temp as $entry) { $choices[$entry->getTitle()] = $entry->getTitle(); }