Skip to content

Instantly share code, notes, and snippets.

View mavame's full-sized avatar

Matt Van Meter mavame

View GitHub Profile
@mavame
mavame / pizza.json
Created October 10, 2017 18:07
Sample pizza locations
{
"businesses": [
{
"id": "minellis-pizza-columbus-2",
"name": "Minelli's Pizza",
"image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/RClRY8K40PbFvE-zg6CNJA/o.jpg",
"is_closed": false,
"url": "https://www.yelp.com/biz/minellis-pizza-columbus-2?adjust_creative=MCLKONVnfSv060BOXT4UYQ&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=MCLKONVnfSv060BOXT4UYQ",
"review_count": 31,
"categories": [
@mavame
mavame / GoogleMapsApi.js
Last active December 6, 2023 21:53
A simple class for loading the Google Maps Javascript API in browser async using ES6 and Promise
/**
* Use this class to ensure Google Maps API javascript is loaded before running any google map specific code.
*/
export class GoogleMapsApi {
/**
* Constructor set up config.
*/
constructor() {
// api key for google maps
/**
* Maps a callback to an element in an array-like object
* Basically a copy of underscore's _.each
* source: http://underscorejs.org/docs/underscore.html#section-20
*/
export function forEach(obj, iteratee, context) {
let ctx = this;
const isObject = function(obj) {