Skip to content

Instantly share code, notes, and snippets.

View holaontiveros's full-sized avatar

Javier Ontiveros holaontiveros

View GitHub Profile
@holaontiveros
holaontiveros / open-edx-useful-commands-for-inside-server
Created December 2, 2025 17:26
List of commands that I need to have handy while doing dev work for Open Edx
# Run a test from the container (with the right module settings)
DJANGO_SETTINGS_MODULE=lms.envs.test python -m pytest lms/djangoapps/instructor/tests/test_api.py -xvs
@holaontiveros
holaontiveros / Git list files
Created November 19, 2019 18:36
List files in git repository and filter out specific files
# get the files | sort by size | don't list by specific text | limit of the list
git ls-tree -r -t -l --full-name HEAD | sort -n -k 4 | grep -v '.js' | tail -n 30
@holaontiveros
holaontiveros / download-images.js
Created January 19, 2019 01:16
Function to download a bunch of images from an array of urls
const downLoadImages = (links, title = 'img') => {
links.forEach((element, i) => {
const a = document.createElement('a');
a.setAttribute('href', element);
a.setAttribute('download', `${title}_${i}.png`);
document.body.appendChild(a);
a.click();
a.remove();
});