Skip to content

Instantly share code, notes, and snippets.


Danielle Madeley danni

View GitHub Profile
# Create a prompt command function that can set the terminal title with info including your Git branch
__prompt_command() {
# Based on:
local branch
if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then
if [[ "$branch" == "HEAD" ]]; then
danni /
Created Mar 8, 2016
Multi Choice Django Array Field
from django import forms
from django.contrib.postgres.fields import ArrayField
class ChoiceArrayField(ArrayField):
A field that allows us to store an array of choices.
Uses Django 1.9's postgres ArrayField
and a MultipleChoiceField for its formfield.
danni /
Last active Sep 12, 2020 — forked from leifdenby/
Django function for loading fixtures which use the current migration state of the model
import os
import logging
from django.core import serializers
LOGGER = logging.getLogger(__name__)
def load_fixture(app, fixture, ignorenonexistent=True):
View aloe.diff
diff --git a/aloe/ b/aloe/
index e2c99f8..51c7ac7 100644
--- a/aloe/
+++ b/aloe/
@@ -37,7 +37,6 @@ except NameError:
# pylint:disable=no-name-in-module,redefined-builtin
from importlib import reload
# pylint:enable=no-name-in-module,redefined-builtin
-from os.path import join, dirname
View View_CI_Images.user.js
// ==UserScript==
// @name View CI Images
// @namespace
// @description View CI Images
// @version 1
// @match https://gitlabci/projects/*/builds/*
// ==/UserScript==
(function ($) {
var text = $('#build-trace').html();
danni / Velocity.ipynb
Created Jan 1, 2015
Plot velocity from Redmine
View Velocity.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.