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
var contentfulClient = contentful.createClient({ | |
accessToken: 'a5928e816edc7addfa4298669bd534f83b8cd907b920511b7d2f86f0d5b3e270', | |
space: '2q1fpqwpgegt' | |
}) | |
var PRODUCT_CONTENT_TYPE_ID = '2PqfXUJwE8qSYKuM0U6w8M' | |
document.addEventListener("DOMContentLoaded", function(event) { |
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
const contentfulClient = contentful.createClient({ | |
accessToken: | |
'a5928e816edc7addfa4298669bd534f83b8cd907b920511b7d2f86f0d5b3e270', | |
space: '2q1fpqwpgegt' | |
}); | |
const PRODUCT_CONTENT_TYPE_ID = '2PqfXUJwE8qSYKuM0U6w8M'; | |
document.addEventListener('DOMContentLoaded', event => { | |
const container = document.getElementById('content'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<!-- UI Extensions CSS --> | |
<link rel="stylesheet" href="//contentful.github.io/ui-extensions-sdk/cf-extension.css"> | |
<!-- UI Extensions SDK --> | |
<script src="//contentful.github.io/ui-extensions-sdk/cf-extension-api.js"></script> | |
<style> |
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
const fs = require('fs'); | |
const moment = require('moment'); | |
const sw = require('stopword'); | |
const product = | |
'./cf-exports/contentful-export-2q1fpqwpgegt-2018-04-18T11-21-56.json'; | |
const blog = | |
'./cf-exports/contentful-export-fo9twyrwpveg-2018-04-19T10-08-54.json'; | |
const exportData = JSON.parse(fs.readFileSync(blog, 'utf8')); |
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
// Here we're requiring the contentful SDK module in order to use it later | |
const contentful = require('contentful'); | |
// The SDK requires us to define a client which then provides all the functionalities from https://www.contentful.com/developers/docs/references/content-delivery-api/. Make sure to replace the space ID and CDA token as required. | |
const client = contentful.createClient({ | |
space: '<spaceID>', | |
accessToken: '<token>', | |
// host: 'preview.contentful.com', | |
}) |
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
const fs = require('fs'); | |
const https = require('https'); | |
const fetch = require('node-fetch'); | |
fs.readFile('./output2.json', 'utf8', function(err, data) { | |
if (err) throw err; | |
const venues = JSON.parse(data); | |
const fetches = venues.map(venue => { | |
const name = encodeURIComponent(venue.name); | |
const ll = encodeURIComponent(venue.ll); |
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
{ | |
"meta":{ | |
"code":200, | |
"requestId":"5c0c3190f594df1900a5058d" | |
}, | |
"notifications":[ | |
{ | |
"type":"notificationTray", | |
"item":{ | |
"unreadCount":5 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Display a map</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css' rel='stylesheet' /> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> | |
<style> |
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
export EDITOR="nvim" | |
export FZF_DEFAULT_COMMAND="rg --files --hidden -g '!*.git'" | |
export ZPLUG_HOME=$HOME/.zplug | |
alias ll="ls -lpG" | |
alias vim="nvim" | |
# Set up the prompt | |
autoload -Uz promptinit |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
OlderNewer