Skip to content

Instantly share code, notes, and snippets.

Brent O'Connor epicserve

Block or report user

Report or block epicserve

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
epicserve /
Created Jun 21, 2019
Example on how to get Bitbucket Pipelines build data
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session
In order to use this class you're have to setup an API token first by going to
And then add an OAuth consumer. Please note this will not work if you don't provide Callback URL when creating your
consumer. I just provided a generic URL since we don't need callbacks. The documentation for the bitbucket API is
located here,
Example usage:
import os
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session
client_id = os.environ['BITBUCKET_KEY']
client_secret = os.environ['BITBUCKET_SECRET']
username = os.environ['BITBUCKET_USERNAME']
password = os.environ['BITBUCKET_PASSWORD']
token_url = ''
epicserve / .dockerignore
Last active Dec 27, 2017 — forked from jefftriplett/.dockerignore
How I use Docker and Compose
View .dockerignore
View js_pattern.js
function Thing(name) {
this.thing = name;
Thing.prototype = {
get_thing: function() {
return this.thing;
View pears.yml
- name: pears
root: ~/Sites/oeie/pears
layout: main-vertical
- workon pears
- workon pears && ./ rqworker default low
- workon pears && ./ runserver
- gulp
View _media_queries.scss
* ------------------------------------------------------------------------- */
$tablet_landscape_width: "1024px";
$tablet_portrait_width: "768px";
$phone_landscape_width: "667px";
$phone_portrait_width: "375px";
Mixin for Media Queries
View connect_to_vpn.scpt
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- (Or export to .app to run from spotlight.)
-- 2. Set domainName, vpnGroup and securePassword to their correct values for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server (or for this .app if so exported)
-- 5. Trigger script from the menu (or run from spotlight)
-- 6. Enjoy being connected
-- 7. Run script again to close connection
epicserve /
Last active Aug 29, 2015
A handy little mixin for adding related objects to a view like DeleteView.
from django.views.generic.base import ContextMixin
from django.contrib.admin.utils import NestedObjects
class RelatedObjectsMixin(ContextMixin):
"""Adds the related_objects list to a views context """
def get_context_data(self, **kwargs):
context = super(RelatedObjectsMixin, self).get_context_data(**kwargs)
collector = NestedObjects(using='default')
You can’t perform that action at this time.