Skip to content

Instantly share code, notes, and snippets.

View holaontiveros's full-sized avatar

Javier Ontiveros holaontiveros

View GitHub Profile
@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();
});