Skip to content

Instantly share code, notes, and snippets.

@dagg
dagg / mfe_custom_image_build_error_for_frontend_component_footer
Created September 19, 2023 17:09
Error in building custom mfe image for frontend-component-footer
@dagg
dagg / ErrorLogs_use_module.config.js_for_custom_frontend-platform_mount_in_dev.txt
Created November 8, 2022 15:58
module.config.js errors (frontend-platform in dev)
Attaching to tutor_dev-learning-1
tutor_dev-learning-1 |
tutor_dev-learning-1 | > @edx/frontend-app-learning@1.0.0-semantically-released start
tutor_dev-learning-1 | > fedx-scripts webpack-dev-server --progress
tutor_dev-learning-1 |
tutor_dev-learning-1 | Running with resolved config:
tutor_dev-learning-1 | /openedx/app/webpack.dev.config.js
tutor_dev-learning-1 |
tutor_dev-learning-1 | Resolving modules from local directories via module.config.js.
tutor_dev-learning-1 | Using local version of @edx/frontend-platform from ../src/frontend-platform/dist/.
@dagg
dagg / ErrorLogs_github_component-footer.txt
Created November 7, 2022 17:35
ErrorLogs from applying github based component-footer to open edx MFEs
@dagg
dagg / ErrorLogs_npm_component-header.txt
Created November 7, 2022 17:32
ErrorLogs from applying npm based component-header to open edx MFEs
==============================================
Stopping any existing platform
==============================================
docker compose -f /home/user/.local/share/tutor/env/local/docker-co
@dagg
dagg / ErrorLogs_github_frontend-platform.txt
Created November 7, 2022 17:29
ErrorLogs from applying github based frontend-platform to open edx MFEs
==============================================
Stopping any existing platform
==============================================
docker compose -f /home/user/.local/share/tutor/env/local/docker-compose.yml -f /home/user/.local/share/tutor/env/local/docker-compose.prod.yml -f /home/user/.local/share/tutor/env/local/docker-compose.tmp.yml --project-name tutor_local stop
[+] Running 18/0
⠿ Container tutor_local-caddy-1 Stopped 0.0s
⠿ Container tutor_local-mysql-permissions-1 Stopped 0
@dagg
dagg / templating.py
Created November 6, 2018 15:04
Python Templates using external file
'''
Let's suppose the external file `template.txt` contains the text:
`Hello $name, how are you today?`
'''
# import Template
from string import Template
# Open external file
file = open('template.txt')
# zeep needs to be installed
from zeep import Client, helpers
from zeep.wsse.username import UsernameToken
# We use google weather's WSDL to test our script
client = Client('https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl')
# the request to the web service will be sent with the zipCodeList argument (we give the value 90210 to the zipcode argument)
req = {"zipCodeList": 90210}
# the response from calling the LatLonListZipCode method (give zipcode to get lat and lon)
resp = client.service.LatLonListZipCode(**req)
@dagg
dagg / cypress_to_dogwood_error.log
Created September 6, 2016 13:37
OpenEdX Upgrade from Cypress to Dogwood error
This file has been truncated, but you can view the full file.
Running the Django 1.8 faked migrations
2016-09-06 08:44:47,057 INFO 2239 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
System check identified some issues:
WARNINGS:
wiki.ArticleRevision.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
HINT: Use GenericIPAddressField instead.
Operations to perform:
Synchronize unmigrated apps: eventtracking_django, links, djcelery, discussion_api, edxnotes, auth_exchange, service_status, sekizai, rest_framework, edxmako, openassessment, datadog, staticbook, common_views, course_wiki, support, open_ended_grading, course_structure_api, django_countries, humanize, course_blocks, provider, static_replace, notification_prefs, thumbnail, xblock, mptt, staticfiles, microsite_configuration, markdownedx, fileupload, edx_sga, edx_jsme, monitoring, instructor, static_template_view, corsheaders, pipeline, simple_history, enrollment, messages, config_mo
@dagg
dagg / pyMd5sum.py
Created October 16, 2015 00:12
md5sum of a file in python
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import hashlib
def generate_file_md5(rootdir, filename, blocksize=2**20):
m = hashlib.md5()
with open( os.path.join(rootdir, filename) , "rb" ) as f:
@dagg
dagg / gist:c4f89ddaf81f557b1dcc
Last active March 20, 2016 20:21
Check if something is file or dir with python
import os
x = os.listdir('.') #list of files in current dir
for i in x:
if os.path.isdir(i):
print i, 'is dir'
if os.path.isfile(i):
print i, 'is file'