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

FORMAT: 1A

edX RESTful API

The edX API is designed to allow clients to introspect and manipulate XBlocks and their related models. This API will live under the subdomains student.api.edx.org and author.api.edx.org; the former is optimized for viewing courses, and the latter is optimized for creating and editing courses. This may affect which pieces of data are returned by each of the API endpoints listed below, but for the most part, these two facets behave similarly.

Keybase proof

I hereby claim:

  • I am singingwolfboy on github.
  • I am singingwolfboy (https://keybase.io/singingwolfboy) on keybase.
  • I have a public key whose fingerprint is 2C2D BFBB BA19 1DC2 31D0 3EA1 B5E1 53B2 FC2A 6837

To claim this, I am signing this object:

@singingwolfboy
singingwolfboy / gist:10739329
Created April 15, 2014 14:57
Couldn't bring up himasha-devstack (edX)
% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'himbasha-devstack' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'himbasha-devstack' (v0) for provider: virtualbox
default: Downloading: http://files.edx.org/vagrant-images/20140325-himbasha-devstack.box
==> default: Successfully added box 'himbasha-devstack' (v0) for 'virtualbox'!
==> default: Importing base box 'himbasha-devstack'...
==> default: Matching MAC address for NAT networking...
==> default: Running provisioner: shell...
default: Running: inline script
stdin: is not a tty
PLAY [Deploy the edx_ansible role] ********************************************
TASK: [edx_ansible | git checkout edx_ansible repo into edx_ansible_code_dir] ***
changed: [localhost]
TASK: [edx_ansible | install edx_ansible venv requirements] *******************
my_list:
- foo
- bar
- >
my very long
list item
all on one line
- baz
[singingwolfboy-sandbox] singingwolfboy@singingwolfboy i-35724c66:~$ cd /edx/app/edxapp/edx-platform
[singingwolfboy-sandbox] singingwolfboy@singingwolfboy i-35724c66:/edx/app/edxapp/edx-platform$ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws create_user -e user@example.com
2014-05-05 13:20:47,341 INFO 17948 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2014-05-05 13:20:49,592 INFO 17948 [requests.packages.urllib3.connectionpool] connectionpool.py:202 - Starting new HTTP connection (1): localhost
2014-05-05 13:20:50,436 INFO 17948 [lms.lib.comment_client.utils] utils.py:49 - comment_client_request_log: request_id=c4047db0-6ba3-41a3-9a78-1a33d0b323b9, method=put, url=http://localhost:18080/api/v1/users/5, duration=0.846215963364
2014-05-05 13:20:50,437 ERROR 17948 [edx.discussion] models.py:1061 - Could not create comments service user with id 5
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/mode
changed: [default] => (item={'wheel': 'psutil-1.2.1-cp27-none-linux_x86_64.whl', 'pkg': 'psutil==1.2.1'}) => {"changed": true, "cmd": "/home/jenkins/wheel_venv/bin/pip wheel --wheel-dir=/home/jenkins/wheelhouse \"psutil==1.2.1\" && /home/jenkins/wheel_venv/bin/pip install --use-wheel --no-index --find-links=/home/jenkins/wheelhouse \"psutil==1.2.1\" ", "delta": "0:00:01.772245", "end": "2014-05-08 15:20:27.111863", "item": {"pkg": "psutil==1.2.1", "wheel": "psutil-1.2.1-cp27-none-linux_x86_64.whl"}, "rc": 0, "start": "2014-05-08 15:20:25.339618", "stderr": "", "stdout": "Downloading/unpacking psutil==1.2.1\n Running setup.py (path:/home/jenkins/wheel_venv/build/psutil/setup.py) egg_info for package psutil\n \nBuilding wheels for collected packages: psutil\n Running setup.py bdist_wheel for psutil\n Destination directory: /home/jenkins/wheelhouse\nSuccessfully built psutil\nCleaning up...\nIgnoring indexes: https://pypi.python.org/simple/\nDownloading/unpacking psutil==1.2.1\nInstalling collected package
% scripts/reset-test-db.sh
Traceback (most recent call last):
File "./manage.py", line 90, in <module>
startup = importlib.import_module(edx_args.startup)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/db/dev/edx-platform/lms/startup.py", line 8, in <module>
settings.INSTALLED_APPS # pylint: disable=W0104
File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 184, in inner
self._setup()
root@singingwolfboy:/edx/app/edxapp/edx-platform# /edx/bin/update edx-platform 0c1b045
PLAY [Deploy edxapp] **********************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [edxapp | setup the edxapp env] *****************************************
ok: [localhost]
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='/static_content.html'/>
<%static:css group='style-vendor-tinymce-content'/>
<%static:css group='style-vendor-tinymce-skin'/>
no quotes: ${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js')}
<br>
single quotes: '${static.url("js/vendor/tinymce/js/tinymce/tinymce.full.min.js")}'
<br>
double quotes: "${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js')}"
<br>