Skip to content

Instantly share code, notes, and snippets.

View geoffjay's full-sized avatar

Geoff Johnson geoffjay

  • Vancouver, BC, Canada
View GitHub Profile
import { makeExecutableSchema } from 'graphql-tools'
import Configuration from './configuration'
import resolvers from '../resolvers'
const Query = `
type Query {
configuration(id: String!): Configuration
configurations: [Configuration]
}
import Obj from './object'
import Property from './property'
import Plugin from './plugin'
const Configuration = `
type Configuration {
id: String!,
properties: [Property]
plugins: [Plugin]
objects: [Obj]
const Plugin = `
type Plugin {
id: String!
type: String
objects: [Obj]
properties: [Property]
}
`
export default Plugin
const Property = `
type Property {
key: String!
value: String
}
`
export default Property
const Obj = `
type Obj {
id: String!
type: String
namespace: String
objects: [Obj]
properties: [Property]
}
`
@geoffjay
geoffjay / create_config_xml.tcl
Created January 13, 2017 21:22
Tool to create XML configs for d_hydro
#
# Procedure : createConfigXML
# Arguments : -mdf <filename> Name of mdf file
# -ddb <filename> Name of ddb file: exactly one of -mdf or -ddb must be specified
# -out <filename> Name of xml file to be generated
# -sp Use single precision Delft3D-FLOW executable
# -wait "true"/"false" [optional] DelftOnline wait value
# Return value: "" : No error
# Any other string: Error message
# Result : Produces an XML-file (name specified by -out) that can be read by d_hydro.exe (Delft3D-FLOW version 6.xx)
@geoffjay
geoffjay / extension.vala
Created July 18, 2016 21:33
WebKit Javascript extension
[DBus (name = "org.opendcs.Dcs.Extension")]
public class Dcs.UI.Extension.DOM : GLib.Object {
private int count;
private WebKit.WebPage page;
private static const JSCore.StaticFunction[] class_functions = {{
"get", (JSCore.ObjectCallAsFunctionCallback) meas_get_cb, JSCore.PropertyAttribute.ReadOnly
},{