Skip to content

Instantly share code, notes, and snippets.

View rbramwell's full-sized avatar
🚀
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
@rbramwell
rbramwell / docx2md.md
Created April 26, 2017 13:55 — forked from aembleton/docx2md.md
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

@rbramwell
rbramwell / devops-kpi-nifi-template.xml
Created September 21, 2018 07:06 — forked from fabiojose/devops-kpi-nifi-template.xml
DevOps KPI in Practice - Chapter 2
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>8ce97bbb-0162-1000-233e-5c8cc4c3a93f</groupId>
<name>DevOps KPI - Change Volume and Lead Time</name>
<snippet>
<connections>
<id>8a0d9e3d-1744-3d97-0000-000000000000</id>
<parentGroupId>33980602-0d29-3ae1-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];
@rbramwell
rbramwell / CustomPropertyDemo.xml
Created January 15, 2018 22:52 — forked from YolandaMDavis/CustomPropertyDemo.xml
Custom Property Support in EL Demo for NiFi
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template encoding-version="1.0"><description>This flow demonstrates use of custom properties in EL with UpdateAttributes processor and the PutFile processor</description><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><name>CustomPropertyDemo</name><snippet><connections><id>748758a2-2eb8-42fe-8fc6-d11d467c1e6c</id><parentGroupId>53d29129-3b42-40ab-a008-81ebb557b334</parentGroupId><backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold><backPressureObjectThreshold>10000</backPressureObjectThreshold><destination><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><id>4045eff6-fafc-4979-9138-b63d465c059a</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>success</selectedRelationships><source><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><id>70bb9f9d-0640-4122-bdc4-ce5e95cd27f6</id><type>PROCESSOR</type></source><zIndex>0</zIndex></
@rbramwell
rbramwell / CustomPropertyDemo.xml
Created January 15, 2018 22:52 — forked from YolandaMDavis/CustomPropertyDemo.xml
Custom Property Support in EL Demo for NiFi
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template encoding-version="1.0"><description>This flow demonstrates use of custom properties in EL with UpdateAttributes processor and the PutFile processor</description><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><name>CustomPropertyDemo</name><snippet><connections><id>748758a2-2eb8-42fe-8fc6-d11d467c1e6c</id><parentGroupId>53d29129-3b42-40ab-a008-81ebb557b334</parentGroupId><backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold><backPressureObjectThreshold>10000</backPressureObjectThreshold><destination><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><id>4045eff6-fafc-4979-9138-b63d465c059a</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>success</selectedRelationships><source><groupId>53d29129-3b42-40ab-a008-81ebb557b334</groupId><id>70bb9f9d-0640-4122-bdc4-ce5e95cd27f6</id><type>PROCESSOR</type></source><zIndex>0</zIndex></
@rbramwell
rbramwell / ansible-summary.md
Created December 15, 2017 01:12 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@rbramwell
rbramwell / validate_url.sh
Last active December 11, 2017 00:55 — forked from hrwgc/validate.sh
Validate URL using Bash cURL - Check if a resource exists at a URL
#!/bin/bash
# Simple function to check http response code before downloading a remote file
# Example usage:
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi
function validate_url () {
if [[ `curl -s --head "$1" | head -n 1 | grep "HTTP/[1-3].[0-9] [23].."` ]]; then echo "true"; fi
}
@rbramwell
rbramwell / wget-jdk-oracle-install-example.txt
Created October 19, 2017 15:40 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@rbramwell
rbramwell / boxstarter.ps1
Created September 14, 2017 04:37 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
#
# Learn more: http://boxstarter.org/Learn/WebLauncher
#---- TEMPORARY ---
@rbramwell
rbramwell / gist:58e6ad03e5ab59a7ccaa18924f3f4d87
Created September 4, 2017 20:39 — forked from datagrok/gist:2199506
Virtualenv's `bin/activate` is Doing It Wrong

Virtualenv's bin/activate is Doing It Wrong

I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.

Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.

This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.

Problems