Skip to content

Instantly share code, notes, and snippets.

View aaronbauman's full-sized avatar

Aaron Bauman aaronbauman

View GitHub Profile
@aaronbauman
aaronbauman / BackstopCrawlQueue.php
Created November 15, 2021 14:43
Spatie\Crawler\CrawlQueue\CrawlQueue implementation to limit similar url paths without limiting depth
<?php
namespace MessageAgency\BackstopCrawler;
use GuzzleHttp\Psr7\Uri;
use Spatie\Crawler\CrawlQueue\ArrayCrawlQueue;
use Spatie\Crawler\CrawlUrl;
class BackstopCrawlQueue extends ArrayCrawlQueue {
@aaronbauman
aaronbauman / config.json
Last active January 7, 2020 19:33
L+I Permit vizwit config
{
"version": "2",
"header": {
"title": "L+I Permit Refusals (zoning)",
"description": ""
},
"cards": [
{
"x": 0,
"y": 20,
@aaronbauman
aaronbauman / property-assessments.v2.json
Last active October 11, 2019 17:30 — forked from timwis/property-assessments.v2.json
Property assessments VizWit configuration
{
"version": "2",
"header": {
"title": "OPA Property Records",
"description": "Records of buildings and parcel data from the Office of Property Assessment. All maps and charts are interactive: click on an area to filter the visualization by that dimension, and scroll down to view the filtered results as a table.",
"navigation": [
{
"label": "Download",
"url": "https://data.phila.gov/api/views/3h6i-2hfj/rows.csv?accessType=DOWNLOAD&bom=true"
}
@aaronbauman
aaronbauman / # sshfs - 2016-07-12_15-33-31.txt
Created July 12, 2016 19:38
sshfs (homebrew/fuse/sshfs) on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for homebrew/fuse/sshfs on Mac OS X 10.10.5
Build date: 2016-07-12 15:33:31
@aaronbauman
aaronbauman / p-connect.sh
Last active June 10, 2020 09:28
Connect to a Pantheon database in Sequel Pro
#!/bin/sh
# exit on any errors:
set -e
if [ $# -lt 1 ]
then
echo "Usage: $0 @pantheon-alias"
exit 1
fi
<?php
/**
* Implement of drush_hook_COMMAND_validate().
*
* Prevent catastrophic sql-sync to live. Note that this file has to be local to the
* machine that intitiates sql-sync command.
*/
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
if (strstr($destination, '.live')) {