Skip to content

Instantly share code, notes, and snippets.

View briward's full-sized avatar
🐕‍🦺

Bri Ward briward

🐕‍🦺
View GitHub Profile
@briward
briward / ADR
Last active October 16, 2019 16:21
Starter architectural decisions document.
Use of ADRs to track Architectural Decisions
============================================
Context
-------
At the moment architectural decisions are being made when required and they
are not recorded.
Decision
@paullinney
paullinney / auth.php
Last active July 13, 2016 08:29
Acquia Auth to Selenium Client for Update (post)
/**
* Update a Solarium client object for an 'Update' query
* with acquia authentication
*
* Needs to add following to, Solarium\Plugin\BufferedAdd\BufferedAdd.php:flush()
* after addDocuments call, so all flush queries get auth cookies:
*
* $sdsSolrBase = new SolrBase();
* $this->client = $sdsSolrBase->clientAttachAuth($this->client, $this->updateQuery);
*
@thsutton
thsutton / make-drupal-file-field-private.sh
Last active February 9, 2022 07:52
Hold your hand through the process of converting an existing Drupal 7 file field to use the private file system. Update the $FIELD variable (and, if required, the path and arguments for drush) and do what it tells you to.
#!/bin/sh
#
# This script will hold your hand during the process of converting an existing Drupal 7 file field from public to private.
#
# http://twitter.com/thsutton
# http://www.linkedin.com/pub/thomas-sutton/55/391/350
# http://thomas-sutton.id.au/
set -eu
@jminor
jminor / a_star.js
Created February 15, 2011 17:49
A* path finding algorithm for impactjs game engine
// A* path finding algorithm for impactjs game engine
// adapted from http://stormhorse.com/a_star.js
// via http://46dogs.blogspot.com/2009/10/star-pathroute-finding-javascript-code.html
// impact-ified by jminor - http://pixelverse.org/
/* Example:
this.pathFinder = new PathFinder();
var start = [((this.pos.x+this.size.x/2) / tilesize).floor(), ((this.pos.y+this.size.y/2) / tilesize).floor()];
var destination = [((target.pos.x+target.size.x/2) / tilesize).floor(), ((target.pos.y+target.size.y/2) / tilesize).floor()];