Skip to content

Instantly share code, notes, and snippets.

Stephen Burrows melinath

  • Little Weaver Web Collective, LLC
  • Seattle, WA
Block or report user

Report or block melinath

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
@melinath
melinath / MigrationTest.py
Last active May 4, 2017
Testing migrations
View MigrationTest.py
from django.apps import apps
from django.core.management import call_command
from django.db.models.signals import pre_migrate, post_migrate
from django.test import TransactionTestCase
# See https://www.caktusgroup.com/blog/2016/02/02/writing-unit-tests-django-migrations/
# for the original code.
class MigrationTest(TransactionTestCase):
@property
View minion.conf
mysql.host: 'localhost'
mysql.port: 3306
mysql.user: 'mysql'
mysql.pass: ''
mysql.db: 'mysql'
mysql.unix_socket: '/opt/mysql/mysql.sock'
mysql.charset: 'utf8'
@melinath
melinath / dashboard_spec.md
Last active Aug 29, 2015
View spec example
View dashboard_spec.md

These are example view specs for brambling's UserDashboardView and InviteAcceptView.

User dashboard

template: brambling/dashboard.html

Context

  • upcoming_events: A list of public Events that haven't started yet, ordered by how soon they start
  • upcoming_events_interest: A list of public Events in the user's interest groups that haven't started yet, ordered by how soon they start
  • admin_events: A list of Events that the user can edit, ordered by how recently they were edited
  • registered_events: A list of upcoming Events that the user has bought (or started buying) a ticket for, ordered by when the event will start
@melinath
melinath / armstrong-requirements.git
Created Jul 31, 2014
Armstrong dev requirements
View armstrong-requirements.git
-e git+git://github.com/armstrong/armstrong.cli.git#egg=armstrong.cli
-e git+git://github.com/armstrong/armstrong.core.arm_access.git#egg=armstrong.core.arm_access
-e git+git://github.com/armstrong/armstrong.core.arm_content.git#egg=armstrong.core.arm_content
-e git+git://github.com/armstrong/armstrong.core.arm_layout.git#egg=armstrong.core.arm_layout
-e git+git://github.com/armstrong/armstrong.core.arm_sections.git#egg=armstrong.core.arm_sections
-e git+git://github.com/armstrong/armstrong.core.arm_wells.git#egg=armstrong.core.arm_wells
-e git+git://github.com/armstrong/armstrong.apps.articles.git#egg=armstrong.apps.articles
-e git+git://github.com/armstrong/armstrong.apps.content.git#egg=armstrong.apps.content
-e git+git://github.com/armstrong/armstrong.apps.images.git#egg=armstrong.apps.images
-e git+git://github.com/armstrong/armstrong.apps.related_content.git#egg=armstrong.apps.related_content
@melinath
melinath / gist:7933196
Last active Dec 31, 2015
Safety Dance Comment Policy
View gist:7933196
We believe that the highest priority for a dance community must be honoring the needs of its members for safety, respect, and empowerment, both physical and mental. Doing so requires taking into account the influence of race, class, gender, (dis)ability, age, and sexual orientation, as well as social capital, based on position in the community and/or technical skill.
This is a space for having conversations, sharing resources and ideas, and supporting/challenging each other as we do this necessary work in our communities.
Here are a few basic rules for this space:
* Sexist, homophobic, transphobic, racist, ableist, and other hateful language will not be tolerated.
* This is not a space for debating the validity of others’ experiences, especially in cases of harassment or assault.
* It’s not okay to tell someone else how they should feel.
@melinath
melinath / scrape_xkcd.py
Created Sep 19, 2012
Scraping xkcd's click & drag bit by bit.
View scrape_xkcd.py
import json
import os
import time
import requests
ROOT_DIR = "/Users/melinath/Pictures/xkcd"
MAX_QUADRANT_SIZE = 100
NOT_FOUND_PATH = os.path.join(ROOT_DIR, 'not_found.json')
if os.path.exists(NOT_FOUND_PATH):
@melinath
melinath / models.py
Created Mar 12, 2012
Templating test
View models.py
from django.db import models
class Bar(models.Model):
name = models.CharField(max_length=30)
class Foo(models.Model):
name = models.CharField(max_length=200)
date = models.DateTimeField()
View additional_settings.py
...
CELERY_IMPORTS = ('mainsite_project.celeryd_setup',)
...
View installation.rst
You can’t perform that action at this time.