Skip to content

Instantly share code, notes, and snippets.

View robert-moore's full-sized avatar

Rob Moore robert-moore

View GitHub Profile
@robert-moore
robert-moore / index.js
Created November 23, 2023 14:18
Churnkey Event Creation
const Axios = require("axios");
const churnkeyEventUrl = "https://api.churnkey.co/v1/api/events/new";
const churnkeyBulkEventUrl = "https://api.churnkey.co/v1/api/events/bulk";
const churnkeyCustomerUpdateUrl =
"https://api.churnkey.co/v1/api/events/customer-update";
const churnkeyAppId = process.env['CK_APP_ID']
const churnkeySecretKey = process.env['CK_SECRET_KEY']
if (!churnkeyAppId || !churnkeySecretKey) {
@robert-moore
robert-moore / mac.ahk
Created March 10, 2022 12:11
Autohotkey Mac Keyboard
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance Force
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
!Right::
Send, {End}
return
@robert-moore
robert-moore / README.md
Last active January 17, 2021 08:38
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.

Intercom user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server
@robert-moore
robert-moore / PublicReadPolicy.json
Created April 30, 2019 18:22
AWS Amplify Storage Public Read for Guests
"S3BucketPolicy": {
"Type" : "AWS::S3::BucketPolicy",
"Properties" : {
"Bucket" : {"Ref" : "bucketName"},
"PolicyDocument": {
"Statement":[{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Action": "s3:GetObject",
"Principal": "*",
@robert-moore
robert-moore / handlers.js
Created August 4, 2017 20:45
Google Map Autocomplete to FIPS
function initAutocomplete() {
autocomplete = new google.maps.places.Autocomplete(
(document.getElementById('autocomplete')),
{types: ['geocode']});
}
function geolocate() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var geolocation = {
@robert-moore
robert-moore / .block
Created October 8, 2018 08:40
Makeover Monday - if the world was 100 people
license: mit
height: 800
@robert-moore
robert-moore / .block
Last active August 10, 2018 14:44
Bivariate Hexbin Map
license: mit

Filter Picker Technical Specification

Terminology

Free Dimension: A DimensionCluster instance, or a LocaleType instance. QUESTION: Is Free Dimension the best name? It seems so, because it is a direct correspondence with the Free/Fixed Dimension terminology that we are using in our data viz. But if we don't want to couple our UI terms with our Data Viz terms, perhaps we can call it Filter Group

Filter: A collection of Locales, or a collection of DimensionInstances, like so: <Locale>[], <DimensionInstance>[]

Redux State

@robert-moore
robert-moore / .block
Last active February 17, 2018 19:54
Pie Chart
license: mit