View redux-store-wrapper.js
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( |
View locations.json
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", |
View get.json
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": "david.mart@sadasystems.com", | |
"superUser": false, | |
"accountAccess": [ | |
{ | |
"accountName": "Gloo Church Analytics Demo", | |
"accountId": 328, |
View react-marker.js
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" |
View marker.js
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 } |
View icon-url-generator.js
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 |
View marker-svg.2.vue
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"> |
View marker-svg.1.vue
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"> |
View sada-db-sql.sql
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
SELECT Domain from bill_items group by Domain; | |
select | |
Domain, | |
Product_Name, | |
sum(Amount) as total, | |
DATEPART(Month, Start_Date) as Month, | |
DATEPART(Year, Start_Date) as Year | |
from bill_items | |
group by |
View missing customers
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
[ | |
{ | |
"Domain": "trademotion.com" | |
}, | |
{ | |
"Domain": "tuilifestyle.com" | |
}, | |
{ | |
"Domain": "selectiveps.com" | |
}, |