Skip to content

Instantly share code, notes, and snippets.

View iheartmedia-matt's full-sized avatar

Matt Reynolds iheartmedia-matt

  • iHeartMedia
  • Los Angeles
View GitHub Profile
@iheartmedia-matt
iheartmedia-matt / async-foreach.js
Last active February 13, 2020 22:35 — forked from Atinux/async-foreach.js
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
/*const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}*/
// ES6 Compliant `asyncForEach`
// Resolves await reserved keyword
const asyncForEach = async (array, callback) => {
@iheartmedia-matt
iheartmedia-matt / mediaqueries.css
Created May 21, 2018 21:32 — forked from phuphighter/mediaqueries.css
Semantic UI friendly media queries
/* Mobile */
@media only screen and (max-width: 767px) {
[class*="mobile hidden"],
[class*="tablet only"]:not(.mobile),
[class*="computer only"]:not(.mobile),
[class*="large screen only"]:not(.mobile),
[class*="widescreen only"]:not(.mobile),
[class*="or lower hidden"] {
display: none !important;
}