Skip to content

Instantly share code, notes, and snippets.

View designermonkey's full-sized avatar

John Porter designermonkey

View GitHub Profile
@designermonkey
designermonkey / A-Symphony-Workflow.markdown
Created February 17, 2011 00:51
Just mapping out a git workflow for Symphony development

A Symphony Workflow

I'm describing my workflow in these articles, before I start my next Symphony project. Mostly for myself, to iron out my recurring problems, it is based on solid git techniques, taking heed of advice learned from Symphony community members, many many tips on the web, and flicking through the pages of O'Reilly's Version Control with git.

The core aim of this article, is to get a good Symphony development and deployment environment using git as the basis for the organisation, and have it written down for reference.

This workflow can be applied to any project, in theory, that has a starting point being a private remote git repo.

Disclaimer

@designermonkey
designermonkey / Dockerfile
Created April 18, 2019 18:29
Symphony CMS with Docker
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
designermonkey / gist:89ecada4c5c0592d760f22923d71fa23
Created April 8, 2019 18:20 — forked from so0k/gist:cdd24d0a4ad92014a1bc
droplet discovery over digitalocean private networks

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:

Steps

setup the internal DNS zone file

  1. Login to digital ocean
  2. Click "DNS" on the right hand menu
<?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);
@designermonkey
designermonkey / Recommendations.md
Created November 15, 2012 19:46
A recommendations list for agencies.

#Recommendations

A list of recommendations for the office and workflow.

  1. Repositories and Tracking.

    • Bitbucket - 100% free git repository hosting. Quality issue tracking like Github, only completely free.
    • BitbucketCards - Kanban Agile issue management for Bitbucket repos. Teh awesomes. Teh blog post.
  2. Workflow

    • Github Flow is used by Github and is a very uick and easy "community" based workflow.
@designermonkey
designermonkey / autossh.service
Created December 6, 2015 12:28 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<!--
A complete XML to JSON transformation utility adapted from
var sassIncl = require('sass-include-paths'),
scssIncludePaths = sassIncl.nodeModulesSync();
exports.config = {
paths: {
watched: [
'app'
],
public: 'public'
},
require 'formula'
class Neo4j < Formula
homepage 'http://neo4j.org'
url 'http://dist.neo4j.org/neo4j-community-2.0.0-M06-unix.tar.gz'
version 'community-2.0.0.M06-unix'
md5 'fb57c0daae42c2212984e2d97669b36d'
def install
# Remove windows files
require 'formula'
class Phpunit < Formula
homepage 'http://www.phpunit.de/manual/current/en/index.html'
url 'https://phar.phpunit.de/phpunit.phar'
sha1 'dc693b34a62644f61cfc01a22d9654ff4b8764af'
version 'HEAD'
def install
bin.install "phpunit.phar" => "phpunit"