Skip to content

Instantly share code, notes, and snippets.


John Porter designermonkey

View GitHub Profile
designermonkey / Dockerfile
Created Apr 18, 2019
Symphony CMS with Docker
View Dockerfile
FROM php:5.6-apache
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install opcache
RUN docker-php-ext-install pdo_mysql
RUN apt-get update
RUN apt-get install libxslt-dev zlib1g-dev -y
RUN docker-php-ext-install xsl
designermonkey / gist:89ecada4c5c0592d760f22923d71fa23
Created Apr 8, 2019 — forked from so0k/gist:cdd24d0a4ad92014a1bc
droplet discovery over digitalocean private networks
View gist:89ecada4c5c0592d760f22923d71fa23

Digital Ocean recently released private networking support in their NYC2 Data center.

They also published a blog post on how to setup a new droplet with private networking. But one thing the post doesn't do is tell you how to scale your private network for many boxes. One approach is obviously to edit /etc/hosts (but this gets annoying when you add a new box). A better way is to create an internal DNS zone (via the digital ocean web interface) and have your droplets use it:


setup the internal DNS zone file

  1. Login to digital ocean
  2. Click "DNS" on the right hand menu
View relative_path.php
if (!function_exists('relative_path')) {
function relative_path(string $from, string $to): string {
// some compatibility fixes for Windows paths
$from = is_dir($from) ? rtrim($from, '\/') . '/' : $from;
$to = is_dir($to) ? rtrim($to, '\/') . '/' : $to;
$from = str_replace('\\', '/', $from);
$to = str_replace('\\', '/', $to);
View brunch-config.js
var sassIncl = require('sass-include-paths'),
scssIncludePaths = sassIncl.nodeModulesSync();
exports.config = {
paths: {
watched: [
public: 'public'
designermonkey / autossh.service
Created Dec 6, 2015 — forked from thomasfr/autossh.service
Systemd service for autossh
View autossh.service
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
designermonkey / backbone.fetch.js
Created Sep 30, 2015 — forked from akre54/backbone.fetch.js
Backbone.ajax with window.fetch
View backbone.fetch.js
var defaults = function(obj, source) {
for (var prop in source) {
if (obj[prop] === undefined) obj[prop] = source[prop];
return obj;
var stringifyGETParams = function(url, data) {
var query = '';
for (var key in data) {
designermonkey / xml.xsl
Last active Aug 29, 2015 — forked from vdcrea/xml.xsl
xsl file to output xml used for
View xml.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
exclude-result-prefixes="xls string">
<xsl:import href="../utilities/functions/function.string.utilities.xsl"/>
<xsl:output method="xml"
### ./ 1.5.0 will install Elasticsearch 1.5.0
### ./ 1.4.4 will install Elasticsearch 1.4.4
### ./ will fail because no version was specified (exit code 1)
### CLI options Contributed by @janpieper
### Check for latest version of ElasticSearch
### ElasticSearch version
designermonkey / gist:378e965a4b36fe24b46c
Last active Aug 29, 2015
Docs for upcoming cookies and sessions changes
View gist:378e965a4b36fe24b46c

Docs for Session and Cookie.

Updates related to the Session and Cookie classes.


Container is a very simple one which can be used as is or extended by a developers class in an extension for example.

Access Methods

View gist:d8ed86868e2fe7ebc4ae
* Beagle Bones
namespace Beagle\Bones;
* Middleware Decorator
class MiddlewareDecorator