This file contains hidden or 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 promisify = require("promisify-node"); | |
const fseAirports = require("./icaodata-with-zones.json") | |
const fs = require('fs') | |
const sqlite = require('sqlite') | |
const sqlite3 = require('sqlite3') | |
const dbPromise = sqlite.open({ | |
filename: 'little_navmap_navigraph.sqlite', | |
driver: sqlite3.Database | |
}) |
This file contains hidden or 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 Autocomplete from 'react-autocomplete'; | |
import { rankWith, scopeEndsWith } from '@jsonforms/core'; | |
import { JsonForms, withJsonFormsControlProps } from '@jsonforms/react'; | |
import { materialCells, materialRenderers } from '@jsonforms/material-renderers'; | |
import React from "react" | |
const schema = { | |
"type": "object", | |
"title": "The Root Schema", | |
"description": "The root schema comprises the entire JSON document.", |
This file contains hidden or 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 Ajv = require("ajv"); | |
const pack = require("ajv-pack"); | |
const ajv = new Ajv({ | |
sourceCode: true, | |
schemaId: "auto", | |
allErrors: true, | |
jsonPointers: true, | |
errorDataPath: "property", | |
verbose: true | |
}); |
This file contains hidden or 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
/* | |
The MIT License | |
Copyright (c) 2017-2019 EclipseSource Munich | |
https://github.com/eclipsesource/jsonforms | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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 { | |
rankWith, | |
scopeEndsWith | |
} from '@jsonforms/core'; | |
export default rankWith( | |
Number.MAX_VALUE, | |
(x) => { | |
if(!x.elements) { | |
return false |
This file contains hidden or 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 * as React from 'react' | |
import { connect } from 'react-redux'; | |
import { MaterialHorizontalLayout } from '@jsonforms/material-renderers' | |
import { | |
mapStateToLayoutProps | |
} from '@jsonforms/core'; | |
const WithUnit = (props) => { | |
let uiSchema = props.uischema | |
uiSchema.type = "HorizontalLayout" |
This file contains hidden or 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
<Grid item key={`${path}-${index}`} xs={12} lg={6}> | |
<ResolvedJsonForms | |
uischema={child} | |
schema={schema} | |
path={path} | |
renderers={renderers} | |
/> | |
</Grid> |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [ "$1" = "status" ]; then | |
printf "Your gut seems to be healthy" | |
elif [ "$1" = "reset" ]; then | |
printf "Cleaning out your gut..." | |
sleep 1 | |
printf "Please wait..." | |
sleep 1 | |
printf "Please wait..." | |
sleep 1 |
This file contains hidden or 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 os | |
import subprocess | |
import sys | |
import datetime | |
filePath = sys.argv[1] | |
print(filePath) | |
# Assume file creation date is video start time, this may not be true for all platforms | |
# and won't be true if file had been transfered in a way which loses this infomation | |
videoStartTime = datetime.datetime.fromtimestamp(os.stat(sys.argv[1]).st_birthtime) |