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 / 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 / gist:5875278
Created June 27, 2013 09:45
JIRA Re-Index script
#!/bin/sh
### CUSTOM SETTINGS ###
USERNAME=<jira_username>
PASSWORD=<jira_password>
HOSTNAME=<jira_hostname>
### FIXED SETTINGS ###
DASHBOARD_PAGE_URL=http://${HOSTNAME}/secure/Dashboard.jspa
INDEX_PAGE_URL=http://${HOSTNAME}>/secure/admin/jira/IndexReIndex.jspa
COOKIE_FILE_LOCATION=jiracoookie
@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 / phpstorm-eap-update
Last active May 3, 2021 13:25
Update/Install the latest PhpStorm EAP automatically (add to external tools)
#!/usr/bin/env bash
#######################################################################################################################
#
# Updates/Install the latest PhpStorm EAP
#
# --------------------------------------------------------------------------------------------------------------------
#
# * Retrieves the current version from the EAP wiki
# * If the new version is not the current version (based on symlink to PhpStorm) then updates
# * Creates a symlink from versioned folder to PhpStorm
@AubreyHewes
AubreyHewes / JSONEditor-Theme-Bootstrap3-Horizontal
Created November 4, 2014 23:15
JSONEditor Theme: Bootstrap3 (form-horizonta)
/*jshint strict: false, -W116: false, -W098: false */
/**
* Copy of the Bootstrap 3 Theme; tweaked for horizontal form (form-horizontal)
*
* @todo remove ridiculous amount of nesting; is a lib issue; create issue?
*/
JSONEditor.defaults.themes.bootstrap3horizontal = JSONEditor.AbstractTheme.extend({
labelWidth: 3,
@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 / importhorde.php
Created December 11, 2014 09:52
Import Horde contacts/identities/preferences to Roundcube This is dependent on being placed within the roundcube bin directory.
<?php
//
// Usage Example:
// importhorde.php -r sqlite:////roundcube.sqlite?mode=0646 -h mysql://user:pass@127.0.0.1:3306/horde -c -p
//
define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH.'program/include/clisetup.php';
ini_set('memory_limit', -1);
@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 / ubuntu-install-bitchx.sh
Created January 21, 2015 23:24
Compile and Install BitchX on Ubuntu
#!/bin/sh
####################################################################################
#
# Download Compile and Install BitchX on Ubuntu
#
####################################################################################
# download bitchx source
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic)
@AubreyHewes
AubreyHewes / Dockerfile
Created January 21, 2015 23:42
BitchX Dockerfile (Docker, BitchX, Dockerised BitchX)
FROM ubuntu:14.10
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
libssl-dev \
ncurses-dev \