class BaseJobResource(Resource):
def dispatch_request(
self, provider: str, owner_name: str, repo_name: str, build_number: int, job_number: int, *args, **kwargs
) -> Response:
queryset = Job.query.join(Build, == Job.build_id).join(
Repository, == Build.repository_id
Repository.provider == RepositoryProvider(provider),
Repository.owner_name == owner_name, == repo_name,
View componentToString.js
import ReactDOM from 'react-dom';
const componentToString = function(node) {
let el = document.createElement('div');
ReactDOM.render(node, el);
return el.innerHTML;
View gist:93a088759f532c3a398f
>>> import subprocess
>>> proc = subprocess.Popen(['git', 'clone', '', '/tmp/ds-repo-1'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
>>> print(proc.communicate())
("Cloning into '/tmp/ds-repo-1'...\n", None)
View gist:099511a7a8f9efab7517
'version': 1,
'disable_existing_loggers': True,
'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'simple',
'sentry': {
View gist:f825896f3acfea9b5b73
api.assign() =>
.success(() => AssignSuccessAction())
.error(() => AssignErrorAction())
ThingStore =>
// we want to emulate a Set() for this
import logging
from django.http import HttpResponse
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from email_reply_parser import EmailReplyParser
from email.utils import parseaddr
from import process_inbound_email
#!/usr/bin/env python
from sentry.utils.runner import configure
from datetime import datetime, timedelta
from import tsdb
def cleanup_connection(connection, epoch):
def delete(key):

Item List => Item => ItemStatusSelector

  • Need to maintain certain state in ItemStatusSelector (specifically have we "saved" the change, this is to avoid passing useless properties all over the place like itemStatusIsSaving)
  • Currenlty Item List controls item via prop, which controls item status via prop. This means we pass an onStatusChange all the way back to Item List.
  • [Re]flux seems to resolve this by using some store/action combo, but unclear if "Item" is in an "item list" store or if each item should be its own store, or how "change item status" should actually flow
View gulpfile.js
'use strict';
var gulp = require('gulp'),
gp_changed = require('gulp-changed'),
gp_clean = require('gulp-clean'),
gp_concat = require('gulp-concat'),
gp_filesize = require('gulp-filesize'),
gp_less = require('gulp-less'),
gp_rename = require('gulp-rename'),
gp_uglify = require('gulp-uglify'),
View pgbouncer.rb
class PgbouncerStats < Scout::Plugin
# need the ruby-pg gem
needs 'pg'
name: Pgbouncer username
notes: Specify the username to connect with
name: Pgbouncer password