Skip to content

Instantly share code, notes, and snippets.

View e0d's full-sized avatar

Edward Zarecor e0d

View GitHub Profile
@e0d
e0d / grimoire-link.sh
Created August 10, 2022 16:14
Script for generating PR Backlog Links for inclusion in catalog-info.yaml
{ "_comment": "This xAPI statement attempts to fully map all the data represented in the canonical sample event here https://edx.readthedocs.io/projects/devdata/en/latest/internal_data_formats/tracking_logs/sample_events.html",
"id": "8f87ccde-bb56-4c2e-ab83-44982ef22df0",
"actor": {
"objectType": "Agent",
"account": {
"homepage": "https://openedx.org/",
"name": "b5059046-d6db-11ec-8490-381428857bd9"
}
},
"verb": {
@e0d
e0d / json
Last active February 15, 2021 12:44
Test enriching
[
{
"conditions": [
{
"field": "origin",
"value": "https://github.com/edx/frontend-component-cookie-policy-banner"
}
],
"set_extra_fields": [
{
@e0d
e0d / edx-services.yml
Last active January 13, 2017 15:37
OPENEDx Security Overriddes
---
# Modeled loosely on /etc/services this file lists all the ports defined for services across all OPEN EDx Ansible
# configuration roles. Actual ports in use in your system will depend upon deployment choices that you have
# made. For example, you may run all your services on a single host, you may run more or fewer services depending
# upon environment.
#
# This list was generated on 1/13/2017 using the following commnad:
#
# find ${GIT_BASE}/edx/configuration/playbooks/roles/ -path "*/defaults/main.yml" \
@e0d
e0d / gist:7759702
Created December 2, 2013 21:49
migrationcheck
django-admin.py migrationcheck
processing courseware
Running migrations for courseware:
- Migrating forwards to 0010_rename_xblock_field_content_to_user_state_summary.
> courseware:0001_initial
> courseware:0002_add_indexes
> courseware:0003_done_grade_cache
> courseware:0004_add_field_studentmodule_course_id
> courseware:0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c
@e0d
e0d / gist:6297132
Created August 21, 2013 17:04
StrictUndefined with var names containing a - character
```
- name: analytics-experiments | install application requirements
pip:
requirements={{ analytics-experiments_requirements_file }}
virtualenv={{ analytics-experiments_venv_dir }} state=present
sudo: true
sudo_user: "{{ analytics-experiments_user }}"
tags:
- analytics-experiments
- deploy
@e0d
e0d / __init__.py
Created April 22, 2013 15:02
Pattern for handling dynamic inclusion of static resources
from xmodule.modulestore.django import modulestore
from xmodule.course_module import CourseDescriptor
from django.conf import settings
def pick_subdomain(domain, options, default='default'):
for option in options:
if domain.startswith(option):
return option
@e0d
e0d / db-error-prod-edx-001
Created December 4, 2012 02:52
DB error from prod-edx-001
Dec 4 02:45:10 localhost [mitx.courseware][env:prod_edx] ERROR [prod-edx-001 25902] [views.py:282] - Error in index view: user=edzedx, course=CourseDescriptor(<xmodule.modulestore.xml.ImportSystem object at 0x51388d0>, {'data': {'textbooks': [('Textbook', 'https://s3.amazonaws.com/edx-textbooks/guttag_computation_v2/')], 'wiki_slug': None}, 'children': ['i4x://MITx/6.00x/chapter/Week_0', 'i4x://MITx/6.00x/chapter/Week_1', 'i4x://MITx/6.00x/chapter/Week_2', 'i4x://MITx/6.00x/chapter/Week_3', 'i4x://MITx/6.00x/chapter/Week_4', 'i4x://MITx/6.00x/chapter/Week_5', 'i4x://MITx/6.00x/chapter/Exam_1', 'i4x://MITx/6.00x/chapter/Week_6', 'i4x://MITx/6.00x/chapter/Week_7', 'i4x://MITx/6.00x/chapter/Week_8', 'i4x://MITx/6.00x/chapter/Week_9', 'i4x://MITx/6.00x/chapter/Week_10', 'i4x://MITx/6.00x/chapter/Week_11', 'i4x://MITx/6.00x/chapter/Week_12', 'i4x://MITx/6.00x/chapter/Week_13', 'i4x://MITx/6.00x/chapter/Week_14', 'i4x://MITx/6.00x/chapter/Staff_Use'], 'filename': [u'course/2012_Fall.xml', u'course/2012_Fall.xml']