Skip to content

Instantly share code, notes, and snippets.

@wesww
wesww / pinpoint-amplify.js
Last active July 12, 2021 07:24
AWS JS libs without an Amplify backend
import Auth from '@aws-amplify/auth'
import Analytics from '@aws-amplify/analytics'
Auth.configure({
region: 'us-east-1',
identityPoolId: 'us-east-1:xxxx...',
})
Analytics.configure({
AWSPinpoint: {
appId: 'appIdKey',
region: 'us-east-1'
@wesww
wesww / gist:d1f2dd21468c1c1ad791a63b92b70fdc
Created March 31, 2017 21:27 — forked from johnbabb/gist:2d69374455e386eae87a
Chrome Dev Tools - Save Large Variable to File.
var JsonNetDecycle = (function () {
function JsonNetDecycle() { }
JsonNetDecycle.decycle = function decycle(obj) {
var catalog = [];
var newObj = JsonNetDecycle.getDecycledCopy(obj, catalog);
return newObj;
}
JsonNetDecycle.getDecycledCopy = function getDecycledCopy(obj, catalog) {
var i;
var name;
@wesww
wesww / geocodeBatcher.js
Created March 7, 2016 19:42
batch update
function geocodeItem(item) {
var itemId = item.ID;
var city = item.venue_address_city;
city = city.replace(' ', '+').replace(',', '');
if (item.lat == '0.000000' || item.lng == "0.000000") {
jQuery.ajax({
url: "https://maps.googleapis.com/maps/api/geocode/json?address=" + city,
method: "GET"
}).done(function(response) {
var latlng = response.results[0].geometry.location;