Skip to content

Instantly share code, notes, and snippets.

View dantleech's full-sized avatar
💭
Nothing

dantleech dantleech

💭
Nothing
View GitHub Profile

#bQuery Builder v2

This document proposes a new PHPCR-ODM query builder API and attempts to explain why it is necessary and what was wrong with the previous query builder.

The Current Query Builder

The current PHPCR-ODM query builder is based upon the Doctrine ORM query builder API and uses and extends the Doctrine Commons expression builder.

$qb->from('Doctrine\Phpcr\Document\Generic');
<?php
/**
* @Iterations(10)
* @Revs(100)
* @BeforeMethods({"setUp"})
* @ParamProviders({"provideNumber"})
*/
class ForBench
{
<?php
/**
* @Iterations(10)
* @Revs(100)
* @BeforeMethods({"setUp"})
* @ParamProviders({"provideNumber"})
*/
class ForBench
{
Verifying that +dantleech is my blockchain ID. https://onename.com/dantleech
@dantleech
dantleech / config.json
Created August 21, 2015 15:11
Tabular configuration for generating tables/reports from XML document
{
"classes": {
"deviation": [
[ "printf", { "format": "%.2f%%" } ],
[ "balance" ]
],
"memory": [
[ "printf", { "format": "%d<comment>b</comment>" }]
],
"rps": [
#!/bin/bash
export XDEBUG_CONFIG="idekey=xdebug"
/usr/bin/php "$@"
@dantleech
dantleech / bench
Last active August 29, 2015 14:20
Jackalope Doctrine DBAL MySQL benchmark
Running benchmarking suite
PHPCR\Benchmark\Query\QueryBench
......
PHPCR\Benchmark\Query\InsertBench
.
Generating reports...
>> console_table >>

Keybase proof

I hereby claim:

  • I am dantleech on github.
  • I am dantleech (https://keybase.io/dantleech) on keybase.
  • I have a public key whose fingerprint is 3C5B E011 E0AC F75B 1C51 AC7A D025 4321 FB74 703A

To claim this, I am signing this object:

Eager native file-based BAN

I have done some benchmarks for an eager ban using regex. This method writes all the bans to a banlist.txt file as follows:

1426583165
node-936a2da6-14f6-4883-84d8-98b9fa9df72b,node-936a2da6-14f6-4883-84d8-98b9fa9df72b,node-936a2da6-14f6-4883-84d8-98b9fa9df72b,node-936a2da6-14f6-4883-84d8-98b9fa9df72b
cache-id-5507ee7df3b17
@dantleech
dantleech / gist:01381aac16657e1cfdbd
Created March 16, 2015 17:01
HTTP cache discussion
2015-03-16 15:50:38 lolautruche hey
2015-03-16 15:54:48 dantleech there you are :)
2015-03-16 15:54:54 lolautruche yeah
2015-03-16 15:54:58 lolautruche sorry for being silent
2015-03-16 15:55:03 lolautruche very busy
2015-03-16 15:55:07 dantleech i don't get any notifications for DMs
2015-03-16 15:55:11 dantleech thats cool
2015-03-16 15:55:25 dantleech i should have some time this week to get something started
2015-03-16 15:56:06 lolautruche then be my guest, I won't have time (and that's a pity)
2015-03-16 15:56:22 lolautruche sorry if that was blocking you :(