Skip to content

Instantly share code, notes, and snippets.

View devonChurch's full-sized avatar
👍
Always being productive 🚀

Devon Church devonChurch

👍
Always being productive 🚀
View GitHub Profile
@devonChurch
devonChurch / index.js
Last active April 20, 2021 07:10
Fetch, Flatten, Sanitise and Set Testimonial Items
const Firestore = require("@google-cloud/firestore");
const functions = require("firebase-functions");
const axios = require("axios");
const API_ENDPOINT = "https://services.languageperfect.com/json.rpc";
const API_METHOD = "nz.co.LanguagePerfect.Services.PortalsAsync.ControlPanel.NewsPortal.GetCommunityArticlesPublic"; // prettier-ignore
const FIRESTORE_COLLECTION = "testimonialsFiltered";
const FIRESTORE_PROJECT_ID = "testimonials-4d1e6";
const COUNTRIES = [
1, // International,
{
"environment": "staging"
}
@devonChurch
devonChurch / get-story-path-ids.js
Created August 19, 2019 22:00
Get path ID for every Story in sidebar
// Reveals ALL of the Story links in the Storybook Manager Sidebar. From there we
// return a list of all of the paths associated to getting each Story to open in
// an iFrame.
//
// The problem here is that Storybook will only inject the Story links associated
// under a Story group when it's been triggered by the user. In that regard we
// cannot scrape the DOM initially and instead need to programatically open all
// Story groups and then take an inventory of their revealed Story links.
// The "option" links (not links that trigger a story but links that open up the
@devonChurch
devonChurch / vs-code-config.json
Created January 10, 2018 04:45
vs-code-config
{
"workbench.iconTheme": "material-icon-theme",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": false,
"workbench.colorTheme": "Material Theme",
"editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace",
"editor.lineHeight": 0,
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.tabSize": 2,
[id^=liveagent_invite_button]{z-index:83}[id^=liveagent_invite_button] img[src$="/x.png"]{right:10px!important;top:10px!important}@media only screen and (max-width:30em){[id^=liveagent_invite_button]{left:5%!important;margin:0!important;-webkit-transform:translateY(-50%)!important;transform:translateY(-50%)!important;width:90%!important}[id^=liveagent_invite_button] img:not([src$="/x.png"]){height:auto!important;width:100%!important}}