Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@davidillsley
davidillsley / SingleUserBasicAuthAuthenticator.java
Created March 24, 2015 22:57
Hardcoded Basic-Auth authenticator for Play2/Java
import play.mvc.Http;
import play.mvc.Result;
import play.mvc.Security;
import java.nio.charset.Charset;
import java.util.Base64;
import static java.util.Optional.ofNullable;
/**
@davidillsley
davidillsley / keybase.md
Created December 30, 2014 17:46
keybase

Keybase proof

I hereby claim:

  • I am davidillsley on github.
  • I am davidillsley (https://keybase.io/davidillsley) on keybase.
  • I have a public key whose fingerprint is FF77 84AF 06C7 FB90 26CB B50B DC78 0D28 E66F 3063

To claim this, I am signing this object:

[
{
"baseUrl": "https://github.gds/api/v3/repos",
"userName": "gds",
"repo": "ida-hub"
}
}
@davidillsley
davidillsley / gist:7481319
Last active December 28, 2015 09:48
Accessing EMC Atmos using S3 tooling

Accessing EMC Atmos using S3 tooling

There are loads of tools out there built around the AWS APIs. In response to that, some software comes with an AWS compatibility layer. One of them is EMC Atmos.

There's a surprising lack of documentation on how to actually use this compatibility. The best I could find is the "EMC® Atmos™ Version 2.1 Programmer’s Guide P/N 300-013-493 REV 01". However, all it does it tell you that the S3 compatibility is hosted on a different port, and which operations are supported. It doesn't give any hints on how to get any tools working.

The main gotcha seems to be that the S3 API has both a path and DNS based way of accessing buckets. It's important to use the path based mechanism.

JetS3t

const widgets = require("widget");
var widget = widgets.Widget({
id: "button test",
label: "Button Test",
content: "<html><body><form><input value='Press Me!' type='button' id='button'></form></body></html>",
contentScript: "document.getElementById(\"button\").addEventListener(\"click\",function(){window.alert(\"Clicked\");},false);",
width: 100
});
@davidillsley
davidillsley / main.js
Created March 30, 2011 21:39
Firefox Jetpack which shows a widget on YouTube watch pages
const widgets = require("widget");
var ytWidgets = {}
function ytEventOccurred(data){
if(data.event == "load"){
ytWidgets[data.url] = widgets.Widget({
label: "YT Button",
contentURL: "http://www.youtube.com/favicon.ico"
});