Skip to content

Instantly share code, notes, and snippets.

@enminc
enminc / README.md
Created March 6, 2017 21:47 — forked from lavaxun/README.md
Rancher on docker-for-mac with xhyve

Install Docker for Mac (http://beta.docker.com)

Install docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)

brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Deploy the latest release

@enminc
enminc / onelementnotfound.plugin.php
Created December 17, 2015 17:49
MODX OnElementNotFound plugin demo
<?php
/**
* MODX Revolution OnElementNotFound plugin
* Add static elements inside categories for defined packages OnElementNotFound
*
* Author: Jeroen Kenters / www.kenters.com
* Version: 1.0.0-beta
* License: GPL
*
* Warning:
<?php
/**
* =========================
* defaultTemplateByParentTv
* =========================
*
* Plugin for modX Revolution
* Set default template for children of a ressource
*
* Author:
<?php
/**
* Example of how to fetch your own db table records cached, without using the snippet cached.
*
* Useful when the user can filter the data, like in a seach engine
*
* @package yourpackage
*/
$yourpackage = $modx->getService('yourpackage','yourpackage',$modx->getOption('yourpackage.core_path',null,$modx->getOption('core_path').'components/yourpackage/').'model/yourpackage/',$scriptProperties);
<?php
/* LangRouter
* ==========
*
* This plugin is meant to be used with Babel extra for MODX Revolution. It
* takes care of switching contexts, which hold translations, depending on URL
* requested by client. LangRouter works with so called subfolder based setup,
* in which many languages are served under a single domain but are
* differentiated by a virtual subfolder indicating the language, eg.
* mydomain.com/pl/.
$(function(){
$('#jqt').ajaxComplete(function(){
add_ga(); // add google analytics on each page load
});
$(document).ready(function() {
add_ga(); // add google analytics to the first page
});
function add_ga() {
@enminc
enminc / indexer.plugin.php
Created February 23, 2012 06:36
MODX Revo indexer plugin. Allows fast TV filter searches using custom snippet (not included)
<?php
/*
* MODX Revo indexer plugin. Allows fast TV filter searches using custom snippet (not included)
*
* License: public domain
*
* Created by: Jeroen Kenters / www.kenters.com
* First released: 2012-02-21 (yyyy-mm-dd)
*
* !!!!!!!Important!!!!!!!