Skip to content

Instantly share code, notes, and snippets.

View alexbilbie's full-sized avatar
👋

Alex Bilbie alexbilbie

👋
View GitHub Profile

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

@alexbilbie
alexbilbie / hook.rb
Created March 4, 2016 14:19 — forked from asimihsan/hook.rb
Hook for letsencrypt.sh to do DNS challenges
#!/usr/bin/env ruby
require 'aws-sdk'
require 'pry'
require 'awesome_print'
# ------------------------------------------------------------------------------
# Credentials
# ------------------------------------------------------------------------------
# pick up AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY by default from
####################################################################################################
# PrimeWireProxy.co.uk - a reverse proxy to allow blocked users access to PrimeWire.ag.
#
# When ever a proxy falls victim to internet censorship, another needs to replace it. A single,
# cheap ($15 per month) VPS is all you need to provide this service to others. NGINX is brilliant
# for this and will serve thousands of requests with no trouble. Just replace `primewire.ag` and
# `primewireproxy.co.uk` below to suite your needs.
#
# Say NO to Internet Censorship!
#
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@alexbilbie
alexbilbie / jenkins.md
Created August 13, 2013 14:36 — forked from skl/jenkins.md

Creating a new Jenkins Server

First step, make sure java -version reports 1.6 or higher. If the command fails or the version isn't high enough, download the latest version of Java JDK from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/index.html) (jdk-7u25-linux-x64.tar.gz at the time of writing) - a quick uname -m will let you know if you need the 32 or 64bit version. Installation instructions are available here (http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html#install-64).

My preference is to extract these to /usr/local and then ln -s /usr/local/jdk1.7.0_25 /usr/local/jdk.

Add /usr/local/jdk/bin to your $PATH.

Download the latest Jenkins WAR (1.519 currently) file from http://mirrors.jenkins-ci.org/war/latest/.

@alexbilbie
alexbilbie / awesome-php.md
Created October 29, 2012 11:01 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
@alexbilbie
alexbilbie / rss-subscribers.sh
Created September 27, 2012 19:36
Bash script to parse Apache log for a count of RSS subscribers and email it to you
#!/bin/bash
# Schedule this to run once a day with cron. Doesn't matter what time since it parses yesterday's hits (by default).
# I only tested this on the Marco.org server, which runs CentOS (RHEL). No idea how it'll work on other distributions, but it's pretty basic.
# Required variables:
RSS_URI="/rss"
MAIL_TO="your@email.com"
LOG_FILE="/var/log/httpd/access_log"
@alexbilbie
alexbilbie / PSR-0-final-proposal.md
Created April 8, 2012 22:11 — forked from Thinkscape/PSR-0-final-proposal.md
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="2988.895px" height="1885.335px" viewBox="0 0 2988.895 1885.335" enable-background="new 0 0 2988.895 1885.335"
xml:space="preserve">
<text transform="matrix(1 0 0 1 117.5674 193.3823)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Amersham</text>
<text transform="matrix(1 0 0 1 285.0654 207.4351)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Chorleywood</text>
<text transform="matrix(1 0 0 1 1316.9741 261.0347)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Mill Hill East</text>
<text transform="matrix(1 0 0 1 306.2056 236.7271)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Rickmansworth</t
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.