Skip to content

Instantly share code, notes, and snippets.

Brendan Abbott brendo

Block or report user

Report or block brendo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View master.xml
<data>
<people>
<item id='1'>Fred</item>
<item id='2'>Jane</item>
<item id='3'>Bob</item>
<item id='4'>Mary</item>
<item id='6'>Tom</item>
</people>
<people-details>
<entry id='1'>
View connect4.js
// Connect 4
// 7 across, 6 down
//
// | | | | | | | |
// | | | | | | |
//
const board = [
[0, 0, 0, 0, 0, 0, 0],
@brendo
brendo / entities.dtd
Created Jan 22, 2017
XSLT and Entities
View entities.dtd
<!ENTITY world "world">
<!ENTITY copy "&#169;">
@brendo
brendo / Symphony Project Structure.md
Last active Aug 20, 2016
A modular approach for Symphony.
View Symphony Project Structure.md

Core

symphony/workspace

The everyday developer will clone the workspace to create their project. This repository accepts Issues, Wiki and Pull Requests. All resources in here are custom to the specific project, all the dependencies will be resolved into /vendor. There are a few boilerplate files such conductor and index.php.

Favour convention approach, commands, datasources, events and sections are autodiscovered where possible, however some configuration may be required for the service container (if the items have dependencies). Needs fleshing out.

It will include:

@brendo
brendo / Symphony Scratchpad.md
Created Sep 11, 2015
Musing about Symphony, rebuilt with modern concepts and tools
View Symphony Scratchpad.md

Symphony

Baseline

  • PHP 5.6+ (also tested on HHVM, PHP 7)
  • Code style PSR-2
  • Autoloading to PSR-4
  • Logging will be abstracted to PSR-3
  • Requests / Responses should follow PSR-7
  • Must have test coverage (consider a combination of Behat/PHPSpec, or even just PHP Unit)
@brendo
brendo / gist:ac0a813a46e43cd357e4
Created Mar 19, 2015
Notes to me on upgrading from Mavericks to Yosemite
View gist:ac0a813a46e43cd357e4
  • Remove the httpd.conf file and replace it with the prexisting one
  • Remove the NameVirtualHost setting form the httpd.conf
  • Remove the symlink for authz_host.load from mods-enabled
  • Update the authz_host.load to include: LoadModule authz_core_module /usr/libexec/apache2/mod_authz_core.so (at the top)
  • Remove PHP 5.6, and reinstall with Homebrew
  • Symlink mod_filter ln -s ../mods-available/filter.load filter.load
  • Update deflate.conf and replace the mod_deflate with mod_filter
  • Update status.conf and remove the Order stuff (don't even bother adding it back? Not sure what I'm even using this for)
  • Create a unixd.load file in mods-available with the contents: LoadModule unixd_module /usr/libexec/apache2/mod_unixd.so
  • Symlink this into mods-enabled
View package.sh
#!/bin/bash
DOZIP=false
DODELETE=false
DODOCS=false
while getopts "v:zrd" opt; do
case $opt in
v)
VERSION=$OPTARG
@brendo
brendo / test.php
Last active Aug 29, 2015
Symfony Routing bug?
View test.php
<?php
require __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
$masterRoutes = new RouteCollection();
$routesA = new RouteCollection();
View gist:187fb680793f7c9d60ab
diff --git a/symphony/lib/core/class.databasesessionhandler.php b/symphony/lib/core/class.databasesessionhandler.php
index 5a4d517..6d480a5 100644
--- a/symphony/lib/core/class.databasesessionhandler.php
+++ b/symphony/lib/core/class.databasesessionhandler.php
@@ -88,7 +88,7 @@ class DatabaseSessionHandler implements SessionHandlerInterface
"DELETE
FROM `tbl_sessions`
WHERE `session` = '%s'",
- $this->database->cleanValue($session_id)
+ $this->database->cleanValue($key)
You can’t perform that action at this time.