Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lsmith77 on github.
  • I am lsmith (https://keybase.io/lsmith) on keybase.
  • I have a public key whose fingerprint is 280C F185 F4AF A00F EE49 3F71 0D4E 225B 7B2F 7EDC

To claim this, I am signing this object:

@lsmith77
lsmith77 / gist:93a9c4431ad1bbe9f06a
Created June 30, 2014 09:03
Compiling Oak from source and installing MongoDB via homebrew
brew update
brew outdated
brew upgrade
brew install maven
brew install mongodb
mongod --config /usr/local/etc/mongod.conf
wget http://www.eu.apache.org/dist/jackrabbit/oak/1.0.1/jackrabbit-oak-1.0.1-src.zip
@lsmith77
lsmith77 / Logitech R700 with reveal.js
Created November 2, 2014 15:41
Logitech R700 with reveal.js
<?xml version="1.0"?>
<!-- Use with KeyRemap4MacBook:
http://pqrs.org/macosx/keyremap4macbook/ -->
<root>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
@lsmith77
lsmith77 / gist:f1ab3fe12fb0813ba4f7
Created June 10, 2015 13:07
this compiler pass fails with "Unable to dump a service container if a parameter is an object or a resource."
<?php
namespace Liip\TranslationBundle\DependencyInjection\Compiler;
use Doctrine\ODM\PHPCR\Mapping\Annotations\Reference;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Compiler pass to dynamically set the service for isGrant checks (can be removed when requiring Symfony 2.6+
<?php
// put this into "dev/less/getcss.php"
// checkout lessphp into src/vendor: git clone git://github.com/leafo/lessphp.git
// add "Alias /dev/ /home/you/src/joiz/dev/" to your vhost
// add "RewriteRule ^main.css$ dev/less/getcss.php?cssfile=main [L]" to your vhost or .htaccess
// create app/config/main.less, use imports into your bundles (Resources/data/less/*)
// browse to http://[yourdomain]/main.css
$lessCompiler = __DIR__.'/../../src/vendor/lessphp/lessc.inc.php';
if (!include $lessCompiler) {
@lsmith77
lsmith77 / gist:648702
Created October 27, 2010 09:04
multiplexer to json-ify any controller as well as call multiple separate controllers via one request
<?php
namespace Application\FooBundle\Controller;
class MultiplexController
{
/**
* Request
* @var Symfony\Component\HttpFoundation\Request
*/
doctrine_user.config:
db_driver: odm
class:
model:
user: Bundle\ExerciseUserBundle\Document\User
group: ~
permission: ~
form:
user: ~
group: ~
<?php
namespace Bundle\MultiFrontControllerBundle\Test;
class WebTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{
/**
* @see The class description
*/
public function __construct()
<?php
namespace Application\FooBundle\Test;
/*
* The on-line validator: http://validator.nu/
* The documentation: http://about.validator.nu/
* Documentation about the web service: http://wiki.whatwg.org/wiki/Validator.nu_Web_Service_Interface
*/
class Html5WebTestCase extends WebTestCase
{
<?php
namespace Application\FooBundle\Test;
use Doctrine\Common\DataFixtures\Loader;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
class WebTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{