Skip to content

Instantly share code, notes, and snippets.

Bradley Beddoes bradleybeddoes

Block or report user

Report or block bradleybeddoes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am bradleybeddoes on github.
  • I am bradleybeddoes (https://keybase.io/bradleybeddoes) on keybase.
  • I have a public key ASARixgMEJF6IPvIDu4tCAE8KJ6H0GVdBlBWGsf99zCffgo

To claim this, I am signing this object:

@bradleybeddoes
bradleybeddoes / docker.zsh
Last active Jun 29, 2019
Docker completion for Zsh + prezto
View docker.zsh
$ docker run<tab>
-- no matches found --
$ curl -fLo ~/.zprezto/modules/completion/external/src/_docker https://raw.githubusercontent.com/docker/docker/master/contrib/completion/zsh/_docker
$ docker run<tab>
-- images --
0a89c74fff6c -- latest in bradleybeddoes/docker-whale
-- repositories --
bradleybeddoes/docker-whale
View aaf-attribute-filter.xml
<?xml version="1.0" encoding="UTF-8"?>
<afp:AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"
xmlns:afp="urn:mace:shibboleth:2.0:afp"
xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"
xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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
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 http://hawkee.com/snippet/9027/
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
Enjoy.
@bradleybeddoes
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
bradleybeddoes / .0.readme.md
Last active Jan 3, 2016
My DNSMasq configuration on OSX
View .0.readme.md

Developing on OSX with DNSMasq

Overview

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
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
end
@bradleybeddoes
bradleybeddoes / runMe.java
Created Nov 13, 2012 — forked from anonymous/runMe
vargs to vargs
View runMe.java
import java.io.PrintStream;
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
}
You can’t perform that action at this time.