Skip to content

Instantly share code, notes, and snippets.

Josh Mize jgmize

Block or report user

Report or block jgmize

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
jgmize /
Last active Oct 7, 2018 — forked from patrickfuller/
Export Issues from Github repo to json or csv (API v3)
#!/usr/bin/env python3
Exports issues from a list of repositories to individual csv files.
Uses basic authentication (Github username + password) to retrieve issues
from a repository that username has access to. Supports Github API v3.
Forked from
import argparse
import csv
import json
jgmize /
Last active Mar 20, 2018
Replication lag ETA
cmd="mysql -e 'show slave status\G' | grep Seconds_Behind_Master | awk '{print \$2}'"
while sleep $delay; do   eval $cmd; done | mawk -W interactive -v delay=$delay '
   passed += delay;



mkdir -p ~/tmp/bedrock-dev
cd ~/tmp/bedrock-dev
DEIS_PROFILE=usw deis config:pull -a bedrock-dev
export DEIS_PROFILE=oregon-b
deis2 create bedrock-dev
deis2 config:push -a bedrock-dev
View gist:ce347c600f0037be3511923d1ec5bdb5
Verifying my Blockstack ID is secured with the address 1C1iZRBZSDYuKENdR46or7DAcFzusyqCQ2
jgmize /
Created Sep 1, 2016
Jenkins demo deploy script
export DOCKERFILE=bedrock_base
export DOCKER_REPOSITORY=mozorg/bedrock_base
export DOCKERFILE=bedrock_code
export DOCKER_REPOSITORY=mozorg/bedrock_code
export FROM_DOCKER_REPOSITORY=mozorg/bedrock_base
jgmize / Dockerfile
Created Aug 18, 2016
postgresql-client docker install on top of
View Dockerfile
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7
RUN apt-get update && apt-get install -y postgresql-client
jgmize /
Created Jan 23, 2014
Extract relations of releases to notes from legacy db to new schema in RNA
import json
from django.db.models import Q
from rna.models import Release, Note
def dump_release_notes_map(filename='release-notes-map.json'):
"used on the legacy side with the legacy models"
with open(filename, 'w') as f:
[(, list(
jgmize / gist:6529655
Created Sep 11, 2013
Proposal of how to deal with legacy PHP lang param usage conflict with funfactory.middleware.LocaleURLMiddleware
View gist:6529655
from funfactory.middleware import LocaleURLMiddleware
from django.conf import settings
class ExceptionalLocaleURLMiddleware(LocalURLMiddleware):
Replacement for funfactory.middleware.LocaleURLMiddleware that supports excluding
specific paths from getting redirected if a lang param is present in the request.
def process_request(self, request):
if 'lang' in request.GET and request.path in getattr(
jgmize /
Created Feb 26, 2013
get URL content lengths using requests, a gevent process pool, and redis
#!/usr/bin/env python
import logging
import re
from gevent import monkey, spawn
from gevent.pool import Pool
from redis import Redis
import requests
View jenkins-stack-trace.txt
Stack trace
javax.servlet.ServletException: net.sf.json.JSONException: JSONObject["tag"] not found.
at org.kohsuke.stapler.Stapler.tryInvoke(
at org.kohsuke.stapler.Stapler.invoke(
at org.kohsuke.stapler.MetaClass$13.dispatch(
at org.kohsuke.stapler.Stapler.tryInvoke(
at org.kohsuke.stapler.Stapler.invoke(
at org.kohsuke.stapler.MetaClass$13.dispatch(
at org.kohsuke.stapler.Stapler.tryInvoke(
You can’t perform that action at this time.