Skip to content

Instantly share code, notes, and snippets.

Avatar

Dustin J. Mitchell djmitche

View GitHub Profile
View README.md
  • pull master and push to main
  • update the default branch in GitHub settings (under "branches")
  • copy the branch protection settings (manually) from master to main
  • update automation to look at main instead of master and make a PR
    • also fix any links -- look for github.com/taskcluster/$REPO/
  • change community-tc-config if necessary
  • delete branch protection for master, push a new history-free commit there with a README (something like https://github.com/taskcluster/taskcluster/commit/5d2ef402861dee513bdf94c704dcbf6bad12bce3)
  • re-enable branch protection for master, require linear commits, and include administrators
  • for any open PRs, click "edit" and change the base branch to main
View README.md

Run this as python3 gcloud-tail.py FILTER. The result is in JSON format, with one line per log message. You can process the results with jq.

View mentoring.py
import csv
import sys
def common(row):
row['tz'] = row['Time Availability'].split('(')[0]
rv = '''
<li><em>Avaialble as:</em> {ml}</li>
<li><em>Time Availability:</em> {tz}</li>
<li><em>Organizational Level:</em> {org}</li>
<li><em>Organization:</em> {Organization}</li>
View listworkers.py
import json
import sys
import os
import urllib.request
def main():
rootUrl = os.environ["TASKCLUSTER_ROOT_URL"]
workerPoolId = sys.argv[1]
apiUrl = rootUrl + "/api/worker-manager/v1/workers/" + workerPoolId
View git-ghpull.sh
#! /usr/bin/env python3
import re
import sys
import json
import urllib.request
import argparse
import subprocess
# get config
try:
@djmitche
djmitche / @@INTRO.md
Last active Aug 3, 2020
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

[UPDATE June 2020]

The Mozilla Phonebook now shows staff levels by name in the "Official Job Title" field. This marks an improvement in transparency of levels within the organization!

Some of the technical details in this post, such as where to find your level, are out of date but preserved here.

The sections below on leveling-up and mis-leveling remain as relevant now as when this Gist was first written.

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():
You can’t perform that action at this time.