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
<?php | |
/** | |
* Plugin Name: Ovni Pending Submission Notifications | |
* | |
* Description: Send email notifications to the admin whenever a new post, topic or reply is submitted for review by a contributor. | |
* Also notifies subscribers when a pending post or topic is published | |
* Author: Tony Voss | |
* Text Domain: Ovni-pending-submission-notifications | |
* Version: 1.0 | |
* Credits: Basically a clone of the plugin pending-submission-notifcations by Razvan Horeanga |
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
<?php | |
/* | |
Plugin Name: Ovni chop up emails | |
Description: Prevents number of Bcc addresees exceeding defined limit by breaking it up into multiple emails. | |
Author: Tony Voss | |
Version: 1.0 1 Mar 2019 | |
History | |
Version: 1.0 1 Mar 2019 Initial version |
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
// This script sends any active route out as WPT and RTE sentences so that iNavX shows the up-to-date active route. | |
// If the route or its waypoints are updated, iNavX will update to reflect this | |
Position = require("Position); // load position constructor | |
// here we define stuff we need outside the functions | |
const repeatInterval = 20; // repeat after this number of seconds | |
var activeWaypointName = “”; // to hold the active waypoint name, else “” | |
var activeRouteName = ""; // the name of the active route | |
var lastRoutePoint; // these two are needed to fix up RMB sentences and synthesise a BOD sentence… |
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
routeGUID = "48cf3bc5-3abb-4f73-8ad2-994e796289eb"; | |
OCPNonMessageName(handleRT, "OCPN_ROUTE_RESPONSE"); | |
OCPNsendMessage("OCPN_ROUTE_REQUEST",JSON.stringify({"GUID":routeGUID})); | |
function handleRT(routeJS){ | |
route = JSON.parse(routeJS); | |
try {print("RouteGUID ", routeGUID, " has the name ", | |
route.name, "\n");} | |
catch(err){print("No such route\n");} | |
}; |
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
APRgpx = OCPNgetARPgpx(); // get Active Route Point as GPX | |
if (APRgpx.length > 0){ | |
waypointPart = /<name>.*<\/name>/.exec(APRgpx); | |
waypointName = waypointPart[0].slice(6, -7); | |
print("Active waypoint is ", waypointName, "\n"); | |
} | |
else print("No active waypoint\n"); |
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
myWaypoint = OCPNgetSingleWaypoint("137eecdd-e3e0-4eea-9d72-6cec0e500dbe"); | |
if (!myWaypoint){ | |
print("No waypoint with that GUID\n"); | |
} | |
else{ | |
print("Waypoint name is ", myWaypoint.markName, "\n"); | |
} |
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
Waypoint = require("Waypoint"); | |
newWaypoint = new Waypoint(50.33, -1.3); | |
newWaypoint.markName = "Demo Waypoint"; | |
newWaypoint.iconName = "anchor"; | |
newWaypoint.isVisible = true; | |
newWaypoint.description = "Good pub close by ashore"; | |
newWaypoint.hyperlinkList.push({description:"Pub website", link: | |
"https://coachandhorses.co.uk"}); | |
GUID = OCPNaddSingleWaypoint(newWaypoint); | |
newWaypoint.GUID = GUID; |
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
function fibonacci(n) { | |
function fib(n) { | |
if (n == 0) return 0; | |
if (n == 1) return 1; | |
return fib(n-1) + fib(n-2); | |
}; | |
var res = []; | |
for (i = 0; i < n; i++) res.push(fib(i)); | |
return(res.join(' ')); | |
}; |
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
<?php | |
/** | |
* Plugin Name: Ovni Submission Notifications | |
* | |
* Description: Sends email notifications when topics or replies are published. Also deals with moderation. | |
* Author: Tony Voss | |
* Text Domain: Ovni-submission-notifications | |
* Version: 2.1 | |
* Credits: Started by cloning the plugin pending-submission-notifcations by Razvan Horeanga | |
* Notes: This plugin handles all notifications except for publication of WP posts and comments, which are handled by WP. |
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
// constructs route from NMEA WPL & RTE sentences | |
// optional simulator to synthesis NMEA data | |
// Updated v0.2.1 2 Sep 2020 to fix bugs when no routes and be consistent with NMEA message as object | |
// Updated v0.2.2 7 Sep 2020 several changes to correct when waypoints updated and to include Danish similation data | |
// Updated v0.2.3 9 Sep 2020 to fix when loading existing routes and there are none | |
// options | |
replaceExitingRoutes = true; // if true, any exiting OpenCPN route with the same name will be updated | |
testMode = true; // if true, uses simulated data rather than listening for real NMEA sentences |
OlderNewer