This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
width="28" | |
height="28" | |
viewBox="0 0 28 28" | |
> | |
<defs> | |
<circle id="my-location-a" cx="330" cy="366" r="8" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# brew install gnu-sed | |
var1=$1 | |
name=`echo -n "${var1}" | gsed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g' -e 's/ //g' ` | |
rm -rf $PWD/$name.vue | |
rm -rf $PWD/$name.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable import/prefer-default-export */ | |
import * as R from 'ramda'; | |
/** | |
* @curried | |
* @param {Object} reducer The simplified reducer object, i.e. { increment: (state, payload) => state + payload } | |
* @param {Object} initialState Initial state for the reducer function | |
* @returns {Function} Generalized reducer using the Ramda Cond pattern (http://ramdajs.com/docs/#cond) | |
*/ | |
export const reducerWrapper = (reducer, initialState) => (state = initialState, action) => R.pipe( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 953, | |
"name": "Large Campus", | |
"accountId": 328, | |
"accountName": "Gloo Church Analytics Demo", | |
"address": { | |
"address": "805 Walnut St", | |
"city": "Boulder", | |
"state": "CO", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 1836, | |
"firstName": "David", | |
"lastName": "Mart", | |
"email": "[email protected]", | |
"superUser": false, | |
"accountAccess": [ | |
{ | |
"accountName": "Gloo Church Analytics Demo", | |
"accountId": 328, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactDOMServer from 'react-dom/server'; | |
import MarkerSvg from './marker-svg'; | |
const encodeSvg = reactElement => | |
'data:image/svg+xml;charset=utf-8,' + | |
encodeURIComponent(ReactDOMServer.renderToStaticMarkup(reactElement)) | |
const marker = { | |
position: { | |
lat: "34.1683776" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getColoredIconUrl } from "./icon-url-generator" | |
const myColoredMarker = { | |
position: { | |
lat: "34.1683776" | |
lng: "-118.3826831" | |
}, | |
icon: { | |
url: getColoredIconUrl("#C0FFEE", "#B00B1E"), | |
anchor: { x: 14, y: 14 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import LocationIcon from './LocationIcon' | |
// create a constructor from a Vue component | |
const LocationIconConstructor = Vue.extend(LocationIcon) | |
export const getColoredIconUrl = (fillColor, strokeColor) => { | |
// create a Vue element with required props | |
const iconComponent = new LocationIconConstructor({ propsData: { fillColor, strokeColor } }) | |
// mount the component shadow DOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<svg | |
width="28" | |
height="28" | |
viewBox="0 0 28 28" | |
> | |
<defs> | |
<circle id="my-location-a" cx="14" cy="14" r="8" /> | |
</defs> | |
<g fill="none" fill-rule="evenodd"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<svg | |
width="28" | |
height="28" | |
viewBox="0 0 28 28" | |
> | |
<defs> | |
<circle id="my-location-a" cx="14" cy="14" r="8" /> | |
</defs> | |
<g fill="none" fill-rule="evenodd"> |