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
/// <reference types="@fastly/js-compute" /> | |
import { Logger } from 'fastly:logger'; | |
addEventListener('fetch', (event) => event.respondWith(handleRequest(event))); | |
async function handleRequest(event) { | |
const logger = new Logger('my_new_relic_endpoint'); | |
let logOutput = { |
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
{"version":1,"resource":"file:///d%3A/Git/Senscity-Gitlab/senscity-design-system/src/components/cds-search/cds-search.stories.mdx","entries":[{"id":"jRUh.mdx","source":"searchReplace.source","timestamp":1653600241674},{"id":"cD3A.mdx","source":"searchReplace.source","timestamp":1654310379497},{"id":"E9jH.mdx","source":"searchReplace.source","timestamp":1654310439893},{"id":"h8jf.mdx","source":"moved.source","timestamp":1654310871436},{"id":"yrIl.mdx","source":"renamed.source","timestamp":1654310942169},{"id":"eMEG.mdx","source":"searchReplace.source","timestamp":1654312199578}]} |
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
"use strict" | |
exports.__esModule = true | |
var distance_1 = require("@turf/distance") | |
var intersect_1 = require("@turf/intersect") | |
var helpers_1 = require("@turf/helpers") | |
/** | |
* Takes a bounding box and a cell depth and returns a set of triangular {@link Polygon|polygons} in a grid. | |
* | |
* @name triangleGrid | |
* @param {Array<number>} bbox extent in [minX, minY, maxX, maxY] order |
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
# Source: https://stackoverflow.com/a/43317244 | |
$path = ".\aws-ec2-key.pem" | |
# Reset to remove explict permissions | |
icacls.exe $path /reset | |
# Give current user explicit read-permission | |
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" | |
# Disable inheritance and remove inherited permissions | |
icacls.exe $path /inheritance:r |
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 request = require('request-promise') | |
var AWS = require('aws-sdk') | |
var fs = require('fs') | |
var userName = 'YOUR_MAPBOX_USERNAME' | |
var accessToken = 'YOUR_MAPBOX_TOKEN' // From https://www.mapbox.com/studio/account/tokens/ | |
var credentials = null | |
/* | |
Methods: |
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
/* | |
Warning : This is overwrite .geojson filename in the directory with same filename as .json file | |
To run the script: | |
node convertJson.js <JSON Filename without extension> | |
*/ | |
var Readable = require('stream').Readable |
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 gulp = require('gulp'); | |
var exec = require('child_process').exec; | |
var sass = require('gulp-sass'); | |
var nodemon = require('gulp-nodemon'); | |
var browserSync = require('browser-sync').create(); | |
var reload = browserSync.reload; | |
gulp.task('default', ['sass', 'browser-sync'], function() { | |
gulp.watch("public/scss/*.scss", ['sass'], reload); |
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 Promise = require('bluebird'); | |
var promiseWhile = function(condition, action) { | |
var resolver = Promise.defer(); | |
var loop = function() { | |
if (!condition()) return resolver.resolve(); | |
return Promise.cast(action()) | |
.then(loop) | |
.catch(resolver.reject); |
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
[ | |
{ | |
"LexicalDiversity": 5.088301198008541, | |
"freqDist": [ | |
{ | |
"word": "I", | |
"count": "2066" | |
}, | |
{ | |
"word": "Mr", |
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
// Step 1: Type this in your browser console | |
var script = document.createElement('script'); | |
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
// Wait for a second | |
//Step 2: Run the following | |
var elements = $(".card .face-front img"); | |
elements = elements.sort(function(a, b) { |
NewerOlder