Skip to content

Instantly share code, notes, and snippets.

View AubreyHewes's full-sized avatar
💭
I may be slow to respond.

Aubrey AubreyHewes

💭
I may be slow to respond.
View GitHub Profile
@AubreyHewes
AubreyHewes / gist:9889323
Created March 31, 2014 10:16
FIX for Vagrant and VirtualBox Additions 4.3.10 ; the "vboxsf" file system is not available
aubrey@ubend:~/projectX$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
@AubreyHewes
AubreyHewes / JSONSchema-Validation-JJV-PoC
Created November 4, 2014 23:48
JSONSchema-Validation-JJV-PoC
/*jshint strict: false, -W116: false, -W098: false */
/*global jjv*/
/**
* JJV Validation + own stuff (non production) .. uses jquery due to JSONEditor not exposing libraries
*/
JSONEditor.Validator.JJV = JSONEditor.Validator.extend({
_validateSchema: function (schema, value, path) {
var me = this, errors = [], valid, i, j;
@AubreyHewes
AubreyHewes / wp-config.php
Created January 19, 2015 21:36
dokku-alt wordpress config.php (requires db-link) -- is default config.php + database config from linked dokku-alt database (diff against original config.php for changes...)
<?php
// is default config.php though using db config from linked dokku-alt database via env var "DATABASE_URL"
// diff against original config.php for changes...
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
@AubreyHewes
AubreyHewes / WP_Redis.php
Last active August 29, 2015 14:14
Wordpress Redis plugin (dokku/dokku-alt redis plugin spec compatible)
<?php
/*
* Plugin Name: WP_Redis
* Description: Exposes Redis to Wordpress as WP_Redis class. Requires ENV variable REDIS_URL (i.e. redis://localhost:port; dokku / dokku-alt compatible )
* Author: Aubrey Hewes<aubrey@hewes.org.uk>
* Version: 1.0
* License: MIT
*/
/**
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@AubreyHewes
AubreyHewes / nodegit-050-push-to-remote-failure-poc.js
Created October 7, 2015 20:44
nodegit 0.5.0 push to remote failure poc
#!/usr/bin/env /usr/bin/node
/**
* NOTE: Run in a project root that already has a remote configured
*
* # v0.5.0 (this is the npm default version)
*
* `npm install nodegit@^v0.5.0`
*
* NOTE: DOES_NOT fetch from S3 (see also https://github.com/nodegit/nodegit/issues/736)
@AubreyHewes
AubreyHewes / README
Created October 31, 2012 09:22 — forked from vrillusions/README
Use bitbucket as a private offsite code backup (edited)
Now that bitbucket supports git, it's easy to use their service as a free, private, offsite code backup. Just create an empty repo for your project on bitbucket, add it as a remote to your development repo:
username@host:~/project$ git remote add bitbucket https://username@bitbucket.org/username/project.git
### initial push of something in order for the mirror to succeed
username@host:~/project$ git push bitbucket master
The mirror command only works after the remote has been initially filled.
Use this post-commit hook to silently and automatically push your changes up after each commit.
@AubreyHewes
AubreyHewes / npm-shrinkwrap.json
Created June 30, 2016 09:41
sprity lwip dependency override for node v6
{
"dependencies": {
"sprity": {
"version": "1.0.8",
"dependencies": {
"sprity-lwip": {
"version": "1.0.3",
"dependencies": {
"lwip": {
"version": "0.0.9"
@AubreyHewes
AubreyHewes / werckerNotifyDeploymentViaTrello.js
Created December 21, 2016 23:22
Wercker NotifyDeployment to Trello Card
// --------------------------------------------------------
//
// Notify a Trello card on a new deployment
//
// NOTE: This is a Wercker related CI script
// NOTE: This depends on the Wercker CI environment!
//
// Required ENV:
// TRELLO_API_KEY, TRELLO_API_TOKEN, TRELLO_CARD_ID
// Wercker ENV (supplied by Wercker):