Skip to content

Instantly share code, notes, and snippets.

View singingwolfboy's full-sized avatar
Available for contract work

David Baumgold singingwolfboy

Available for contract work
View GitHub Profile
edxapp@precise64:~/edx-platform$ paver run_quality
---> pavelib.quality.run_quality
---> pavelib.prereqs.install_python_prereqs
Python prereqs unchanged, skipping...
diff-quality --violations=pep8 --html-report /edx/app/edxapp/edx-platform/reports/diff_quality/diff_quality_pep8.html
-------------
Diff Quality
Quality Report: pep8
Diff: origin/master...HEAD, staged, and unstaged changes
-------------
% ansible --version
ansible 1.5.5
(configuration)db ~/dev/configuration (git)-[tags/aspen.1] mastodon
% cd vagrant/base/fullstack
(configuration)db ~/dev/configuration/vagrant/base/fullstack (git)-[tags/aspen.1] mastodon
% ls
Vagrantfile ansible.cfg
(configuration)db ~/dev/configuration/vagrant/base/fullstack (git)-[tags/aspen.1] mastodon
% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
db ~/devstack mastodon
% vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
* Documentation: https://help.ubuntu.com/
New release '14.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
*******************************************************************
* _ __ __ *
@singingwolfboy
singingwolfboy / models.py
Created November 20, 2014 22:43
I'm trying to set a relationship between User and UserEmail so that when I reference user.emails, the first email in the list is always the primary email. However, I'm getting `ProgrammingError: missing FROM-clause entry for table "app_user"` when I try to reference User.emails. How can I make this work? I might be going about this all wrong...
# coding=utf-8
from __future__ import unicode_literals, division
import sqlalchemy as sa
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import hybrid_property
from werkzeug.security import generate_password_hash, check_password_hash
Base = declarative_base()
% paver run_pylint
Warning: could not find environment JSON file at '/Users/db/lms.env.json'
---> pavelib.quality.run_pylint
---> pavelib.prereqs.install_python_prereqs
pip install -q --exists-action w -r requirements/edx/pre.txt
pip install -q --exists-action w -r requirements/edx/github.txt
Could not find a tag or branch 'd89aae2a82f2b', assuming commit.
Could not find a tag or branch '88ec8a011e481918fdc9d2682d4017c835acd8be', assuming commit.
Could not find a tag or branch 'cd0b2b31997afccde519fe5b3365e61a9edb143f', assuming commit.
Could not find a tag or branch 'efe14679c9263ab491916ed960f5930127e05faf', assuming commit.
@singingwolfboy
singingwolfboy / gist:388ea46d45677af852c6
Created January 16, 2015 19:13
birch release notes

edX Insights

The initial version of edX Insights, our new course analytics product, is now available. In this release, edX Insights provides data for student enrollment activity, geographic location, and engagement with course content.

Team members who have the Instructor or Course Staff role can open edX Insights from the Instructor Dashboard. A banner announcing this new product displays at

[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.
@singingwolfboy
singingwolfboy / gist:a2ddff80f5dbb9a1dde9
Created January 27, 2015 21:45
Updating edx-platform via ansible
vagrant@precise64:/edx/app/edx_ansible/edx_ansible/playbooks/edx-east$ /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local edxapp.yml -e "@/edx/app/edx_ansible/server-vars.yml"
[WARNING]: It is unneccessary to use '{{' in loops, leave variables in loop
expressions bare.
PLAY [Deploy edxapp] **********************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
2014-10-28 14:31:05 [14528] [INFO] Worker exiting (pid: 14528)
2014-10-28 14:31:05,000 INFO 14528 [gunicorn.error] glogging.py:213 - Worker exiting (pid: 14528)
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 807, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python2.7/logging/handlers.py", line 745, in _connect_unixsocket
self.socket.connect(address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
vagrant@precise64:~$ cd /edx/app/edxapp/
vagrant@precise64:/edx/app/edxapp$ source venvs/edxapp/bin/activate
(edxapp)vagrant@precise64:/edx/app/edxapp$ cd edx-platform/
(edxapp)vagrant@precise64:/edx/app/edxapp/edx-platform$ ls
AUTHORS CONTRIBUTING.rst manage.pyc pavement.py setup.py
bin docs mongo_indexes.md pavement.pyc setup.pyc
Brewfile Gemfile node_modules pylintrc test_root
CHANGELOG.rst Gemfile.lock openedx README.md vendor_extra
cms LICENSE Open_edX.egg-info requirements
common lms package.json scripts