Skip to content

Instantly share code, notes, and snippets.


Bradley Beddoes bradleybeddoes

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bradleybeddoes on github.
  • I am bradleybeddoes ( on keybase.
  • I have a public key ASARixgMEJF6IPvIDu4tCAE8KJ6H0GVdBlBWGsf99zCffgo

To claim this, I am signing this object:

bradleybeddoes / docker.zsh
Last active Apr 18, 2020
Docker completion for Zsh + prezto
View docker.zsh
$ docker run<tab>
-- no matches found --
$ curl -fLo ~/.zprezto/modules/completion/external/src/_docker
$ docker run<tab>
-- images --
0a89c74fff6c -- latest in bradleybeddoes/docker-whale
-- repositories --
View aaf-attribute-filter.xml
<?xml version="1.0" encoding="UTF-8"?>
<afp:AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"
xsi:schemaLocation="urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd
urn:mace:shibboleth:2.0:afp:mf:basic classpath:/schema/shibboleth-2.0-afp-mf-basic.xsd
urn:mace:shibboleth:2.0:afp:mf:saml classpath:/schema/shibboleth-2.0-afp-mf-saml.xsd">
bradleybeddoes / 0.readme.txt
Created Apr 12, 2014
Textual App script for announcing iTunes current track
View 0.readme.txt
Hacked on from original at
Save np.scpt at ~/Library/Application Scripts/com.codeux.irc.textual/np.scpt
Removed stuff I didn't need and fixed a bug
np.scpt:160:165: script error: Expected “then”, etc. but found identifier. (-2741) Y0
bradleybeddoes / 0.bash
Last active Aug 29, 2015
Add the ability to checkout Github pull request with number XXXX as local branches across all projects you maintain
View 0.bash
$> git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pull/*"
$> cd ~/development/myproj
~/development/myproj [develop] $> git checkout pull/XXXX
Branch pull/XXXX set up to track remote branch pull/XXXX from origin.
Switched to a new branch 'pull/XXXX'
~/development/myproj [pull/XXXX $] $>
bradleybeddoes /
Last active Jan 3, 2016
My DNSMasq configuration on OSX

Developing on OSX with DNSMasq


Allows multiple VirtualBox nodes to operate within a local DNS context and supports failover for DNS servers when moving to a network (QUT in my case) that does not support resolution of DNS through the their firewall.

By default Google public DNS servers are utilised for speed, security and sane results.

Another benefit of this approach is that I no longer need to run a bind instance locally which seems to break between major OSX revisions and was more of a pain to configure.

bradleybeddoes / web.rb
Last active Aug 18, 2016
Example AAF JWT code on Heroku
View web.rb
require 'sinatra'
require 'json'
require 'json/jwt'
use Rack::Session::Pool, :expire_after => 3600
get '/' do
erb :index
bradleybeddoes /
Created Nov 13, 2012 — forked from anonymous/runMe
vargs to vargs
import java.text.SimpleDateFormat;
public class runMe {
public static void main(String[] args) {
my_printf("Hello %s\n", "Dave");
View gist:3662526
groovy> s = new String(request.getAttribute('cn').bytes)
groovy> println s
Иван Петров
View fr-config.groovy
serviceproviders {
shib23 {
displayName = "Shibboleth Service Provider (2.3.x)"
selected = true
entitydescriptor = '$host/shibboleth'
acs {
post {
uri = '$host/Shibboleth.sso/SAML2/POST'
index = 1