Skip to content

Instantly share code, notes, and snippets.

Blazing a trail the likes of which has never been seen.

Rory Bramwell rbramwell

Blazing a trail the likes of which has never been seen.
View GitHub Profile


When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
aj-jester / sorted_json.rb
Last active Jan 18, 2018
Puppet parser function that takes unsorted hash and outputs sorted JSON object.
View sorted_json.rb
require 'json'
module JSON
class << self
@@loop = 0
def sorted_generate(obj)
rbramwell /
Last active Aug 29, 2015 — forked from joyrexus/
REST basics

Basics of RESTful API design

  • Your API should be designed around the idea of resources.

  • Resources represent things (nouns) and not behaviors (verbs).

  • Each resource should have a canonical/unique url (api/users/bill, api/users/mary).

  • Return all resource properties in the return payload.

aembleton /
Last active Jan 22, 2021 — forked from vdavez/
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

zuphilip /
Last active Jun 11, 2020
Zotero in Word/LibreOffice

It seems essential to use a 32-bit Java version and not 64-bit Java version for the LibreOffice integration of Zotero. However, it is possible to install several Java version on the same machine and to choose in LibreOffice one version to use (Tools-->Options-->Advanced):

Choose Java version in LibreOffice


On Windows 10 with LibreOffice 5 the autoinstaller does not work. Thus, one has to manually install

View MyRetryPolicy.scala
class MyRetryPolicy(maxRetries: Int) extends RetryPolicy {
override def onReadTimeout(statement: Statement,
cl: ConsistencyLevel,
requiredResponses: Int,
receivedResponses: Int,
dataRetrieved: Boolean,
nbRetry: Int): RetryDecision = {
if (nbRetry < maxRetries) RetryDecision.retry(cl) else RetryDecision.rethrow()
View ConfigureWsMan.ps1
# Get a list of trusted hosts
Get-Item WSMan:\localhost\Client\TrustedHosts
# Note that these commands don't create a list of trusted hosts, it simply replaces the trusted host with what you set via the command. If you need to add multiple hosts, they need to be comma seperated
# Trust all computers in a domain
Set-Item WSMan:\localhost\Client\TrustedHosts *
# Turst a single machine
Set-Item WSMan:\localhost\Client\TrustedHosts -Value myserver
voxxit /
Last active Apr 19, 2021
Consul + Vault + MySQL = <3
git clone vault
cd vault
docker-compose up -d
export VAULT_ADDR=

Initializing a vault:

vault init
masonforest / Dockerfile
Last active Mar 18, 2020
Test Drive Your Dockerfiles with RSpec and ServerSpec
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Mason Fischer <>
RUN apt-get update && apt-get install -y nodejs
#!/bin/bash -e
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE= #this URL shouldn't end in a /