Skip to content

Instantly share code, notes, and snippets.

View holaontiveros's full-sized avatar

Javier Ontiveros holaontiveros

View GitHub Profile
@holaontiveros
holaontiveros / wordpress-v2-no-multisite
Last active January 22, 2026 01:29
cloud panel wp no multisite
#{"rootDirectory":"","phpVersion":"8.2"}
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
{{ssl_certificate_key}}
{{ssl_certificate}}
{{server_name}}
{{root}}
@holaontiveros
holaontiveros / open-edx-useful-bits
Last active January 26, 2026 17:14
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
# Create admin user // change dev to local if required
tutor dev do createuser --staff --superuser javier javier.ontiveros@wgu.edu
@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();
});