Skip to content

Instantly share code, notes, and snippets.

View muzzwood's full-sized avatar

Murray Wood muzzwood

View GitHub Profile
instagram.com/{username}?__a=1
@muzzwood
muzzwood / groupcontexts.plugin.php
Last active February 23, 2019 00:29
Group Contexts Hack in MODX 2.
<?php
// Manually specify which contexts/nodes should have a margin below in the :nth-child() part.
$modx->regClientStartupHTMLBlock('
<style>
#modx-leftbar-tabpanel > .x-tab-panel-bwrap {box-shadow:none;}
.x-tree-root-node {background-color:#f2f2f2;}
.x-tree-root-node > .x-tree-node {background-color:#fff; box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);}
.x-tree-root-node > .x-tree-node:nth-child(3) { margin-bottom:30px;}
.x-tree-root-node > .x-tree-node:nth-child(6) { margin-bottom:30px;}
</style>
@muzzwood
muzzwood / docker-compose.yml
Created July 24, 2017 04:18
Docker-compose file for running a LAMP stack
version: '2'
services:
web:
image: php:7.1.7-apache
ports:
- 80:80
volumes:
- .:/var/www/html
db:
image: mysql
@muzzwood
muzzwood / eventscalendar2.class.php
Created June 9, 2016 06:22
Modified EventsCalendar2 to include TV values and allow the header to be outside the table structure. MODX Revolution
<?php
/**
* eventsCalendar2
*
* Copyright 2012 by Vasliy Naumkin <bezumkin@yandex.ru>
*
* eventsCalendar2 is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
@muzzwood
muzzwood / getlist.class.php
Created June 9, 2016 04:27
modAPIGetListProcessor - An example processor for MODX Revolution 2.5 to retrieve values from an API.
<?php
// Require composer autoloader for guzzle
require dirname(dirname(dirname(dirname(__FILE__)))).'/model/libs/vendor/autoload.php';
use GuzzleHttp\Client;
class GetTicketsProcessor extends modProcessor {
/** @var string $defaultSortField The default field to sort by */
public $defaultSortField = 'id';
/** @var string $defaultSortDirection The default direction to sort */
public $defaultSortDirection = 'ASC';
/** @var string $apiUrl URL of the API */