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 assert = require('assert'); | |
const polygon = require('turf-polygon'); | |
const point = require('turf-point'); | |
const { default: distance } = require('@turf/distance'); | |
const { default: union } = require('@turf/union'); | |
const difference = require('@turf/difference'); | |
const merge = (polygons) => polygons.reduce((p, c) => union(p, polygon([c])), polygon([])); | |
const normalize = (poly, ...holes) => [holes.reduce((p, h) => { |
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
import javax.crypto.Cipher; | |
import javax.crypto.SecretKey; | |
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.GCMParameterSpec; | |
import javax.crypto.spec.PBEKeySpec; | |
import javax.crypto.spec.SecretKeySpec; | |
public class T { | |
private final static char[] hexArray = "0123456789ABCDEF".toCharArray(); | |
private static String bytesToHex(byte[] bytes) { |
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 path = require("path"); | |
const get = require("lodash.get"); | |
const set = require("lodash.set"); | |
const objectScan = require("object-scan"); | |
const objectHash = require("object-hash"); | |
const data = Object.entries(fs.readdirSync(path.join(__dirname, "query")) | |
.map(f => f.slice(0, -5)) | |
.reduce((p, f) => Object.assign(p, { |
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
// Unfortunately this doesn't work as expected (NPM is broken as usual) | |
const os = require("os"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const { execSync, exec } = require('child_process'); | |
const async = require("async"); | |
const objectScan = require("object-scan"); | |
const get = require("lodash.get"); | |
const difference = require("lodash.difference"); |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:Describe*", | |
"cloudformation:List*", | |
"cloudformation:Get*", | |
"cloudformation:PreviewStackUpdate", |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:Describe*", | |
"cloudformation:List*", | |
"cloudformation:Get*", | |
"cloudformation:PreviewStackUpdate", |