Skip to content

Instantly share code, notes, and snippets.

View leehambley's full-sized avatar

Lee Hambley leehambley

View GitHub Profile
<!-- Cowardly Includes -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,800,300,600' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Anonymous+Pro' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://pfefferle.github.io/openwebicons/packages/openwebicons/css/openwebicons-cdn.css">
<!-- End Cowardly Includes -->
<div class="harrow-card">
<div class="harrow-card-title harrow-card-title_success">
<h3><strong class="harrow-card-title-environment">Production</strong> Deployment</h3>
@leehambley
leehambley / go_scp.go
Last active August 29, 2015 14:23 — forked from jedy/go_scp.go
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@leehambley
leehambley / cheryl.rb
Last active August 29, 2015 14:21 — forked from seanhandley/cheryl.rb
DATES = [
"May 15", "May 16", "May 19",
"June 17", "June 18",
"July 14", "July 16",
"August 14", "August 15", "August 17"
]
def month(date); date.split[0]; end
def day(date); date.split[1]; end
@leehambley
leehambley / Readme.md
Last active August 29, 2015 14:16 — forked from sente/Readme.md

To define the function, paste the following code into your shell:

curlstats ()
{
    ( echo "url_effective\t%{url_effective}\n";
    echo "http_code\t%{http_code}\n";
    echo "content_type\t%{content_type}\n";
    echo "http_connect\t%{http_connect}\n";
 echo "time_total\t%{time_total}\n";
package main
import (
"database/sql"
"fmt"
"log"
"net/http"
"strconv"
_ "github.com/lib/pq"
CREATE DATABASE tt;
\c tt
CREATE TABLE widgets (
id INT PRIMARY KEY NOT NULL,
name TEXT NOT NULL
);
INSERT INTO widgets (id, name) VALUES (456, 'AeroPress');

Keybase proof

I hereby claim:

  • I am leehambley on github.
  • I am leehambley (https://keybase.io/leehambley) on keybase.
  • I have a public key whose fingerprint is B572 D3A1 75B5 C00B B038 2B16 9636 1275 BC29 7556

To claim this, I am signing this object:

the plumbing commands

  • rev-parse [something]

    • show the SHA of any weird git phrase
  • hash-object -w [file]

    • take any file or stdin and return a blob sha
  • ls-tree (-r) [sha]

  • show the entries of a git tree in the db

@leehambley
leehambley / AAAS.md
Last active December 31, 2015 02:59
Authorisation as a service?

Problem

Web applications need understand what permissions are granted to a current user in two key areas.

  1. When enforcing the permission server side (e.g returning 403 when trying to access a resource outside of one's graph)
  2. When rendering the user interface, so as not to render misleading controls (e.g "Edit this Widget", if the user lacks the appropriate permissions.

Further, in many applications in the wild (for better, or worse, perhaps I need new friends and colleagues) I've seen ways implementd to nerf or flat-out disable authorisation controls. In addition to the regular graph-based authorisation flow, the concept of super users is prevelant, and dangerous.

Background