Skip to content

Instantly share code, notes, and snippets.

View djmitche's full-sized avatar

Dustin J. Mitchell djmitche

View GitHub Profile
@djmitche
djmitche / 00-TODO.md
Last active September 22, 2016 21:36
Dustin's proposal for a new in-tree task-graph generation system

Login v3

Goals

  • Users should be able to login easily to the tools site to carry out day-to-day tasks.
  • Users should be able to create and manage limited-access permanent credentials for use in their own automation
  • Permanent credentials tied to users should be disabled when those users lose the relevant permissions
  • All services have a consistent, reliable way to log who or what is making a particular request.
@djmitche
djmitche / ideas.md
Last active October 20, 2015 03:35
Linking TC to external authentication services

Anonymous

  • create a well-known clientId anonymous with a well-known accessKey (in the sense that it's in cleartext on the client side of tools.taskcluster.net); when not using some other credential, that's the credential tools uses.

Client Creation

  • Allow user-driven creation of new clients (limited to some suffix by a scope that's defined in assume:client-id:anonymous)
  • Allow association and dissociation of credentials with individual external users (GitHub, Mozillians, LDAP, Persona)
  • Most users will only create one clientId, and just leave it in localStorage
import os,ctypes,struct,errno,sys
CLONE_NEWIPC = 0x08000000
CLONE_NEWUSER = 0x10000000
CLONE_NEWNET = 0x40000000
start_uid = os.getuid()
start_gid = os.getgid()
c = ctypes.CDLL("libc.so.6", use_errno = True)
package main
import "fmt"
type Executer interface {
Show()
}
type executer struct {
b int
package main
func call_a_thing(f func() interface{}) {
}
type Structure struct {
a int
}
func thing1() Structure {
### Keybase proof
I hereby claim:
* I am djmitche on github.
* I am djmitche (https://keybase.io/djmitche) on keybase.
* I have a public key whose fingerprint is C03D 5638 BD2B 4356 E8A3 9FE0 7625 403D 7F0D 15B1
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am djmitche on github.
* I am djmitche (https://keybase.io/djmitche) on keybase.
* I have a public key whose fingerprint is C03D 5638 BD2B 4356 E8A3 9FE0 7625 403D 7F0D 15B1
To claim this, I am signing this object:
@djmitche
djmitche / stuff.md
Created April 20, 2015 19:01
hg stuff

Commands

  • hg rebase
  • hg commit --amend
  • hg histedit (extension)
@djmitche
djmitche / elevator.js
Last active August 29, 2015 14:15
Elevator Saga Solution
{
init: function(elevators, floors) {
var directions = new Array();
var stopped_at = new Array();
elevators.forEach(function(el, el_idx) {
directions.push('up');
stopped_at.push(null);
});
var setDirection = function(el_idx, direction) {