Skip to content

Instantly share code, notes, and snippets.

@sebmaynard
sebmaynard / clacks_middleware.erl
Created March 16, 2015 08:44
Clacks Middleware for Cowboy on Erlang.
%% A man is not dead while his name is still spoken.
-module(clacks_middleware).
-behaviour(cowboy_middleware).
-export([execute/2]).
execute(Req, Env) ->
ReqWithClacks = cowboy_req:set_resp_header(<<"x-clacks-overhead">>, <<"GNU Terry Pratchett">>, Req),
{ok, ReqWithClacks, Env}.
@sebmaynard
sebmaynard / bookmarklet.js
Last active October 3, 2022 18:09
Evernote HTML Editor
/*
Copyright 2015 Seb Maynard
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@sebmaynard
sebmaynard / create_dns_records.sh
Created March 7, 2019 16:36
Create dns records on route53 from a text file
#!/bin/bash -e
usage() {
echo "Need a hosted zone name (abc.com.) with the dot on the end"
exit 1
}
HOSTED_ZONE_NAME=$1
if [[ "$HOSTED_ZONE_NAME" == "" ]] ; then
usage