Skip to content

Instantly share code, notes, and snippets.

View albertfdp's full-sized avatar

Albert Fernández albertfdp

View GitHub Profile
@albertfdp
albertfdp / download.js
Created January 23, 2020 18:10
Download files from Amazon
const chunk = (arr, size) =>
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) =>
arr.slice(i * size, i * size + size)
);
chunk([...document.querySelectorAll(".file-list-node.selectable")], 10).forEach(
(files, i) => {
console.log("downloading chunk", i);
files.forEach(node => node.click());
document.querySelector("button.download").click();
module.exports = {
entry: './src/index.js',
output: {
path: './build',
filename: 'bundle.js'
}
}
@albertfdp
albertfdp / README.md
Created February 7, 2016 16:31 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

Verifying that +albertfdez is my blockchain ID. https://onename.com/albertfdez
@albertfdp
albertfdp / styles.css
Created October 7, 2015 08:29 — forked from pburtchaell/styles.css
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@albertfdp
albertfdp / keybase.md
Created September 30, 2014 18:06
keybase.md

Keybase proof

I hereby claim:

  • I am albertfdp on github.
  • I am albertfdp (https://keybase.io/albertfdp) on keybase.
  • I have a public key whose fingerprint is 1658 AB96 3562 DDEA C5C8 CD82 AE7C 0C44 59E1 9798

To claim this, I am signing this object: