Skip to content

Instantly share code, notes, and snippets.

Dustin J. Mitchell djmitche

Block or report user

Report or block djmitche

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
@djmitche
djmitche / @@INTRO.md
Last active Oct 20, 2019
My use of Taskwarrior
View @@INTRO.md

Getting Started

My Usage

I've been using this for several years now, so here are some of the ways I have set it up to be most productive. See my taskrc below for implementation details.

In general, I've had the most success by keeping lists of tasks short and to the point, avoiding the anxiety of seeing 100 tasks and feeling like I'm going to drown.

View mozilla-levels.md

Some Mozillians choose to share their levels (P<number>, S<number>, or M<number>) in their https://people.mozilla.org entries. If you want to share yours too, you can edit your profile and put the level in the "Bio" field. Note that this is entirely at your discretion, and be careful not to pressure others to share if they don't want to!

I am a P<number> <role name> ([why I mention this](https://bit.ly/2LVA4Cz))
View @@todo.md

TODO

Actions:

name actionPerm access scopes in-tree custom in tools custom in treeherder notes
retrigger generic all push yes yes yes bug
edit and retrigger generic all push no yes yes treeherder redirects to task-creator
add-new-jobs generic all push yes
run-all-talos generic all push yes
@djmitche
djmitche / signin-aws
Last active Jul 24, 2019 — forked from jonasfj/signin-aws
A simple script for forcing 2FA usage with AWS credentials
View signin-aws
#!/bin/bash
# This script expects AWS credentials:
# SIGNIN_AWS_ACCESS_KEY_ID
# SIGNIN_AWS_SECRET_ACCESS_KEY
# Or it will use the credentials set up with `aws configure` if those are not set.
#
# It optionally epects the TOTP entry name in your yubikey
# SIGNIN_AWS_YUBIKEY_OATH_NAME
# Put these environment variables into your .bashrc.local (or .bashrc, if you
View graphdiff.py
import json
import difflib
import sys
import re
def relabel(graph):
'restore the original labels, based on task.metadata.name'
newgraph = {}
changes = {}
for old, t in graph.iteritems():
View reading-by-moonlight.py
import time
PHASE = 11 * 24 * 3600 + 7 * 3600 + 45 * 60
now = int(time.time())
next = now - (now % PHASE) + PHASE
print("phase: {} days {} hours {} minutes".format(PHASE / (3600*24), PHASE % (3600*24) / 3600, PHASE % 3600 / 60))
def time_is_link(when):
@djmitche
djmitche / question.md
Last active Feb 28, 2017
Rust design question
View question.md

Context

I'm building a layered application, and I would like to use generic types to be able to test each layer independently of the others. Very generally, (and incorrectly, as lifetimes are omitted) this would look like

trait Layer1 {}
struct RealLayer2<L1: Layer1> {
    layer1: &L1,
}
@djmitche
djmitche / Hv4rirrYRtmcYfD974aCTw mozharness.zip .md
Last active Oct 3, 2016
SlX0CIF8QiaNy6oL78cOcA/0/public/build/target.web-platform.tests.zip
View Hv4rirrYRtmcYfD974aCTw mozharness.zip .md

failure

https://treeherder.mozilla.org/logviewer.html#?job_id=36914958&repo=mozilla-inbound#L169

 [task 2016-10-03T13:41:40.656339Z] + curl --fail -o mozharness.zip --retry 10 -L https://queue.taskcluster.net/v1/task/Hv4rirrYRtmcYfD974aCTw/artifacts/public/build/mozharness.zip
 [task 2016-10-03T13:41:40.740187Z]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
 [task 2016-10-03T13:41:40.740271Z]                                  Dload  Upload   Total   Spent    Left  Speed
 [task 2016-10-03T13:41:40.740286Z] 
 [task 2016-10-03T13:41:41.219811Z]   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 [task 2016-10-03T13:41:41.219892Z] 100    29  100    29    0     0     51      0 --:--:-- --:--:-- --:--:--    60
 [task 2016-10-03T13:41:41.540383Z] 
@djmitche
djmitche / mercurial.md
Last active Sep 19, 2016
Mercurial and Mozreview
View mercurial.md

Mercurial

Conceptual

Not much like the Github / Git-flow model. "Branches" are implemented as repositories, and we have a few types of repositories:

  • try -- pushes here parse "try syntax" which defines the jobs you want to run; used for testing
  • integration -- this is the entry into mozilla-central; patches here are tested but will be backed out by sheriffs if they cause failures (mozilla-inbound and autoland)
View @@Federated Logins.md

Goals

  • Users see a single, consistent "app" representing TaskCluster
  • Users can control access granted to other applications
  • Other applications interact only with the tools site
  • Non-employee authentication remains possible after Persona sunsets
You can’t perform that action at this time.