Skip to content

Instantly share code, notes, and snippets.

View agiron123's full-sized avatar

Andre Giron agiron123

View GitHub Profile
const temperatureUrlArray = [
"best-data.json",
"average-data.json" ,
"worst-data.json"
];
Promise.allSettled(temperatureUrlArray.map((url) => get(url)))
.then((temperatureResults) => {
for (let i = 0; i < temperatureResults.length; i++) {
if (temperatureResults[i].status === 'fulfilled') {
// https://stackoverflow.com/questions/8495687/split-array-into-chunks/10456644#10456644
let perChunk = 3; // items per chunk
let inputArray = [1,2,3,4,5,6,7,8,9];
const result = inputArray.reduce((resultArray, item, index) => {
const chunkIndex = Math.floor(index / perChunk);
if (!resultArray[chunkIndex]) {
resultArray[chunkIndex] = []; // start a new chunk
}
@agiron123
agiron123 / Mailchimp Embed
Created June 23, 2016 15:26
MailChimp signup form. Trying to embed this with JSX.
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="//mailchimp.list.id.stuff" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
### Keybase proof
I hereby claim:
* I am agiron123 on github.
* I am agiron (https://keybase.io/agiron) on keybase.
* I have a public key whose fingerprint is BA61 04C4 C6A2 E9BB B651 129E 4B66 FAB5 A337 6313
To claim this, I am signing this object: