An updated guide/collection of guides on how to access JSON data with JavaScript
Original Question on Stack Exchange.
For reading the external Local JSON file (data.json) using java script
An updated guide/collection of guides on how to access JSON data with JavaScript
Original Question on Stack Exchange.
For reading the external Local JSON file (data.json) using java script
// Based on script by @SarahMarshall here: | |
// http://sarahmarshall.io/post/70812214349/how-to-add-twitter-follower-counts-to-a-google | |
var id = '@username'; // Replace with your username, then delete this line after running script 1st time | |
var CONSUMER_KEY = 'INSERT CONSUMER KEY'; // Create an application at https://dev.twitter.com | |
var CONSUMER_SECRET = 'INSERT CONSUMER SECRET'; // Create an application at https://dev.twitter.com | |
function getTwitterUserFollowers(id) { |
I swear to fulfill, to the best of my ability and judgment, this covenant:
I will respect the hard-won scientific gains of those physicians in whose steps I walk, and gladly share such knowledge as is mine with those who are to follow.
I will apply, for the benefit of the sick user, all measures which are required, avoiding those twin traps of overtreatment and therapeutic nihilism.
I will remember that there is art to medicine software as well as science, and that warmth, sympathy, and understanding may outweigh the surgeon's knife or the chemist's drug need for another dependency.
/* | |
To use you need to create an application on Github at https://github.com/settings/developers | |
The callback in this needs to be set to https://script.google.com/macros/d/{SCRIPT ID}/usercallback | |
Where {SCRIPT ID} is the ID of the script that is using this library. You can find your script's ID in the Apps Script code editor by clicking on the menu item "File > Project properties". | |
In this example code I've stored the apllicaitons clientId and clientSecret in the Script Properties: | |
- git_clientId | |
- git_clientSecret |
Agent.receive = function() { | |
var self = this; | |
var events = this.incomingEvents(); | |
// emailPattern from http://stackoverflow.com/a/1373724/123776 | |
var emailPattern = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/gi; | |
events.forEach(function(event) { | |
event.payload['q3_whatWould'] = event.payload['q3_whatWould'].replace(emailPattern, '***@***.***'); |
<!-- Frustrated.js by Isis Anchalee @isisAnchalee | |
https://github.com/isisAnchalee/Frustrated.js --> | |
<script async='true'> | |
(function () { | |
var eventsArr = []; | |
document.addEventListener("click", function(even) { | |
eventsArr.push(new Date()); |
#!/usr/bin/env python | |
from __future__ import print_function, division | |
import click | |
import csv | |
from datetime import timedelta | |
from itertools import cycle | |
from queue import Queue | |
import requests |
<script> | |
(function(){ | |
var data = { | |
"@context": "http://schema.org", | |
"@type": "BlogPosting", | |
"mainEntityOfPage": { | |
"@type": "WebPage", | |
"@id": {{Page URL}} | |
}, | |
"headline": {{SCHEMA - Article Headline}}, |
{ | |
"version": 8, | |
"name": "Dark", | |
"metadata": { | |
"mapbox:autocomposite": true, | |
"mapbox:type": "default", | |
"mapbox:groups": { | |
"1444934828655.3389": { | |
"name": "Aeroways", | |
"collapsed": true |
license: gpl-3.0 | |
border: no | |
scrolling: no |